update print
This commit is contained in:
@@ -34,6 +34,7 @@ class Origami::CustomersController < BaseOrigamiController
|
|||||||
#@crm_customers = Customer.all
|
#@crm_customers = Customer.all
|
||||||
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
@crm_customers = Kaminari.paginate_array(@crm_customers).page(params[:page]).per(50)
|
||||||
@crm_customer = Customer.new
|
@crm_customer = Customer.new
|
||||||
|
@count_customer = Customer.count_customer
|
||||||
|
|
||||||
# if flash["errors"]
|
# if flash["errors"]
|
||||||
# @crm_customer.valid?
|
# @crm_customer.valid?
|
||||||
|
|||||||
@@ -366,10 +366,10 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
y_position = cursor
|
y_position = cursor
|
||||||
bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do
|
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
|
end
|
||||||
bounding_box([self.label_width,y_position], :width =>self.label_width, :height => self.item_height) do
|
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
|
end
|
||||||
|
|
||||||
move_down 5
|
move_down 5
|
||||||
|
|||||||
@@ -47,11 +47,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<% @i = 0 %>
|
<% @i = 0 %>
|
||||||
<% @crm_customers.each do |crm_customer| %>
|
<% @crm_customers.each do |crm_customer| %>
|
||||||
<% if crm_customer.customer_id != "CUS-00001" && crm_customer.customer_id != "CUS-000000000" %>
|
|
||||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||||
<td><%= @i += 1 %></td>
|
<td>
|
||||||
|
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||||
|
<%= @i += 1 %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
<td><%= crm_customer.name %></td>
|
<td><%= crm_customer.name %></td>
|
||||||
<td><%= crm_customer.card_no rescue '-' %></td>
|
<td><%= crm_customer.card_no rescue '-' %></td>
|
||||||
<td><%= crm_customer.contact_no %></td>
|
<td><%= crm_customer.contact_no %></td>
|
||||||
@@ -59,7 +63,7 @@
|
|||||||
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
|
<td><%= link_to 'Show', crm_customer_path(crm_customer) %></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -41,11 +41,15 @@
|
|||||||
<% if @crm_customers.count > 0 %>
|
<% if @crm_customers.count > 0 %>
|
||||||
<% @i = 0 %>
|
<% @i = 0 %>
|
||||||
<% @crm_customers.each do |crm_customer| %>
|
<% @crm_customers.each do |crm_customer| %>
|
||||||
<% if crm_customer.customer_id != "CUS-00000" && crm_customer.customer_id != "CUS-00000000" %>
|
|
||||||
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
<tr class="customer_tr" data-ref="<%= crm_customer.customer_id %>">
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
<input type="radio" style="width:20px;" name="checkbox" class="checkbox_check" ></td>
|
||||||
<td><%= @i += 1 %></td>
|
<td>
|
||||||
|
<% if crm_customer.customer_id != "CUS-000000000001" && crm_customer.customer_id != "CUS-000000000002" %>
|
||||||
|
<%= @i += 1 %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
<td><%= crm_customer.name %></td>
|
<td><%= crm_customer.name %></td>
|
||||||
<td><%= crm_customer.company rescue '-' %></td>
|
<td><%= crm_customer.company rescue '-' %></td>
|
||||||
<td><%= crm_customer.contact_no %></td>
|
<td><%= crm_customer.contact_no %></td>
|
||||||
@@ -54,7 +58,6 @@
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
<%else%>
|
<%else%>
|
||||||
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
<tr><td colspan="5"><p style="text-align:center"><strong>There are no record for your search</strong></p></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -155,10 +158,10 @@
|
|||||||
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
<%= f.input :address, :class => "form-control col-md-6 address" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="form-group">
|
<div class="form-group">
|
||||||
<label>Sr.No</label>
|
<label>Sr.No</label>
|
||||||
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
<input type="text" name="" value="<%=@count_customer%>" class="form-control" readonly="true">
|
||||||
</div> -->
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Date Of Birth</label>
|
<label>Date Of Birth</label>
|
||||||
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
<%= f.text_field :date_of_birth,:value=>"01-01-1990",:class=>"form-control datepicker"%>
|
||||||
|
|||||||
@@ -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_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"})
|
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"})
|
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"})
|
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"})
|
queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf", printer_name: "Cashier", precision: "0", delimiter: "0", heading_space: "5"})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user