From 682ff6bb23d27e3c10c847d480561da83cfdd675 Mon Sep 17 00:00:00 2001 From: Zin Moe Date: Thu, 23 Jul 2020 18:19:25 +0630 Subject: [PATCH 01/12] add methos to api customer controller --- app/controllers/api/customers_controller.rb | 20 ++++++++++++++++++++ app/uploaders/customer_image_uploader.rb | 5 +++-- config/routes.rb | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/customers_controller.rb b/app/controllers/api/customers_controller.rb index 2adc7c8a..d788ee06 100755 --- a/app/controllers/api/customers_controller.rb +++ b/app/controllers/api/customers_controller.rb @@ -10,6 +10,26 @@ class Api::CustomersController < ActionController::API @customer = Customer.find_by(params[:id]) end + def create + return unless params[:name].present? && params[:email].present? && params[:contact_no].present? + @customer = Customer.new(name: params[:name], email: params[:email], contact_no: params[:contact_no]) + if @customer.save + status = true + else + status = false + end + render json: status + end + + def get_customer_by_phone + if @customer = Customer.find_by_contact_no(params[:contact_no]) + status = true + else + status = false + end + render json: status + end + #Show customer detail by Order item def get_customer_order @customer = Customer.find(params[:id]) diff --git a/app/uploaders/customer_image_uploader.rb b/app/uploaders/customer_image_uploader.rb index 77a133af..871d5a39 100644 --- a/app/uploaders/customer_image_uploader.rb +++ b/app/uploaders/customer_image_uploader.rb @@ -20,10 +20,11 @@ class CustomerImageUploader < CarrierWave::Uploader::Base end def filename + return unless original_filename.present? if Shop.current_shop.shop_code.nil? - "#{original_filename}" if original_filename.present? + "#{original_filename}" else - "#{Shop.current_shop.shop_code}_#{original_filename}" if original_filename.present? + "#{Shop.current_shop.shop_code}_#{original_filename}" end end diff --git a/config/routes.rb b/config/routes.rb index 69c4e0ff..5fb08e4c 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -83,6 +83,8 @@ scope "(:locale)", locale: /en|mm/ do #Current active bookings resources :bookings, only: [:index, :show, :create, :update] resources :customers + # get customer by phone + get "get_customer_by_phone" => "customers#get_customer_by_phone" #get customer details by order items get "customers/get_order/:id" => "customers#get_customer_order" From 26d6551973bb46e1ff0a2ec32f4c22647952a4e1 Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Tue, 28 Jul 2020 17:48:34 +0630 Subject: [PATCH 02/12] update api menu item image --- app/views/api/restaurant/menu/_menu_item.json.jbuilder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/api/restaurant/menu/_menu_item.json.jbuilder b/app/views/api/restaurant/menu/_menu_item.json.jbuilder index 1ac16ebc..b2b18eca 100755 --- a/app/views/api/restaurant/menu/_menu_item.json.jbuilder +++ b/app/views/api/restaurant/menu/_menu_item.json.jbuilder @@ -23,10 +23,10 @@ if item.is_available json.code item.item_code json.name item.name json.alt_name item.alt_name - if !request_url.nil? && request_url != '' && !item.image_path.nil? - json.image request_url + item.image_path.to_s + if item.image_path.present? + json.image "#{request_url}/ok/#{item.image_path}" else - json.image item.image_path.url + json.image '' end json.description item.description json.information item.information From 901b16a4ef9f89210366fdee90a5e96fbd1781d6 Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Tue, 28 Jul 2020 17:50:55 +0630 Subject: [PATCH 03/12] fix type error --- config/initializers/action_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/action_controller.rb b/config/initializers/action_controller.rb index 87e2ea55..6c761039 100644 --- a/config/initializers/action_controller.rb +++ b/config/initializers/action_controller.rb @@ -96,7 +96,7 @@ class ActionController::API private def lookup_domain - if ENV["SERVER_CODE"] == "cloud" && request.subdomains.last && request.subdomains.last != "www" + if ENV["SERVER_MODE"] == "cloud" && request.subdomains.last && request.subdomains.last != "www" if license = cache_license # request.subdomain.downcase logger.info "Location - " + license.dbschema ActiveRecord::Base.establish_connection(website_connection(license)) From 7b5c821026d4defc13b661144e79f4c3a11172ac Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Tue, 28 Jul 2020 17:59:29 +0630 Subject: [PATCH 04/12] fix menu item image path --- app/views/api/restaurant/menu/_menu_item.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/api/restaurant/menu/_menu_item.json.jbuilder b/app/views/api/restaurant/menu/_menu_item.json.jbuilder index b2b18eca..7fad1c36 100755 --- a/app/views/api/restaurant/menu/_menu_item.json.jbuilder +++ b/app/views/api/restaurant/menu/_menu_item.json.jbuilder @@ -24,7 +24,7 @@ if item.is_available json.name item.name json.alt_name item.alt_name if item.image_path.present? - json.image "#{request_url}/ok/#{item.image_path}" + json.image "#{request_url}#{item.image_path}" else json.image '' end From 91378c21f593dbeb213064210142fc7bab4ae609 Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Wed, 29 Jul 2020 12:12:26 +0630 Subject: [PATCH 05/12] fixed report xls format --- app/views/reports/dailysale/index.xls.erb | 31 ++++++++------------- app/views/reports/receipt_no/index.html.erb | 4 +-- app/views/reports/receipt_no/index.xls.erb | 4 +-- app/views/reports/void_sale/index.xls.erb | 14 +++++----- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/app/views/reports/dailysale/index.xls.erb b/app/views/reports/dailysale/index.xls.erb index cc0eced9..98cfe853 100755 --- a/app/views/reports/dailysale/index.xls.erb +++ b/app/views/reports/dailysale/index.xls.erb @@ -42,29 +42,18 @@ <%= t("views.right_panel.detail.total_sales") %> <% if @tax.blank? %> <%= t("views.right_panel.detail.tax") %> - <% end %> <%= t("views.right_panel.detail.net_sales") %> + <% end %> + <% unless @sale_data.blank? %> <% void = 0 %> - <% mpu = 0 %> - <% master = 0 %> - <% visa = 0 %> - <% jcb = 0 %> - <% unionpay = 0 %> - <% alipay = 0 %> - <% paymal = 0 %> - <% dinga = 0 %> - <% junctionpay = 0 %> - <% giftvoucher = 0 %> - <% paypar = 0 %> <% cash = 0 %> <% credit = 0 %> <% foc = 0 %> <% discount = 0 %> - <% kbzpay = 0 %> <% total = 0 %> <% grand_total = 0 %> <% old_grand_total = 0 %> @@ -105,8 +94,8 @@ <%= number_format(sale[:total_sale], precision:precision.to_i,delimiter:delimiter) rescue '-'%> <% if @tax.blank? %> <%= number_format(sale[:tax], precision:precision.to_i,delimiter:delimiter) rescue '-'%> - <% end %> <%= number_format(sale[:net_sale], precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <% end %> <% count = count + 1 %> @@ -127,8 +116,10 @@ <%= number_format(rounding_adj, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_format(gross_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_format(total_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <% if @tax.blank? %> <%= number_format(tax, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <% end %> @@ -140,21 +131,21 @@ <% @tax.each do |tax| total_tax += tax.tax_amount.to_f %> - <%= tax.tax_name rescue '-'%> - <%= number_format(tax.tax_amount, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= tax.tax_name rescue '-'%> + <%= number_format(tax.tax_amount, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <% end %> <% net = grand_total %> <% net = net - rounding_adj%> <% net = net - total_tax %> - <%= t("views.right_panel.detail.net_amount") %> - <%= number_format(net, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= t("views.right_panel.detail.net_amount") %> + <%= number_format(net, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <% else %> - <%= t("views.right_panel.detail.net_amount") %> - <%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%> + <%= t("views.right_panel.detail.net_amount") %> + <%= number_format(net_sale, precision:precision.to_i,delimiter:delimiter) rescue '-'%> <% end %> diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 7c3f3668..f3cbe471 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -123,7 +123,7 @@ <% end %> -   +   <%= number_format(total_sum, precision: precision.to_i, delimiter: delimiter) rescue '-' %> <%= number_format(discount_amt, precision: precision.to_i, delimiter: delimiter) rescue '-' %> <% @tax_profiles.each do |tax| %> @@ -139,7 +139,7 @@ -   +   <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/receipt_no/index.xls.erb b/app/views/reports/receipt_no/index.xls.erb index c88c57a9..715baa9b 100755 --- a/app/views/reports/receipt_no/index.xls.erb +++ b/app/views/reports/receipt_no/index.xls.erb @@ -91,7 +91,7 @@ <% end %> -   +   <%= number_format(total_sum, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> <%= number_format(discount_amt, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> <% @tax_profiles.each do |tax| %> @@ -106,7 +106,7 @@ <%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> -   +   <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/void_sale/index.xls.erb b/app/views/reports/void_sale/index.xls.erb index 587ca509..25806ff8 100755 --- a/app/views/reports/void_sale/index.xls.erb +++ b/app/views/reports/void_sale/index.xls.erb @@ -19,19 +19,19 @@ <% end %> <% if @shift_from %> - <% if @shift %> + <% if @shift %> <% cashier_name = !@shift.nil? ? @shift[0].employee.name : '-' %> - <% end %> + <% end %> <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from rescue '-'%> - <%= @shift_to rescue '-'%> ( <%= cashier_name rescue '-'%> ) - <% end %> + <% end %> <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.sale_date") %> <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> <%= t("views.right_panel.detail.grand_total") %> <%= t("views.right_panel.detail.rnd_adj_sh") %> - <%= t("views.right_panel.detail.grand_total") %> +
<%= t("views.right_panel.detail.rnd_adj_sh") %> + <%= t("views.right_panel.detail.grand_total") %> +
<%= t("views.right_panel.detail.rnd_adj_sh") %> @@ -48,7 +48,7 @@ <%= item.total_amount.to_f rescue '-'%> <%= item.grand_total.to_f rescue '-'%> <%= item.rounding_adjustment.to_f rescue '-' %> - <%= item.grand_total.to_f + item.rounding_adjustment.to_f rescue '-'%> + <%= item.grand_total.to_f + item.rounding_adjustment.to_f rescue '-'%> @@ -63,7 +63,7 @@ <%= total_amount rescue '-' %> <%= grand_total rescue '-' %> <%= rounding_adjustment rescue '-'%> - <%= grand_rounding_adjustment rescue '-'%> + <%= grand_rounding_adjustment rescue '-'%> @@ -71,4 +71,4 @@ - \ No newline at end of file + From 143b509efef4fb6c53af62693101bcf38a9d3853 Mon Sep 17 00:00:00 2001 From: Zin Moe Date: Wed, 29 Jul 2020 16:26:35 +0630 Subject: [PATCH 06/12] modify call waiter --- app/assets/javascripts/channels/call_waiter.js | 13 ++++++------- app/controllers/api/call_waiters_controller.rb | 17 ++++++++--------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/channels/call_waiter.js b/app/assets/javascripts/channels/call_waiter.js index 512b2602..012ed9bd 100644 --- a/app/assets/javascripts/channels/call_waiter.js +++ b/app/assets/javascripts/channels/call_waiter.js @@ -1,12 +1,12 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { -// App.messages = App.cable.subscriptions.create('MessagesChannel', { +// App.messages = App.cable.subscriptions.create('MessagesChannel', { connected: function() {}, disconnected: function() {}, - received: function(data) { - + received: function(data) { + var hostname = location.hostname.trim(); if(data.from == "" || hostname == data.from) { @@ -19,7 +19,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { class_name = ".shift_" + data.shift_ids; } } - var element = "#notify-wrapper" + class_name; + var element = "#notify-wrapper"; // + class_name; var animateEnter = ""; var animateExit = ""; if (time == 'print_error') { @@ -35,10 +35,10 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { var text = " Calling Waiter
"+table.name ; style ="width:180px !important;" } - + if (text != null || colorName != null){ - showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit); + showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit); } function showNotification(element, colorName, text, placementFrom, placementAlign, animateEnter, animateExit) { @@ -79,4 +79,3 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { } } }); - diff --git a/app/controllers/api/call_waiters_controller.rb b/app/controllers/api/call_waiters_controller.rb index 5beba9a6..beb676c7 100644 --- a/app/controllers/api/call_waiters_controller.rb +++ b/app/controllers/api/call_waiters_controller.rb @@ -1,5 +1,4 @@ -class Api::CallWaitersController < ActionController::API - +class Api::CallWaitersController < Api::ApiController #List all active customers by name def index @table_id = params[:dining_id] @@ -18,17 +17,17 @@ class Api::CallWaitersController < ActionController::API # CallWaiterJob.perform_later(@table,@time) if ENV["SERVER_MODE"] == 'cloud' from = request.subdomain + "." + request.domain - else + else from = "" - end - ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time,from: from, shift_ids: shift_ids + end + ActionCable.server.broadcast "call_waiter_channel",table: @table,time:@time,from: from, shift_ids: shift_ids # get printer info - @shop = Shop.current_shop - unique_code = "CallWaiterPdf" + @shop = Shop.current_shop + unique_code = "CallWaiterPdf" print_settings = PrintSetting.find_by_unique_code(unique_code) - printer = Printer::ReceiptPrinter.new(print_settings) + printer = Printer::ReceiptPrinter.new(print_settings) printer.print_call_waiter(print_settings,@table,@time,@shop) end - + end From eed465eab14a1292af00d85763ab3219a6df2783 Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Wed, 29 Jul 2020 18:22:53 +0630 Subject: [PATCH 07/12] fixed report gift-voucher paymentmethod --- app/models/sale.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/sale.rb b/app/models/sale.rb index 8ded4b4e..30a8fcc5 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -755,7 +755,7 @@ class Sale < ApplicationRecord payment_methods = SalePayment.where.not(payment_method: ['cash', 'creditnote', 'foc']).distinct.pluck(:payment_method) sales = select(Sale.column_names) - .select("#{payment_methods.map { |method| "SUM(case when (sale_payments.payment_method='#{method}') then sale_payments.payment_amount else 0 end) as #{method == 'paypar' ? 'redeem' : method}"}.push('').join(', ')} + .select("#{payment_methods.map { |method| "SUM(case when (sale_payments.payment_method='#{method}') then sale_payments.payment_amount else 0 end) as `#{method == 'paypar' ? 'redeem' : method}`"}.push('').join(', ')} SUM(case when (sale_payments.payment_method='cash') then sale_payments.payment_amount else 0 end) as cash_amount, SUM(case when (sale_payments.payment_method='creditnote') then sale_payments.payment_amount else 0 end) - SUM(case when (sale_payments.payment_method not in('creditnote') and sale_audits.sale_audit_id IS NOT NULL) then sale_payments.payment_amount else 0 end) as credit_amount, @@ -776,7 +776,7 @@ class Sale < ApplicationRecord (IFNULL(SUM(case when (sale_status='completed') then grand_total else 0 end),0)) - (IFNULL(SUM(case when (sale_status='completed') then grand_total else 0 end),0) / 21) as net_sale, (IFNULL(SUM(case when (sale_status='completed') then grand_total else 0 end),0)) + (IFNULL(SUM(case when (sale_status='completed') then total_discount else 0 end),0)) as gross_sale, CAST((CONVERT_TZ(receipt_date,'+00:00','+06:30')) AS DATE) as sale_date, - #{payment_methods.map { |method| pm = method == 'paypar' ? 'redeem' : method; "SUM(#{pm}) as #{pm}"}.push('').join(', ')} + #{payment_methods.map { |method| pm = method == 'paypar' ? 'redeem' : method; "SUM(`#{pm}`) as `#{pm}`"}.push('').join(', ')} SUM(cash_amount) as cash_amount, SUM(credit_amount) as credit_amount, SUM(foc_amount) as foc_amount From b622bf7bf23d811b9f5234c6473c59ae2b98b192 Mon Sep 17 00:00:00 2001 From: Zin Moe Date: Thu, 30 Jul 2020 10:37:37 +0630 Subject: [PATCH 08/12] uncomment class_name in call_waiter.js --- app/assets/javascripts/channels/call_waiter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/channels/call_waiter.js b/app/assets/javascripts/channels/call_waiter.js index 012ed9bd..59401aeb 100644 --- a/app/assets/javascripts/channels/call_waiter.js +++ b/app/assets/javascripts/channels/call_waiter.js @@ -19,7 +19,7 @@ App.call_waiter = App.cable.subscriptions.create('CallWaiterChannel', { class_name = ".shift_" + data.shift_ids; } } - var element = "#notify-wrapper"; // + class_name; + var element = "#notify-wrapper"+ class_name; var animateEnter = ""; var animateExit = ""; if (time == 'print_error') { From 32ec0055bf72e37f912e06356c7d838b847e8050 Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Thu, 30 Jul 2020 11:09:50 +0630 Subject: [PATCH 09/12] remove bottom title row in receipt no report xls --- app/views/reports/receipt_no/index.xls.erb | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/app/views/reports/receipt_no/index.xls.erb b/app/views/reports/receipt_no/index.xls.erb index 715baa9b..a83b3357 100755 --- a/app/views/reports/receipt_no/index.xls.erb +++ b/app/views/reports/receipt_no/index.xls.erb @@ -90,6 +90,7 @@ <%= number_format(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %> <% end %> +   <%= number_format(total_sum, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> @@ -105,22 +106,6 @@ <%= number_format(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> <%= number_format(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> - -   - <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %> - <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> - - <% @tax_profiles.each do |tax| %> - <%= tax.name %> - <% end %> - <%= t("views.right_panel.detail.grand_total") %> - <%= t("views.right_panel.detail.rnd_adj_sh") %> - <%= t("views.right_panel.detail.grand_total") %> +
- <%= t("views.right_panel.detail.rnd_adj_sh") %> - - - - <%end%> From 7d9c2379ae8c78ff14852b48e701a0bf495ff5d6 Mon Sep 17 00:00:00 2001 From: NyanLinHtut Date: Thu, 30 Jul 2020 12:03:23 +0630 Subject: [PATCH 10/12] fixed shiftsale print --- app/models/shift_sale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/shift_sale.rb b/app/models/shift_sale.rb index daffd8cf..bbc7cc20 100755 --- a/app/models/shift_sale.rb +++ b/app/models/shift_sale.rb @@ -154,7 +154,7 @@ class ShiftSale < ApplicationRecord shift_other_payments = Sale.select("sales.sale_id,sale_payments.payment_method as name") if payment_methods.present? - shift_other_payments = shift_other_payments.select("#{payment_methods.map { |method| "SUM(case when (sale_payments.payment_method='#{method}') then sale_payments.payment_amount else 0 end) as #{method == 'paypar' ? 'redeem' : method}"}.join(', ')}") + shift_other_payments = shift_other_payments.select("#{payment_methods.map { |method| "SUM(case when (sale_payments.payment_method='#{method}') then sale_payments.payment_amount else 0 end) as `#{method == 'paypar' ? 'redeem' : method}`"}.join(', ')}") end shift_other_payments.select("SUM(case when (sale_payments.payment_method='foc') then (sale_payments.payment_amount) else 0 end) as foc_amount") .joins("join sale_payments on sale_payments.sale_id = sales.sale_id") From 05ffd6cbb5c6bfcaab8baf9993c99e0f0360b4ef Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Thu, 30 Jul 2020 13:06:04 +0630 Subject: [PATCH 11/12] remove name from cashier/customer title --- app/views/crm/customers/show.html.erb | 2 +- app/views/origami/credit_sales/show.html.erb | 4 +- app/views/origami/home/index.html.erb | 4 +- app/views/origami/home/show.html.erb | 6 +- app/views/origami/orders/show.html.erb | 32 +- .../pending_order/completed_sale.html.erb | 4 +- .../pending_order/credit_sale.html.erb | 4 +- .../origami/pending_order/index.html.erb | 4 +- app/views/origami/pending_order/show.html.erb | 4 +- app/views/origami/rooms/show.html.erb | 4 +- app/views/origami/sales/show.html.erb | 4 +- app/views/origami/shifts/show.html.erb | 10 +- .../_shift_sale_report_filter.html.erb | 2 +- .../reports/credit_payment/index.html.erb | 13 +- .../reports/credit_payment/index.xls.erb | 13 +- .../reports/payment_method/index.html.erb | 2 +- .../reports/payment_method/index.xls.erb | 2 +- .../_shift_sale_report_filter.html.erb | 2 +- app/views/reports/receipt_no/index.html.erb | 2 +- .../_shift_sale_report_filter.html.erb | 2 +- .../reports/receipt_no_detail/index.html.erb | 5 +- .../reports/receipt_no_detail/index.xls.erb | 8 +- .../reports/saleitem/indexbackup.html.erb | 354 ------------------ app/views/reports/shiftsale/index.html.erb | 2 +- app/views/reports/shiftsale/index.xls.erb | 2 +- .../transactions/bookings/indexback.html.erb | 59 --- .../transactions/credit_notes/index.html.erb | 2 +- .../transactions/sales/indexback.html.erb | 59 --- .../shift_sales/indexback.html.erb | 59 --- 29 files changed, 67 insertions(+), 603 deletions(-) delete mode 100644 app/views/reports/saleitem/indexbackup.html.erb delete mode 100755 app/views/transactions/bookings/indexback.html.erb delete mode 100755 app/views/transactions/sales/indexback.html.erb delete mode 100755 app/views/transactions/shift_sales/indexback.html.erb diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index 646cd06a..fd9de2ba 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -217,7 +217,7 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/credit_sales/show.html.erb b/app/views/origami/credit_sales/show.html.erb index c286fb65..4858e00b 100755 --- a/app/views/origami/credit_sales/show.html.erb +++ b/app/views/origami/credit_sales/show.html.erb @@ -181,8 +181,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index a583e659..013e087e 100755 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -159,8 +159,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index c6bdfca3..5e94f364 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -178,8 +178,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> @@ -380,7 +380,7 @@ <% end %>
<%if !@webview && @changable_tax %> <% if @current_user.role == 'cashier' %> - + <% else %> <% end %> diff --git a/app/views/origami/orders/show.html.erb b/app/views/origami/orders/show.html.erb index b3b9ae51..73683562 100755 --- a/app/views/origami/orders/show.html.erb +++ b/app/views/origami/orders/show.html.erb @@ -45,9 +45,9 @@ <% if table.get_booking.nil? %> <% if table.get_checkout_booking.nil? %>
- <% else %> + <% else %>
- <% end %> + <% end %>
<%= table.name %>
<%= table.zone.name %> @@ -55,12 +55,12 @@
- <% else %> + <% else %> <% if table.get_checkout_booking.nil? %>
- <% else %> + <% else %>
- <% end %> + <% end %>
<%= table.name %>
<%= table.zone.name %> @@ -108,7 +108,7 @@
<%= room.name %>
<%= room.zone.name %> - +
<% end %> @@ -167,8 +167,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> @@ -224,10 +224,10 @@ <%= sale_item.item_name %> - <% if !sale_item.set_menu_items.nil? - sale_item.set_menu_items.each do |item_instance| %> -
<%= item_instance %> - <% end + <% if !sale_item.set_menu_items.nil? + sale_item.set_menu_items.each do |item_instance| %> +
<%= item_instance %> + <% end end %> <%= sale_item.qty %> @@ -316,11 +316,11 @@ $.ajax({ type: "POST", url: '/origami/sale/'+ sale_id + "/rounding_adj", - success:function(result){ + success:function(result){ window.location.href = '/origami/sale/'+ sale_id + "/payment"; } }); - + }); $('#back').on('click',function(){ window.location.href = '/origami/'; @@ -362,7 +362,7 @@ booking_id = booking[0].booking_id; } var cashier_type = "cashier"; - + var ajax_url = "/origami/split_bills"; $.ajax({ type: "POST", @@ -383,7 +383,7 @@ window.location.href = '/origami/room/' + dining_id; } } - + } } }); diff --git a/app/views/origami/pending_order/completed_sale.html.erb b/app/views/origami/pending_order/completed_sale.html.erb index a90c8d8f..69666372 100644 --- a/app/views/origami/pending_order/completed_sale.html.erb +++ b/app/views/origami/pending_order/completed_sale.html.erb @@ -73,8 +73,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/pending_order/credit_sale.html.erb b/app/views/origami/pending_order/credit_sale.html.erb index f8fd7ceb..9d7b42f9 100644 --- a/app/views/origami/pending_order/credit_sale.html.erb +++ b/app/views/origami/pending_order/credit_sale.html.erb @@ -70,8 +70,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/pending_order/index.html.erb b/app/views/origami/pending_order/index.html.erb index fe8ba72f..0bcbbad5 100644 --- a/app/views/origami/pending_order/index.html.erb +++ b/app/views/origami/pending_order/index.html.erb @@ -74,8 +74,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/pending_order/show.html.erb b/app/views/origami/pending_order/show.html.erb index 9ad89797..84d8fdfe 100644 --- a/app/views/origami/pending_order/show.html.erb +++ b/app/views/origami/pending_order/show.html.erb @@ -72,8 +72,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/rooms/show.html.erb b/app/views/origami/rooms/show.html.erb index dd0b84e6..082f91f5 100755 --- a/app/views/origami/rooms/show.html.erb +++ b/app/views/origami/rooms/show.html.erb @@ -199,8 +199,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb index cc033f9b..00f7ae60 100755 --- a/app/views/origami/sales/show.html.erb +++ b/app/views/origami/sales/show.html.erb @@ -188,8 +188,8 @@ <%= t :credit %> <%= t :sale %> <%= t("views.right_panel.detail.date") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> diff --git a/app/views/origami/shifts/show.html.erb b/app/views/origami/shifts/show.html.erb index ec529e8c..88f8545c 100755 --- a/app/views/origami/shifts/show.html.erb +++ b/app/views/origami/shifts/show.html.erb @@ -13,7 +13,7 @@ <%= @shift.shift_started_at.utc.getlocal.strftime("%d/%m/%Y - %I:%M %p") rescue '-' %> - <%= t :cashier_name %> + <%= t :cashier %> <%= @shift.employee.name rescue ''%> @@ -45,8 +45,8 @@
- +
diff --git a/app/views/reports/credit_payment/index.html.erb b/app/views/reports/credit_payment/index.html.erb index 0ecfb3ab..5ec8a167 100755 --- a/app/views/reports/credit_payment/index.html.erb +++ b/app/views/reports/credit_payment/index.html.erb @@ -36,14 +36,13 @@ <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.order_source") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> - <%= t :credit %> <%= t :payment %>
- <%= t("views.right_panel.detail.shift_name") %> - <%= t :credit %> <%= t("views.right_panel.detail.receipt_date") %> - <%= t :credit %> <%= t :payment %>
<%= t :cashier_name %> - <%= t :credit %> <%= t :payment %> <%= t("views.right_panel.detail.amount") %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.shift_name") %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.receipt_date") %> + <%= t :credit_payment %>
<%= t :cashier %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/credit_payment/index.xls.erb b/app/views/reports/credit_payment/index.xls.erb index e765af67..6dd15e55 100755 --- a/app/views/reports/credit_payment/index.xls.erb +++ b/app/views/reports/credit_payment/index.xls.erb @@ -20,14 +20,13 @@ <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.order_source") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> + <%= t :customer %> <%= t("views.right_panel.detail.credit_amount") %> - <%= t :credit %> <%= t :payment %>
- <%= t("views.right_panel.detail.shift_name") %> - <%= t :credit %> <%= t("views.right_panel.detail.receipt_date") %> - <%= t :credit %> <%= t :payment %>
<%= t :cashier_name %> - <%= t :credit %> <%= t :payment %> <%= t("views.right_panel.detail.amount") %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.shift_name") %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.receipt_date") %> + <%= t :credit_payment %>
<%= t :cashier %> + <%= t :credit_payment %>
<%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/payment_method/index.html.erb b/app/views/reports/payment_method/index.html.erb index 93f7be28..12473647 100755 --- a/app/views/reports/payment_method/index.html.erb +++ b/app/views/reports/payment_method/index.html.erb @@ -80,7 +80,7 @@ <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t :payment_method %> <%= t :customer %> <%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/payment_method/index.xls.erb b/app/views/reports/payment_method/index.xls.erb index ec4dfbee..31befff3 100755 --- a/app/views/reports/payment_method/index.xls.erb +++ b/app/views/reports/payment_method/index.xls.erb @@ -66,7 +66,7 @@ <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.receipt_no") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t :payment_method %> <%= t :customer %> <%= t("views.right_panel.detail.amount") %> diff --git a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb index 96a6d4b8..07a9e357 100755 --- a/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb +++ b/app/views/reports/receipt_no/_shift_sale_report_filter.html.erb @@ -20,7 +20,7 @@
- +
diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index f3cbe471..ec5022e2 100755 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -37,7 +37,7 @@ <% if @shift_data.employee %> <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> <% end %> - <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> ) + <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> ) <% end %> diff --git a/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb b/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb index 56daeb30..44c48e6f 100755 --- a/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb +++ b/app/views/reports/receipt_no_detail/_shift_sale_report_filter.html.erb @@ -20,7 +20,7 @@
- +
diff --git a/app/views/reports/receipt_no_detail/index.html.erb b/app/views/reports/receipt_no_detail/index.html.erb index aa2de25a..e168b93e 100755 --- a/app/views/reports/receipt_no_detail/index.html.erb +++ b/app/views/reports/receipt_no_detail/index.html.erb @@ -37,7 +37,7 @@ <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.receipt_date") %> <%= t("views.right_panel.detail.shift_name") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t("views.right_panel.detail.table") %> <%= t("views.right_panel.detail.revenue") %>   @@ -181,8 +181,8 @@   <% end %> +   <% end %> - <% end %>   @@ -192,7 +192,6 @@ Total Nett - <%= number_format(grand_total, precision: precision, delimiter: delimiter, strip_insignificant_zeros: strip_insignificant_zeros) %>   - diff --git a/app/views/reports/receipt_no_detail/index.xls.erb b/app/views/reports/receipt_no_detail/index.xls.erb index 6d64ff9c..478a9285 100755 --- a/app/views/reports/receipt_no_detail/index.xls.erb +++ b/app/views/reports/receipt_no_detail/index.xls.erb @@ -28,7 +28,7 @@ <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.receipt_date") %> <%= t("views.right_panel.detail.shift_name") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t("views.right_panel.detail.table") %> <%= t("views.right_panel.detail.revenue") %>   @@ -75,7 +75,7 @@ <% end %> -   +   <%survey = Survey.find_by_receipt_no(result.receipt_no)%> <% if !survey.nil?%> @@ -173,8 +173,8 @@   <% end %> +   <% end %> - <% end %>   @@ -184,10 +184,8 @@ Total Nett - <%= grand_total %>   - - diff --git a/app/views/reports/saleitem/indexbackup.html.erb b/app/views/reports/saleitem/indexbackup.html.erb deleted file mode 100644 index 54e10304..00000000 --- a/app/views/reports/saleitem/indexbackup.html.erb +++ /dev/null @@ -1,354 +0,0 @@ - -
-
- <%= render :partial=>'shift_sale_report_filter', - :locals=>{ :period_type => true, :shift_name => true, :report_path =>reports_saleitem_index_path} %> - -
- - - -
-
-
- - - - - - <% if @shift_from %> - - <% if @shift_data.employee %> - <% cashier_name = !@shift_data.nil? ? @shift_data.employee.name : '-' %> - <% end %> - - - <% end %> - - - - - - - - - - - - <% unless @sale_data.blank? %> - <% acc_arr = Array.new %> - <% cate_arr = Array.new %> - - <% sub_qty = 0 %> - <% sub_total = 0 %> - <% other_sub_total = 0 %> - <% count = 0 %> - <% total_price = 0 %> - <% cate_count = 0 %> - <% acc_count = 0 %> - <% grand_total = 0 %> - <% total_qty = 0 %> - <% total_amount = 0 %> - <% discount = 0 %> - <% total_item_foc = 0 %> - <% total_item_dis = 0.0 %> - <% total_tax = 0 %> - - <% @sale_data.each do |sale| %> - - <% if sale.status_type != "Discount" && sale.status_type != "foc" - total_qty += sale.total_item - end %> - <% if sale.status_type == "foc" && sale.price > 0 - total_qty += sale.total_item - end %> - - <% if sale.status_type == "foc" && sale.grand_total < 0 - total_item_foc += sale.grand_total*(-1) - end %> - - <% if sale.status_type == "Discount" && sale.grand_total < 0 - total_item_dis += sale.grand_total*(-1) - end %> - - <% if !acc_arr.include?(sale.account_id) %> - - - - - - - <% acc_arr.push(sale.account_id) %> - <% end %> - - - <% if !cate_arr.include?(sale.menu_category_id) %> - - <% cate_arr.push(sale.menu_category_id) %> - <% else %> - - <% end %> - - - - - - - - - <% @menu_cate_count.each do |key,value| %> - <% if sale.account_id == key %> - <% count = count + 1 %> - <% sub_total += sale.grand_total %> - <% #sub_qty += sale.total_item %> - <% if sale.status_type!="Discount" && (!sale.product_name.include? "FOC") - sub_qty += sale.total_item - end %> - - <% if count == value %> - - - - - - - - <% sub_total = 0.0%> - <% sub_qty = 0 %> - <% count = 0%> - <% end %> - <% end %> - <% end %> - - <% end %> - - <% if @other_charges.present? %> - - - - - - <% @other_charges.each do |other| %> - <% if other.total_item > 0 - total_qty += other.total_item - end %> - <% grand_total +=other.grand_total%> - - - - - - - - - - - - <% other_sub_total += other.grand_total %> - - <% end %> - - - - - - <%end%> - - - - - - - - - <% end %> - - - - - - - - - - - - - - - - - - - - - - - <% @sale_taxes.each do |tax| %> - - <% end %> - - - - - - - - -
<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%>
<%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> )
 <%= t("views.right_panel.header.menu_category") %><%= t("views.right_panel.detail.code") %><%= t("views.right_panel.detail.product") %><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.item") %><%= t("views.right_panel.detail.unit_price") %><%= t("views.right_panel.detail.revenue") %>
