diff --git a/app/controllers/origami/customers_controller.rb b/app/controllers/origami/customers_controller.rb index e8376fc4..203e5600 100644 --- a/app/controllers/origami/customers_controller.rb +++ b/app/controllers/origami/customers_controller.rb @@ -34,6 +34,7 @@ class Origami::CustomersController < BaseOrigamiController #@crm_customers = Customer.all @crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50) @crm_customer = Customer.new + @count_customer = Customer.count_customer # if flash["errors"] # @crm_customer.valid? diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index a2f3827b..db913c4a 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -366,10 +366,10 @@ class ReceiptBillPdf < Prawn::Document y_position = cursor bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do - text "#{printed_status}", :size => self.header_font_size,:align => :left + text "#{printed_status}", :size => self.item_font_size,:align => :left end bounding_box([self.label_width,y_position], :width =>self.label_width, :height => self.item_height) do - text "Thank You! See you Again", :left_margin => -10, :size => self.header_font_size,:align => :right + text "Thank You! See you Again", :left_margin => -10, :size => self.item_font_size,:align => :right end move_down 5 diff --git a/app/views/crm/customers/index.html.erb b/app/views/crm/customers/index.html.erb index b3c1fce7..a44aed2f 100644 --- a/app/views/crm/customers/index.html.erb +++ b/app/views/crm/customers/index.html.erb @@ -47,11 +47,15 @@ <% @i = 0 %> <% @crm_customers.each do |crm_customer| %> - <% if crm_customer.customer_id != "CUS-00001" && crm_customer.customer_id != "CUS-000000000" %> + - <%= @i += 1 %> + + <% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %> + <%= @i += 1 %> + <% end %> + <%= crm_customer.name %> <%= crm_customer.card_no rescue '-' %> <%= crm_customer.contact_no %> @@ -59,7 +63,7 @@ <%= link_to 'Show', crm_customer_path(crm_customer) %> - <% end %> + <% end %> diff --git a/app/views/origami/customers/index.html.erb b/app/views/origami/customers/index.html.erb index 489487ab..72e402e8 100644 --- a/app/views/origami/customers/index.html.erb +++ b/app/views/origami/customers/index.html.erb @@ -41,11 +41,15 @@ <% if @crm_customers.count > 0 %> <% @i = 0 %> <% @crm_customers.each do |crm_customer| %> - <% if crm_customer.customer_id != "CUS-00000" && crm_customer.customer_id != "CUS-00000000" %> + - <%= @i += 1 %> + + <% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %> + <%= @i += 1 %> + <% end %> + <%= crm_customer.name %> <%= crm_customer.company rescue '-' %> <%= crm_customer.contact_no %> @@ -53,7 +57,6 @@ - <% end %> <% end %> <%else%>

There are no record for your search

@@ -155,10 +158,10 @@ <%= f.input :address, :class => "form-control col-md-6 address" %> - +
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%> diff --git a/db/seeds.rb b/db/seeds.rb index b71418a9..3bff75a0 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -159,6 +159,7 @@ admin_employee = Employee.create({name: "Cashier", role: "cashier", password: "3 order_station1=PrintSetting.create({name: "OrderItemPdf", unique_code: "OrderItemPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"}) order_station2=PrintSetting.create({name: "Order Summary", unique_code: "OrderSummaryPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"}) request_bill_printer=PrintSetting.create({name: "Receipt Bill", unique_code: "ReceiptBillPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"}) +close_cashier_printer=PrintSetting.create({name: "Close Cashier", unique_code: "CloseCashierPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"}) crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrderPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"}) queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"})