diff --git a/app/models/order_queue_station.rb b/app/models/order_queue_station.rb index bac229a9..bd2e85ca 100644 --- a/app/models/order_queue_station.rb +++ b/app/models/order_queue_station.rb @@ -46,9 +46,10 @@ class OrderQueueStation < ApplicationRecord # Auto Printing # ToDo per item per printer if oqs.auto_print && is_auto_printed == false - puts oqs_order_items.length - print_slip(oqs, order, oqs_order_items) - is_auto_printed = true + if oqs_order_items.length > 0 + print_slip(oqs, order, oqs_order_items) + is_auto_printed = true + end end end end diff --git a/db/seeds.rb b/db/seeds.rb index a00fd48f..64192b19 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.3, 23 street', township:"Yankin",state:"Yangon",city:"Yangon", country:"Myanmar", phone_no:"09 99988888, 0912374734",reservation_no:"111",license:"123", +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", 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"})