-
diff --git a/app/views/settings/employees/_form.html.erb b/app/views/settings/employees/_form.html.erb
index 16745d90..092dded6 100755
--- a/app/views/settings/employees/_form.html.erb
+++ b/app/views/settings/employees/_form.html.erb
@@ -6,7 +6,7 @@
<%= f.input :name %>
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
- <%= f.input :emp_id, :as => :integer, :label => "Employee Numberic ID (*Unique)" %>
+ <%= f.input :emp_id, :label => "Employee Numberic ID (*Unique)" %>
<%= f.input :password %>
diff --git a/app/views/transactions/shift_sales/index.html.erb b/app/views/transactions/shift_sales/index.html.erb
new file mode 100755
index 00000000..8424f62c
--- /dev/null
+++ b/app/views/transactions/shift_sales/index.html.erb
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+ | Cashier Name |
+ Cashier Terminal |
+ Opening Time |
+ Closing Time |
+ Opening float |
+ Closing Amount |
+ Cast In |
+ Cast Out |
+ Total Receipt |
+ Dining Count |
+ Takeaway Count |
+ Total Void |
+ Action |
+
+
+
+
+ <% if @shift_sales != 0 %>
+ <% @shift_sales.each do |shift_sale| %>
+
+ | <%= shift_sale.employee.name%> |
+ <%=shift_sale.cashier_terminal.name%> |
+ <%= shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %>
+ |
+ <%= shift_sale.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') rescue '-' %>
+ |
+ <%=shift_sale.opening_balance %> |
+ <%=shift_sale.closing_balance %> |
+ <%=shift_sale.cash_in %> |
+ <%=shift_sale.cash_out %> |
+ <%= shift_sale.total_receipt %> |
+ <%= shift_sale.dining_count %> |
+ <%= shift_sale.takeaway_count %> |
+ (<%= shift_sale.total_void.round(2) %>) |
+ <%= link_to t("views.btn.show"), transactions_shift_sale_path(shift_sale),:class => 'btn btn-info btn-sm waves-effect' %> |
+
+ <% end %>
+ <% else %>
+ There is no data for search.... |
+ <% end %>
+
+
+
+ <% if @shift_sales != 0 %>
+ <%= paginate @shift_sales %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/transactions/shift_sales/index.json.jbuilder b/app/views/transactions/shift_sales/index.json.jbuilder
new file mode 100755
index 00000000..a67adc38
--- /dev/null
+++ b/app/views/transactions/shift_sales/index.json.jbuilder
@@ -0,0 +1 @@
+json.array! @transactions_sales, partial: 'transactions_sales/transactions_sale', as: :transactions_sale
diff --git a/app/views/transactions/shift_sales/indexback.html.erb b/app/views/transactions/shift_sales/indexback.html.erb
new file mode 100755
index 00000000..fe8c820a
--- /dev/null
+++ b/app/views/transactions/shift_sales/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/shift_sales/show.html.erb b/app/views/transactions/shift_sales/show.html.erb
new file mode 100755
index 00000000..3b2b6c6d
--- /dev/null
+++ b/app/views/transactions/shift_sales/show.html.erb
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+ | Cashier |
+ Cashier Terminal |
+ Opening Date |
+ Opening float |
+ Received Amount |
+ Cast In |
+ Cast Out |
+ Total Receipt |
+ Dining Count |
+ Takeaway Count |
+ Total Void |
+
+
+ | <%= @shift.employee.name%> |
+ <%=@shift.cashier_terminal.name%> |
+ <%= @shift.shift_started_at.utc.getlocal.strftime('%d-%m-%Y %I:%M %p') %>
+ |
+ <%=@shift.opening_balance %> |
+ <%=@shift.closing_balance %> |
+ <%=@shift.cash_in %> |
+ <%=@shift.cash_out %> |
+ <%= @shift.total_receipt %> |
+ <%= @shift.dining_count %> |
+ <%= @shift.takeaway_count %> |
+ (<%= @shift.total_void.round(2) %>) |
+
+
+
+
+
+ <% @total_amount_by_account.each do |amount| %>
+
+ |
+ Total <%= amount.account_name %> Amount |
+ <%= amount.total_price.round(2) %> |
+
+ <%end%>
+
+ |
+ Net Sales |
+ <%=@shift.nett_sales %> |
+
+
+ <% @total_discount_by_account.each do |amount| %>
+
+ |
+ Total <%= amount.account_name %> Discount |
+ <%= amount.total_price.round(2) %> |
+
+ <%end%>
+
+ <% if !@total_member_discount[0].member_discount.nil?
+ @member_discount = @total_member_discount[0].member_discount rescue 0.0
+ @overall = @shift.total_discounts - @member_discount
+ %>
+
+ |
+ Total Member Discount |
+ <%= @member_discount %> |
+
+ <%else @overall = @shift.total_discounts %>
+
+ <%end%>
+
+ |
+ Total Overall Discount |
+ <%= @overall %> |
+
+
+ |
+ Total Discount |
+ <%= @shift.total_discounts %> |
+
+
+ <% @sale_taxes.each do |tax| %>
+
+ |
+ <%= tax.tax_name %> |
+ <%= tax.st_amount.round(2) %> |
+
+ <%end%>
+
+ |
+ Total Tax |
+ <%=@shift.total_taxes %> |
+
+
+ |
+ Rounding Adj |
+ <%= @shift.total_rounding.round(2) %> |
+
+
+ |
+ Grand Total |
+ <%= @shift.grand_total.round(2) %> |
+
+
+ |
+
+
+
+ |
+ Cash Payment |
+ <%=@shift.cash_sales %> |
+
+
+ |
+ Credit Payment |
+ <%=@shift.credit_sales %> |
+
+ <% @total_amount = 0
+
+ @other_payment.each do |other| %>
+
+ |
+ Other Payment Detail |
+ |
+
+
+ |
+ MPU Payment |
+ <%=other.mpu_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.mpu_amount rescue 0.0 %>
+
+
+ |
+ VISA Payment |
+ <%=other.visa_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.visa_amount rescue 0.0 %>
+
+
+ |
+ JCB Payment |
+ <%=other.master_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.master_amount rescue 0.0 %>
+
+
+ |
+ Master Payment |
+ <%=other.jcb_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.jcb_amount rescue 0.0 %>
+
+
+ |
+ Reedem Payment |
+ <%=other.paypar_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.paypar_amount rescue 0.0 %>
+
+
+ |
+ FOC |
+ <%=other.foc_amount.round(2) rescue 0.0 %> |
+ <% @total_amount = @total_amount+other.foc_amount rescue 0.0 %>
+
+ <%end%>
+
+
+ |
+ Total Other Payment |
+ <%=@shift.other_sales %> |
+
+
+ |
+ Total Payment |
+ <%= @total_amount+@shift.cash_sales+@shift.credit_sales %> |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/app/views/transactions/shift_sales/show.json.jbuilder b/app/views/transactions/shift_sales/show.json.jbuilder
new file mode 100755
index 00000000..48c70528
--- /dev/null
+++ b/app/views/transactions/shift_sales/show.json.jbuilder
@@ -0,0 +1 @@
+json.partial! "transactions_sales/transactions_sale", transactions_sale: @transactions_sale
diff --git a/config/locales/en.yml b/config/locales/en.yml
index da9c4c71..95ee7115 100755
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -28,6 +28,7 @@ en:
hourly: "Hourly"
top: "Top"
orders: "Orders"
+ shiftsale: "ShiftSale"
credit: "Credit"
bookings: "Booking"
home: "Home"
@@ -90,6 +91,7 @@ en:
filter: "Filter"
del: "DEL"
clr: "CLR"
+ assign: "ASSIGN"
print_order_summary: "Print Order Summary"
memeber_card: "Member Card"
diff --git a/config/locales/mm.yml b/config/locales/mm.yml
index d103a5c0..5becd44b 100755
--- a/config/locales/mm.yml
+++ b/config/locales/mm.yml
@@ -28,6 +28,7 @@ mm:
hourly: "နာရီအလိုက်"
top: "အရောင်းရဆုံး"
orders: "အော်ဒါများ"
+ shiftsale: "အော်ဒါများ"
bookings: "အော်ဒါများ"
credit: "အကြွေး"
home: "မူလစာမျက်နှာ"
diff --git a/config/routes.rb b/config/routes.rb
index c2f59035..8b1aee18 100755
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -339,6 +339,7 @@ scope "(:locale)", locale: /en|mm/ do
resources :orders
resources :credit_notes
resources :bookings
+ resources :shift_sales
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"