<%= sale.account_name %> <%= t("views.right_panel.detail.total_price_by") %> <%= sale.account_name %> - <% @totalByAccount.each do |account, total| %> - <% if sale.account_id == account %> - <%= number_format(total, precision:precision.to_i,delimiter:delimiter) %> - <% grand_total += total %> - <% end %> - <% end %> -
 <%= sale.menu_category_name %> <%= sale.item_code rescue '-' %><%= sale.product_name rescue '-' %><%= sale.total_item rescue '-' %><%= number_format(sale.unit_price , precision:precision.to_i,delimiter:delimiter) rescue '-'%><%= number_format(sale.grand_total , precision:precision.to_i,delimiter:delimiter) rescue '-'%>
 Total <%= sale.account_name %> Qty <%= sub_qty %><%= t("views.right_panel.detail.sub_total") %><%= number_format(sub_total , precision:precision.to_i,delimiter:delimiter)%>
Other Charges 
 Other Charges<%= other.item_code rescue '-' %><%= other.product_name rescue '-' %><%= other.total_item rescue '-' %> <%= number_format(other.unit_price , precision:precision.to_i,delimiter:delimiter) rescue '-'%> <%= number_format(other.grand_total , precision:precision.to_i,delimiter:delimiter) rescue '-'%>
 <%= t("views.right_panel.detail.sub_total") %><%= number_format(other_sub_total , precision:precision.to_i,delimiter:delimiter)%>
 <%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.item") %><%= total_qty%><%= t("views.right_panel.detail.total") %> <%= t("views.right_panel.detail.amount") %><%= number_format(grand_total , precision:precision.to_i,delimiter:delimiter)%>
 <%= t("views.right_panel.detail.foc_item") %> <%= t("views.right_panel.detail.amount") %><%= number_format(total_item_foc , precision:precision.to_i,delimiter:delimiter) %>
 <%= t("views.right_panel.detail.item_discount") %> <%= t("views.right_panel.detail.amount") %><%= number_format(total_item_dis , precision:precision.to_i,delimiter:delimiter) %>
 <%= t("views.right_panel.detail.foc_sales") %> - <%= number_format(@foc_data, precision:precision.to_i, delimiter:delimiter) %> -
 <%= t("views.right_panel.detail.discount") %> <%= t("views.right_panel.detail.amount") %> - - <%= number_format(@discount_data , precision: precision.to_i,delimiter: delimiter) %> - -
 Net Amount<%= number_format(grand_total.to_f - @discount_data.to_f , precision:precision.to_i,delimiter:delimiter)%>
