- reply Back
+ reply Back
Remove Item Discount
Remove All
Enter
@@ -225,6 +227,19 @@
\ No newline at end of file
diff --git a/app/views/origami/surveys/index.html.erb b/app/views/origami/surveys/index.html.erb
index f61caefb..915bf20a 100755
--- a/app/views/origami/surveys/index.html.erb
+++ b/app/views/origami/surveys/index.html.erb
@@ -9,7 +9,7 @@
-
+
@@ -70,5 +70,22 @@
+
+ reply Back
+
+
\ No newline at end of file
diff --git a/app/views/origami/surveys/new.html.erb b/app/views/origami/surveys/new.html.erb
index db1f68c0..bee0f843 100755
--- a/app/views/origami/surveys/new.html.erb
+++ b/app/views/origami/surveys/new.html.erb
@@ -1,4 +1,4 @@
-
- Back
+ reply Back
diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb
index 54b63caa..d8d814b8 100755
--- a/app/views/reports/shiftsale/index.html.erb
+++ b/app/views/reports/shiftsale/index.html.erb
@@ -145,6 +145,7 @@
// OK button is clicked
$('#from').bootstrapMaterialDatePicker().on('beforeChange', function(e, date){
+ console.log(date);
$('#from').val(date.format("DD-MM-YYYY"))
search_by_date();
});
diff --git a/app/views/transactions/bookings/index.html.erb b/app/views/transactions/bookings/index.html.erb
new file mode 100755
index 00000000..997d18b5
--- /dev/null
+++ b/app/views/transactions/bookings/index.html.erb
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+ <%= form_tag transactions_orders_path, :method => :get do %>
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+ <%= t("views.right_panel.detail.booking_id") %>
+ <%= t("views.right_panel.detail.sale_id") %>
+ <%= t("views.right_panel.detail.table") %>
+ <%= t("views.right_panel.detail.checkin_time") %>
+ <%= t("views.right_panel.detail.checkout_time") %>
+ <%= t("views.right_panel.detail.checkin_by") %>
+ <%= t("views.right_panel.detail.checkout_by") %>
+ <%= t("views.right_panel.detail.booking_status") %>
+ <%= t("views.right_panel.detail.booking_date") %>
+
+
+
+
+ <% if @bookings != 0 %>
+ <% @bookings.each do |booking| %>
+
+ <%= link_to booking.booking_id, transactions_booking_path(booking) %>
+ <%= link_to booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %>
+ <%= booking.dining_facility.name %>
+ <%= booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %>
+ <%= booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %>
+ <%= booking.checkin_by rescue '-' %>
+ <%= booking.checkout_by rescue '-' %>
+ <%= booking.booking_status %>
+ <%= booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
+
+ <% end %>
+ <% else %>
+ There is no data for search....
+ <% end %>
+
+
+
+ <% if @bookings != 0 %>
+ <%= paginate @bookings %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/transactions/bookings/index.json.jbuilder b/app/views/transactions/bookings/index.json.jbuilder
new file mode 100755
index 00000000..a67adc38
--- /dev/null
+++ b/app/views/transactions/bookings/index.json.jbuilder
@@ -0,0 +1 @@
+json.array! @transactions_sales, partial: 'transactions_sales/transactions_sale', as: :transactions_sale
diff --git a/app/views/transactions/bookings/indexback.html.erb b/app/views/transactions/bookings/indexback.html.erb
new file mode 100755
index 00000000..fe8c820a
--- /dev/null
+++ b/app/views/transactions/bookings/indexback.html.erb
@@ -0,0 +1,59 @@
+<%= notice %>
+
+<%= t("views.right_panel.header.transactions_sales") %>
+
+
+
+
+ <%= t :cashier %>
+ <%= t :cashier %> <%= t("views.right_panel.detail.name_txt2") %>
+ <%= t("views.right_panel.detail.requested_by") %>
+ <%= t("views.right_panel.detail.requested_at") %>
+ <%= t("views.right_panel.detail.receipt_no") %>
+ <%= t("views.right_panel.detail.receipt_date") %>
+ <%= t :customer %>
+ <%= t("views.right_panel.detail.payment_status") %>
+ <%= t("views.right_panel.detail.sale_status") %>
+ <%= t("views.right_panel.detail.total_amount") %>
+ <%= t("views.right_panel.detail.total_discount") %>
+ <%= t("views.right_panel.detail.total_tax") %>
+ <%= t("views.right_panel.detail.tax_type") %>
+ <%= t("views.right_panel.detail.grand_total") %>
+ <%= t("views.right_panel.detail.rnd_adj") %>
+ <%= t("views.right_panel.detail.amt_received") %>
+ <%= t("views.right_panel.detail.amt_changed") %>
+
+
+
+
+
+ <% @transactions_sales.each do |transactions_sale| %>
+
+ <%= transactions_sale.cashier %>
+ <%= transactions_sale.cashier_name %>
+ <%= transactions_sale.requested_by %>
+ <%= transactions_sale.requested_at %>
+ <%= transactions_sale.receipt_no %>
+ <%= transactions_sale.receipt_date %>
+ <%= transactions_sale.customer %>
+ <%= transactions_sale.payment_status %>
+ <%= transactions_sale.sale_status %>
+ <%= transactions_sale.total_amount %>
+ <%= transactions_sale.total_discount %>
+ <%= transactions_sale.total_tax %>
+ <%= transactions_sale.tax_type %>
+ <%= transactions_sale.grand_total %>
+ <%= transactions_sale.rounding_adjustment %>
+ <%= transactions_sale.amount_received %>
+ <%= transactions_sale.amount_changed %>
+ <%= link_to t("views.btn.show"), transactions_sale %>
+ <%= link_to t("views.btn.edit"), edit_transactions_sale_path(transactions_sale) %>
+ <%= link_to t("views.btn.delete"), transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %>
+
+ <% end %>
+
+
+
+
+
+<%= link_to 'New Transactions Sale', new_transactions_sale_path %>
diff --git a/app/views/transactions/bookings/show.html.erb b/app/views/transactions/bookings/show.html.erb
new file mode 100755
index 00000000..06668d5e
--- /dev/null
+++ b/app/views/transactions/bookings/show.html.erb
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= t("views.right_panel.detail.booking_id") %>
+ <%= t("views.right_panel.detail.sale_id") %>
+ <%= t("views.right_panel.detail.table") %>
+ <%= t("views.right_panel.detail.checkin_time") %>
+ <%= t("views.right_panel.detail.checkout_time") %>
+ <%= t("views.right_panel.detail.checkin_by") %>
+ <%= t("views.right_panel.detail.checkout_by") %>
+ <%= t("views.right_panel.detail.booking_status") %>
+ <%= t("views.right_panel.detail.booking_date") %>
+
+
+
+
+
+ <%= @booking.booking_id%>
+ <%= link_to @booking.sale_id, transactions_sale_path(booking.sale_id) rescue '-' %>
+ <%= @booking.dining_facility.name %>
+ <%= @booking.checkin_at.utc.getlocal.strftime("%I:%M %p") %>
+ <%= @booking.checkout_at.utc.getlocal.strftime("%I:%M %p") rescue '-' %>
+ <%= @booking.checkin_by rescue '-' %>
+ <%= @booking.checkout_by rescue '-' %>
+ <%= @booking.booking_status %>
+ <%= @booking.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
+
+
+
+
+
+
+
+
+
+
+
+ <%= t("views.right_panel.detail.order_id") %>
+ <%= t("views.right_panel.header.menu_item") %>
+ <%= t("views.right_panel.detail.qty") %>
+ <%= t("views.right_panel.detail.unit_price") %>
+ <%= t("views.right_panel.detail.option") %>
+ <%= t("views.right_panel.detail.status") %>
+ <%= t("views.right_panel.detail.waiter") %>
+ <%= t("views.right_panel.detail.created_at") %>
+
+
+
+
+ <% @order_items.each do |order_item| %>
+
+ <%= link_to order_item.order_id, transactions_order_path(order_item.order_id) %><%= %>
+ <%= order_item.item_name %>
+ <%= order_item.qty %>
+ <%= order_item.price %>
+ <%= order_item.options %>
+ <%= order_item.order_item_status %>
+ <%= order_item.item_order_by %>
+ <%= order_item.created_at.strftime("%d-%m-%y %I:%M %p") %>
+
+ <% end %>
+
+
+
+
+
+
+
+
+
+ <%= t("views.right_panel.detail.sale_id") %>
+ <%= t("views.right_panel.detail.receipt_no") %>
+ <%= t("views.right_panel.detail.total_discount") %>
+ <%= t("views.right_panel.detail.tax_amount") %>
+ <%= t("views.right_panel.detail.sub_total") %>
+ <%= t("views.right_panel.detail.grand_total") %>
+ <%= t :cashier %>
+ <%= t("views.right_panel.detail.sales_status") %>
+ <%= t("views.right_panel.detail.receipt_date") %>
+
+
+
+
+ <% if @sale %>
+
+ <%= link_to @sale.sale_id, transactions_sale_path(@sale) %>
+ <%= @sale.receipt_no %>
+ <%= @sale.total_discount %>
+ <%= @sale.total_tax %>
+ <%= @sale.total_amount %>
+ <%= @sale.grand_total rescue '-' %>
+ <%= @sale.cashier_name rescue '-' %>
+ <%= @sale.sale_status %>
+ <%= @sale.receipt_date.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %>
+
+ <% else %>
+ There is no data ....
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/transactions/bookings/show.json.jbuilder b/app/views/transactions/bookings/show.json.jbuilder
new file mode 100755
index 00000000..48c70528
--- /dev/null
+++ b/app/views/transactions/bookings/show.json.jbuilder
@@ -0,0 +1 @@
+json.partial! "transactions_sales/transactions_sale", transactions_sale: @transactions_sale
diff --git a/app/views/transactions/credit_notes/index.html.erb b/app/views/transactions/credit_notes/index.html.erb
index 9f708d8e..ac706d90 100755
--- a/app/views/transactions/credit_notes/index.html.erb
+++ b/app/views/transactions/credit_notes/index.html.erb
@@ -100,7 +100,9 @@
-
+ <% if @sales != 0 %>
+ <%= paginate @sales %>
+ <% end %>
diff --git a/app/views/transactions/orders/index.html.erb b/app/views/transactions/orders/index.html.erb
index 6f146034..d78b9fbf 100755
--- a/app/views/transactions/orders/index.html.erb
+++ b/app/views/transactions/orders/index.html.erb
@@ -73,7 +73,7 @@
- <%if !@order.nil?%>
+ <%if !@orders.nil?%>
<%= paginate @orders %>
<%end%>
diff --git a/app/views/transactions/sales/_form.html.erb b/app/views/transactions/sales/_form.html.erb
deleted file mode 100755
index e83e3202..00000000
--- a/app/views/transactions/sales/_form.html.erb
+++ /dev/null
@@ -1,27 +0,0 @@
-<%= simple_form_for(@transactions_sale) do |f| %>
- <%= f.error_notification %>
-
-
- <%= f.association :cashier %>
- <%= f.input :cashier_name %>
- <%= f.input :requested_by %>
- <%= f.input :requested_at %>
- <%= f.input :receipt_no %>
- <%= f.input :receipt_date %>
- <%= f.association :customer %>
- <%= f.input :payment_status %>
- <%= f.input :sale_status %>
- <%= f.input :total_amount %>
- <%= f.input :total_discount %>
- <%= f.input :total_tax %>
- <%= f.input :tax_type %>
- <%= f.input :grand_total %>
- <%= f.input :rounding_adjustment %>
- <%= f.input :amount_received %>
- <%= f.input :amount_changed %>
-
-
-
- <%= f.button :submit %>
-
-<% end %>
diff --git a/app/views/transactions/sales/_transactions_sale.json.jbuilder b/app/views/transactions/sales/_transactions_sale.json.jbuilder
deleted file mode 100755
index 869b3cf7..00000000
--- a/app/views/transactions/sales/_transactions_sale.json.jbuilder
+++ /dev/null
@@ -1,2 +0,0 @@
-json.extract! transactions_sale, :id, :cashier_id, :cashier_name, :requested_by, :requested_at, :receipt_no, :receipt_date, :customer_id, :payment_status, :sale_status, :total_amount, :total_discount, :total_tax, :tax_type, :grand_total, :rounding_adjustment, :amount_received, :amount_changed, :created_at, :updated_at
-json.url transactions_sale_url(transactions_sale, format: :json)
diff --git a/app/views/transactions/sales/edit.html.erb b/app/views/transactions/sales/edit.html.erb
deleted file mode 100755
index eb3fe12a..00000000
--- a/app/views/transactions/sales/edit.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
Editing Transactions Sale
-
-<%= render 'form', transactions_sale: @transactions_sale %>
-
-<%= link_to t("views.btn.show"), @transactions_sale %> |
-<%= link_to 'Back', transactions_sales_path %>
diff --git a/app/views/transactions/sales/new.html.erb b/app/views/transactions/sales/new.html.erb
deleted file mode 100755
index 1f479747..00000000
--- a/app/views/transactions/sales/new.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-
New Transactions Sale
-
-<%= render 'form', transactions_sale: @transactions_sale %>
-
-<%= link_to 'Back', transactions_sales_path %>
diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb
index 69757c0d..bd6ce960 100755
--- a/app/views/transactions/sales/show.html.erb
+++ b/app/views/transactions/sales/show.html.erb
@@ -142,7 +142,7 @@
<% @order_items.each do |order_item| %>
- <%= order_item.order_id %>
+ <%= link_to order_item.order_id, transactions_order_path(order_item.order_id) %><%= %>
<%= order_item.item_name %>
<%= order_item.qty %>
<%= order_item.price %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a63c5d78..907da5f9 100755
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -63,6 +63,7 @@ en:
customer_details: "Customer Details"
order_details: "Order Details"
sale_details: "Sale Details"
+ booking_details: "Booking Details"
inventory_definitions: "Inventory Definitions"
sale_audits: "Sale Audits"
diff --git a/config/locales/mm.yml b/config/locales/mm.yml
index b17ba8de..097b1861 100755
--- a/config/locales/mm.yml
+++ b/config/locales/mm.yml
@@ -63,6 +63,7 @@ mm:
customer_details: "စားသုံးသူကိုယ်ရေးအသေးစိတ်"
order_details: "မှာကြားမှုအသေးစိတ်"
sale_details: "ရောင်းရငွေအသေးစိတ်"
+ booking_details: "ရောင်းရငွေအသေးစိတ်"
inventory_definitions: "ကုန်လှောင်ရုံပစ္စည်းဖွင့်ဆိုချက်များ"
sale_audits: "အရောင်းပြင်ဆင်ခြင်းများ"
diff --git a/config/routes.rb b/config/routes.rb
index 86556491..64f68262 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -335,6 +335,7 @@ scope "(:locale)", locale: /en|mm/ do
resources :sales
resources :orders
resources :credit_notes
+ resources :bookings
get "/sales/:sale_id/manual_complete_sale" => "manual_sales#manual_complete_sale", :as => "manual_complete_sale"
get "/sales/:sale_id/void" => "manual_sales#void", :as => "void"