diff --git a/app/controllers/origami/request_bills_controller.rb b/app/controllers/origami/request_bills_controller.rb index 5239d121..e848366c 100644 --- a/app/controllers/origami/request_bills_controller.rb +++ b/app/controllers/origami/request_bills_controller.rb @@ -8,15 +8,17 @@ class Origami::RequestBillsController < BaseOrigamiController check_booking = Booking.find_by_booking_id(booking_id) if check_booking.sale_id.nil? # Create Sale if it doesn't exist + puts "current_login_employee" + puts current_login_employee.name @status, @sale_id = @sale.generate_invoice_from_booking(check_booking.id,current_login_employee) @sale_data = Sale.find_by_sale_id(@sale_id) - @sale_items = SaleItem.where("sale_id=?",@sale_id) + @sale_items = SaleItem.where("sale_id=?",@sale_id) else @sale_data = Sale.find_by_sale_id(check_booking.sale_id) @sale_items = SaleItem.where("sale_id=?",@sale_data.sale_id) end - unique_code = "ReceiptBillPdf" + unique_code = "ReceiptBillPdf" customer= Customer.where('customer_id=' + @sale_data.customer_id) # get printer info @@ -28,10 +30,8 @@ class Origami::RequestBillsController < BaseOrigamiController # Calculate Food and Beverage Total food_total, beverage_total = SaleItem.calculate_food_beverage(@sale_items) - printer = Printer::ReceiptPrinter.new(print_settings) + printer = Printer::ReceiptPrinter.new(print_settings) printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, food_total, beverage_total) redirect_to origami_path(@sale_data.sale_id) end end - - diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index 7ccd8fb8..c74c34f6 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -44,7 +44,7 @@ <% if @crm_customers.count > 0 %> <% @crm_customers.each do |crm_customer| %> - + <% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %> @@ -55,7 +55,7 @@ <%= link_to 'Show', crm_customer_path(crm_customer) %> - + <% end %> <% end %> <%else%>

There are no record for your search

@@ -103,12 +103,12 @@
- <%= f.text_field :date_of_birth,:class=>"form-control datepicker"%> + <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
- <% Lookup.where("lookup_type = ?", "member_group_type" ).each do |member| %> diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 9f109497..340bc307 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -45,7 +45,7 @@ <% if @crm_customers.count > 0 %> <% @crm_customers.each do |crm_customer| %> - + <% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %> @@ -56,7 +56,7 @@ - + <% end %> <% end %> <%else%>

There are no record for your search

@@ -106,7 +106,7 @@
- <%= f.text_field :date_of_birth,:class=>"form-control datepicker"%> + <%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>