-
-
-
-
-
- - diff --git a/app/views/reports/shiftsale/index.html.erb b/app/views/reports/shiftsale/index.html.erb index 5fb10c71..c96b3406 100755 --- a/app/views/reports/shiftsale/index.html.erb +++ b/app/views/reports/shiftsale/index.html.erb @@ -48,7 +48,7 @@ <% end %> <%= t("views.right_panel.detail.cashier_station") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.cash_payment") %> diff --git a/app/views/reports/shiftsale/index.xls.erb b/app/views/reports/shiftsale/index.xls.erb index 46fe502d..4d886560 100755 --- a/app/views/reports/shiftsale/index.xls.erb +++ b/app/views/reports/shiftsale/index.xls.erb @@ -32,7 +32,7 @@ <% end %> <%= t("views.right_panel.detail.cashier_station") %> - <%= t :cashier %> <%= t("views.right_panel.detail.name") %> + <%= t :cashier %> <%= t("views.right_panel.detail.shift_name") %> <%= t("views.right_panel.detail.cash_payment") %> diff --git a/app/views/transactions/bookings/indexback.html.erb b/app/views/transactions/bookings/indexback.html.erb deleted file mode 100755 index fe8c820a..00000000 --- a/app/views/transactions/bookings/indexback.html.erb +++ /dev/null @@ -1,59 +0,0 @@ -

