diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index 360274fa..37eef687 100644 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -37,7 +37,7 @@ class Origami::RequestBillsController < BaseOrigamiController printer = Printer::ReceiptPrinter.new(print_settings) printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, food_total, beverage_total,member_info) - redirect_to origami_path(@sale_data.sale_id) + # redirect_to origami_path(@sale_data.sale_id) end end diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index 516f5668..bdeb58a3 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -250,14 +250,16 @@ class ReceiptBillPdf < Prawn::Document end move_down 5 end - stroke_horizontal_rule + end # show member information def member_info(member_info,customer_name,rebate_amount,sale_data) if rebate_amount != nil + if rebate_amount["status"] == true + stroke_horizontal_rule rebate_amount["data"].each do |res| if res["receipt_no"]== sale_data.receipt_no && res["status"]== "Rebate" diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index a8f02920..e7b47460 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -28,7 +28,7 @@ - + <% end %> diff --git a/app/views/crm/dining_queues/index.html.erb b/app/views/crm/dining_queues/index.html.erb index 502bcd3f..ac247771 100644 --- a/app/views/crm/dining_queues/index.html.erb +++ b/app/views/crm/dining_queues/index.html.erb @@ -12,20 +12,23 @@
-
+
-
-
-
+
+
+
<% @i =0 %> <% @dining_queues.each do |queue| %>
" data-id="<%= queue.id %>">
- <%= @i += 1 %> . Queue No -

<%= queue.queue_no %>

+ + <%= @i += 1 %> . Queue No +

+ <%= queue.queue_no %> +

diff --git a/app/views/origami/sales/show.html.erb b/app/views/origami/sales/show.html.erb index 81face96..e896a50a 100644 --- a/app/views/origami/sales/show.html.erb +++ b/app/views/origami/sales/show.html.erb @@ -175,7 +175,7 @@
- +
@@ -206,4 +206,10 @@ $('#pay').on('click',function() { $('#back').on('click',function(){ window.location.href = '/origami/'; }) +$('#re-print').click(function() { + var sale_id = $('#sale_id').val(); + window.location.href = '/origami/'+ sale_id + "/reprint" + + return false; + }); diff --git a/config/routes.rb b/config/routes.rb index 90c7b0e8..29c1960e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -89,7 +89,7 @@ Rails.application.routes.draw do get "/:id/discount" => "discounts#index" post "/:id/discount" => "discounts#create" - post "/:id/request_bills" => "request_bills#print" + post "/:id/request_bills" => "request_bills#print" ,:defaults => { :format => 'json' } get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' } #--------- Payment ------------# get 'sale/:sale_id/payment' => 'payments#show'