diff --git a/app/pdf/receipt_bill_pdf.rb b/app/pdf/receipt_bill_pdf.rb index a2b726c9..2dca6d16 100644 --- a/app/pdf/receipt_bill_pdf.rb +++ b/app/pdf/receipt_bill_pdf.rb @@ -3,7 +3,7 @@ class ReceiptBillPdf < Prawn::Document attr_accessor :label_width,:price_column_width,:page_width, :page_height, :margin, :price_width, :item_width, :header_font_size, :item_font_size,:item_height,:qty_width,:total_width,:item_description_width, :description_width, :price_num_width def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status) self.page_width = 210 - self.page_height = 7000 + self.page_height = 1450 self.margin = 5 self.price_width = 40 self.qty_width = 20 diff --git a/db/migrate/20170622050926_create_customers.rb b/db/migrate/20170622050926_create_customers.rb index 20ced7b0..28f38e15 100644 --- a/db/migrate/20170622050926_create_customers.rb +++ b/db/migrate/20170622050926_create_customers.rb @@ -16,6 +16,8 @@ class CreateCustomers < ActiveRecord::Migration[5.1] t.string :membership_id t.string :membership_type t.string :membership_authentication_code + t.string :customer_type, default => "Dinein" + t.json :tax_profiles end end end diff --git a/db/seeds.rb b/db/seeds.rb index 065b447c..4e39275d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -87,11 +87,17 @@ void_reason = Lookup.create([{lookup_type:'void_reason', name: 'Approve By Manag {lookup_type:'void_reason', name: 'Cashier Mistake', value: 'Cashier Mistake'}, {lookup_type:'void_reason', name: 'Waiter Mistake', value: 'Waiter Mistake'}]) - # sale void reason - float_value = Lookup.create([{lookup_type:'float_value', name: '500', value: '500'}, - {lookup_type:'float_value', name: '1000', value: '1000'}, - {lookup_type:'float_value', name: '5000', value: '5000'}, - {lookup_type:'float_value', name: '10000', value: '10000'}]) +# sale void reason +float_value = Lookup.create([{lookup_type:'float_value', name: '500', value: '500'}, + {lookup_type:'float_value', name: '1000', value: '1000'}, + {lookup_type:'float_value', name: '5000', value: '5000'}, + {lookup_type:'float_value', name: '10000', value: '10000'}]) + +# customer type +customer_type = Lookup.create([{lookup_type:'float_value', name: '500', value: '500'}, + {lookup_type:'float_value', name: '1000', value: '1000'}, + {lookup_type:'float_value', name: '5000', value: '5000'}, + {lookup_type:'float_value', name: '10000', value: '10000'}]) #WALK CUSTOMER - Default CUSTOMER (take key 1) customer = Customer.create({name:"WALK-IN", email: "cus1@customer.com", contact_no:"000000000",card_no:"000"})