<%= notice %>

- -

<%= t("views.right_panel.header.transactions_sales") %>

- - - - - - - - - - - - - - - - - - - - - - - - - - - <% @transactions_sales.each do |transactions_sale| %> - - - - - - - - - - - - - - - - - - - - - - - <% end %> - -
<%= 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_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?' } %>
- -
- -<%= link_to 'New Transactions Sale', new_transactions_sale_path %> diff --git a/app/views/transactions/credit_notes/index.html.erb b/app/views/transactions/credit_notes/index.html.erb index f533a1f7..210a4f91 100755 --- a/app/views/transactions/credit_notes/index.html.erb +++ b/app/views/transactions/credit_notes/index.html.erb @@ -95,7 +95,7 @@ <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.credit_amount") %> <%= t :cashier %> - <%= t :customer %> <%= t("views.right_panel.detail.name") %> + <%= t :customer %> <%= t("views.right_panel.detail.order_source") %> <%= t("views.right_panel.detail.receipt_date") %> diff --git a/app/views/transactions/sales/indexback.html.erb b/app/views/transactions/sales/indexback.html.erb deleted file mode 100755 index fe8c820a..00000000 --- a/app/views/transactions/sales/indexback.html.erb +++ /dev/null @@ -1,59 +0,0 @@ -

