diff --git a/app/controllers/api/bill_controller.rb b/app/controllers/api/bill_controller.rb index 3e7f8074..0408c858 100644 --- a/app/controllers/api/bill_controller.rb +++ b/app/controllers/api/bill_controller.rb @@ -29,7 +29,12 @@ class Api::BillController < Api::ApiController @sale_items = SaleItem.where("sale_id=?",@sale_id) unique_code = "ReceiptBillPdf" + #shop detail + shop_details = Shop.find(1) + customer= Customer.where('customer_id=' + @sale_data.customer_id) + # get member information + member_info = Customer.get_member_account(customer) # get printer info print_settings=PrintSetting.find_by_unique_code(unique_code) @@ -38,7 +43,7 @@ class Api::BillController < Api::ApiController item_price_by_accounts = SaleItem.calculate_price_by_accounts(@sale_items) printer = Printer::ReceiptPrinter.new(print_settings) - printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts) + printer.print_receipt_bill(print_settings,@sale_items,@sale_data,customer.name, item_price_by_accounts, member_info, shop_details) end diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index 5c4bf7c8..3cf08856 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -55,9 +55,8 @@
- <% puts "'''''''''''''''''''" - puts @response - if @response["status"] == true %> + <% + if @response["data"].present? %> <% if @response["status"] == true %> diff --git a/app/views/reports/daily_sale/index.html.erb b/app/views/reports/daily_sale/index.html.erb index 7c2a8c61..7b790148 100644 --- a/app/views/reports/daily_sale/index.html.erb +++ b/app/views/reports/daily_sale/index.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/reports/daily_sales/index.html.erb b/app/views/reports/daily_sales/index.html.erb index 7c2a8c61..7b790148 100644 --- a/app/views/reports/daily_sales/index.html.erb +++ b/app/views/reports/daily_sales/index.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/reports/receipt_no/index.html.erb b/app/views/reports/receipt_no/index.html.erb index 86307066..dc7d05ee 100644 --- a/app/views/reports/receipt_no/index.html.erb +++ b/app/views/reports/receipt_no/index.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/reports/sale_item/index.html.erb b/app/views/reports/sale_item/index.html.erb index a3b460fc..7b0d6f38 100644 --- a/app/views/reports/sale_item/index.html.erb +++ b/app/views/reports/sale_item/index.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/reports/sale_items/index.html.erb b/app/views/reports/sale_items/index.html.erb index a3b460fc..26ad560e 100644 --- a/app/views/reports/sale_items/index.html.erb +++ b/app/views/reports/sale_items/index.html.erb @@ -1,6 +1,6 @@ @@ -11,13 +11,13 @@
-
+
diff --git a/config/application.rb b/config/application.rb index 0e323d22..5ce0a92a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -13,7 +13,7 @@ module SXRestaurants # -- all .rb files in that directory are automatically loaded. config.active_record.time_zone_aware_types = [:datetime, :time] config.active_job.queue_adapter = :sidekiq - config.time_zone = 'Asia/Rangoon' + # config.time_zone = 'Asia/Rangoon' end end diff --git a/db/seeds.rb b/db/seeds.rb index 64192b19..841495d4 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -131,7 +131,7 @@ menu_item_attribute_size_small = MenuItemAttribute.create({attribute_type:"size" menu_item_attribute_size_medium = MenuItemAttribute.create({attribute_type:"size",name: "Medium", value: "medium"}) menu_item_attribute_size_large = MenuItemAttribute.create({attribute_type:"size", name: "Large", value: "large"}) -shop = Shop.create({id:1, name: "Beauty In the Pot", address:'No.42-A, Sayar San Road', township:"Bahan",state:"Yangon",city:"Yangon", country:"Myanmar", phone_no:"+95(9) 252221188, +95(9) 252221177",reservation_no:"111",license:"123", +shop = Shop.create({id:1, name: "Beauty In the Pot", address:'No.42-A, Sayar San Road, Bahan, Yangon', township:"Bahan",state:"Yangon",city:"Yangon", country:"Myanmar", phone_no:"+95(9) 252221188, +95(9) 252221177",reservation_no:"111",license:"123", activated_at:"2017-06-26 08:36:24",license_data:"test",base_currency:"111",id_prefix:"111"}) #Default Order Queue stations # order_queue_station1 = OrderQueueStation.create({station_name: "Queue Station 1", is_active: true,printer_name: "kitchen_printer", processing_items: JSON.generate(['01001','01002','01003','01004']), print_copy:true, cut_per_item: false, use_alternate_name: false, created_by: "SYSTEM DEFAULT"})
Membership Transactions