+
@@ -53,7 +66,7 @@
<%= @sale.receipt_no %> |
<%= @sale.cashier_name rescue '-' %> |
<%= @sale.sale_status %> |
-
<%= @sale.requested_at.strftime("%d-%m-%Y") %> |
+
<%= @sale.requested_at %> |
| Sale item name |
@@ -82,12 +95,13 @@
Discount |
<%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%> |
+ <% @sale.sale_taxes.each do |r|%>
|
- Tax |
- <%= number_with_precision(@sale.total_tax, :precision => 2, :delimiter => ',') rescue ' '%> |
+ <%= r.tax_name %> |
+ <%= number_with_precision(r.tax_payable_amount, :precision => 2, :delimiter => ',') rescue ' '%> |
-
+ <% end %>
|
Grand Total |
@@ -99,21 +113,24 @@
Pay Amount |
<%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%> |
-
- |
- Change |
- <%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%> |
-
+
<% @sale_receivables.each do |r|%>
|
Payment <%= r.payment_method rescue ' '%> |
<%= number_with_precision(r.payment_amount, :precision => 2, :delimiter => ',') rescue ' '%>
|
-
-
+
+
<% end %>
+
+
+ |
+ Change |
+ <%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%> |
+
+
@@ -160,67 +177,61 @@
-
-
-
-
- |
-
-
- Customer Details |
- |
- |
-
-
- |
- Name |
- <%= @customer.name %> |
-
-
- |
- Email |
- <%= @customer.email %> |
-
-
- |
- Contact no |
- <%= @customer.contact_no %> |
-
-
- |
- Company |
- <%= @customer.company rescue '-' %> |
-
-
- |
- Date Of Birth |
- <%= @customer.date_of_birth rescue '-' %> |
-
-
- Membership Details |
- |
- |
-
- <% if @membership == 0 %>
-
- | "There is no membership data" |
-
- <% else %>
- <% @membership.each do |member| %>
-
- |
- <%= member["accountable_type"] %> |
- <%= member["balance"] %> |
-
- <% end %>
-
- <% end %>
-
-
-
-
-
-
+
+
+
+
Customer Profile
+
+
+
+
+ | Name |
+ <%= @customer.name %> |
+
+
+ | Email |
+ <%= @customer.email %> |
+
+
+ | Contact no |
+ <%= @customer.contact_no %> |
+
+
+ | Company |
+ <%= @customer.company %> |
+
+
+ | Date Of Birth |
+ <%= @customer.date_of_birth %> |
+
+
+
+
+
+
+
+
Membership Detail
+
+
+
+ <% if @membership == 0 %>
+
+ | "There is no membership data" |
+
+ <% else %>
+ <% @membership.each do |member| %>
+
+ | <%= member["accountable_type"] %> |
+ <%= member["balance"] %> |
+
+ <% end %>
+
+ <% end %>
+
+
+
+
+
@@ -228,20 +239,19 @@
-
+
+
-->
diff --git a/config/routes.rb b/config/routes.rb
index fc21337a..19b07979 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -83,7 +83,7 @@ Rails.application.routes.draw do
post "/:id/discount" => "discounts#create"
get "/:id/request_bills" => "request_bills#print"
-
+ get '/:sale_id/reprint' => 'payments#reprint' ,:defaults => { :format => 'json' }
#--------- Payment ------------#
get 'sale/:sale_id/payment' => 'payments#show'
@@ -199,9 +199,9 @@ Rails.application.routes.draw do
resources :sales
resources :orders
- get "/sales/:sale_id/manual_complete_sale" =>"sales#manual_complete_sale", :as => "manual_complete_sale"
- get "/sales/:sale_id/void" =>"sales#void", :as => "void"
- post "sales/:sale_id/manual_void_sale", to: "sales#manual_void_sale", :as => "manual_void_sale"
+ get "/sales/:sale_id/manual_complete_sale" =>"manual_sales#manual_complete_sale", :as => "manual_complete_sale"
+ get "/sales/:sale_id/void" =>"manual_sales#void", :as => "void"
+ post "sales/:sale_id/manual_void_sale", to: "manual_sales#manual_void_sale", :as => "manual_void_sale"
end
#--------- Reports Controller Sections ------------#
diff --git a/db/migrate/20170403151731_create_order_queue_stations.rb b/db/migrate/20170403151731_create_order_queue_stations.rb
index 6ad93bb1..6c327b8e 100644
--- a/db/migrate/20170403151731_create_order_queue_stations.rb
+++ b/db/migrate/20170403151731_create_order_queue_stations.rb
@@ -9,6 +9,7 @@ class CreateOrderQueueStations < ActiveRecord::Migration[5.1]
t.integer :font_size, :null => false, :default => 10
t.boolean :cut_per_item, :null => false, :default => false
t.boolean :use_alternate_name, :null => false, :default => false
+ t.boolean :auto_print, :null => false, :default => false
t.string :created_by, :null => false
t.timestamps
end
diff --git a/db/seeds.rb b/db/seeds.rb
index f6323d48..07e5746c 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -147,10 +147,11 @@ admin_employee = Employee.create({name: "Waiter", role: "waiter", password: "111
admin_employee = Employee.create({name: "Waiter 2", role: "waiter", password: "22222", emp_id:"222", created_by: "SYSTEM DEFAULT"})
admin_employee = Employee.create({name: "Cashier", role: "cashier", password: "33333", emp_id:"333", created_by: "SYSTEM DEFAULT"})
-order_station1=PrintSetting.create({name: "OrderItemPdf", unique_code: "OrderItemPdf", printer_name: "EPSON-TM-T82-S-A"})
-order_station2=PrintSetting.create({name: "Order Summary", unique_code: "OrderSummaryPdf", printer_name: "EPSON-TM-T82-S-A"})
+# order_station1=PrintSetting.create({name: "OrderItemPdf", unique_code: "OrderItemPdf", printer_name: "EPSON-TM-T82-S-A"})
+# order_station2=PrintSetting.create({name: "Order Summary", unique_code: "OrderSummaryPdf", printer_name: "EPSON-TM-T82-S-A"})
request_bill_printer=PrintSetting.create({name: "Receipt Bill", unique_code: "ReceiptBillPdf", printer_name: "EPSON-TM-T82-S-A"})
crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrderPdf", printer_name: "EPSON-TM-T82-S-A"})
+queue_no_printer=PrintSetting.create({name: "Queue No", unique_code: "QueueNoPdf", printer_name: "EPSON-TM-T82-S-A"})
member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})
@@ -163,10 +164,10 @@ member_actions= MembershipAction.create([{membership_type:"get_account_balance",
{membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}
])
-payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http//192.168.1.47:3006"})
-payment_methods = PaymentMethodSetting.create({payment_method:"VISA",gateway_url: "http//192.168.1.47:3006"})
-payment_methods = PaymentMethodSetting.create({payment_method:"JCB",gateway_url: "http//192.168.1.47:3006"})
-payment_methods = PaymentMethodSetting.create({payment_method:"Master",gateway_url: "http//192.168.1.47:3006"})
+payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http://192.168.1.47:3006"})
+payment_methods = PaymentMethodSetting.create({payment_method:"VISA",gateway_url: "http://192.168.1.47:3006"})
+payment_methods = PaymentMethodSetting.create({payment_method:"JCB",gateway_url: "http://192.168.1.47:3006"})
+payment_methods = PaymentMethodSetting.create({payment_method:"Master",gateway_url: "http://192.168.1.47:3006"})
payment_methods = PaymentMethodSetting.create({payment_method:"Redeem",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"})
puts " Finished System Default Set Up Data "