<%= notice %>

- -

<%= t("views.right_panel.header.transactions_sales") %>

- - - - - - - - - - - - - - - - - - - - - - - - - - - <% @transactions_sales.each do |transactions_sale| %> - - - - - - - - - - - - - - - - - - - - - - - <% end %> - -
<%= 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_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?' } %>
- -
- -<%= link_to 'New Transactions Sale', new_transactions_sale_path %> diff --git a/app/views/transactions/shift_sales/indexback.html.erb b/app/views/transactions/shift_sales/indexback.html.erb deleted file mode 100755 index fe8c820a..00000000 --- a/app/views/transactions/shift_sales/indexback.html.erb +++ /dev/null @@ -1,59 +0,0 @@ -

<%= notice %>

- -

<%= t("views.right_panel.header.transactions_sales") %>

- - - - - - - - - - - - - - - - - - - - - - - - - - - <% @transactions_sales.each do |transactions_sale| %> - - - - - - - - - - - - - - - - - - - - - - - <% end %> - -
<%= 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_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?' } %>
- -
- -<%= link_to 'New Transactions Sale', new_transactions_sale_path %> From ffb8e560316d39102610e1c5d9d964411486cf76 Mon Sep 17 00:00:00 2001 From: Thein Lin Kyaw Date: Tue, 4 Aug 2020 10:43:27 +0630 Subject: [PATCH 12/12] sale edit prevent multiple action --- app/views/origami/sale_edit/edit.html.erb | 418 ++++++++++------------ 1 file changed, 196 insertions(+), 222 deletions(-) diff --git a/app/views/origami/sale_edit/edit.html.erb b/app/views/origami/sale_edit/edit.html.erb index 66aaf379..7cf321bc 100755 --- a/app/views/origami/sale_edit/edit.html.erb +++ b/app/views/origami/sale_edit/edit.html.erb @@ -88,7 +88,7 @@ --> <% else %> @@ -147,15 +147,15 @@
Nett
Del
Clr
- - - + + + -->
- +
@@ -180,231 +180,205 @@ - +