diff --git a/README.md b/README.md index 6ccf5e80..a020ba48 100755 --- a/README.md +++ b/README.md @@ -82,6 +82,17 @@ For ReceiptBillA5Pdf For ReceiptBillAltName options 1) settings/lookups => { type:print_settings, name:ReceiptBillAltName, value:1 } +For Using Star Printer + *** Need to change these print settings + 1) settings/print_settings => OrderItemStarPdf + 2) settings/print_settings => ReceiptBillStarPdf + 3) settings/print_settings => SaleItemsStarPdf + *** Other print settings aren't need to change. + +For Sale Items Summary Include at CloseCashierPrint + 1) settings/print_settings + a) Check => Shift Sale Items + For Bank Integration setting 1) rake db:migrate for card_sale_trans, card_settle_trans 2) settings/lookups => { type:bank_integration, name: Bank Integration, value:1 } diff --git a/app/assets/images/online_order_icon.png b/app/assets/images/online_order_icon.png new file mode 100644 index 00000000..b9e74994 Binary files /dev/null and b/app/assets/images/online_order_icon.png differ diff --git a/app/assets/images/user_icon.png b/app/assets/images/user_icon.png new file mode 100644 index 00000000..a977c32e Binary files /dev/null and b/app/assets/images/user_icon.png differ diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 409b5c84..68cf44d7 100755 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -37,7 +37,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',$('.oqs_click').val()); var url = 'oqs/get_items/'+$('.oqs_click').val(); - + show_details(url,null); } @@ -49,11 +49,11 @@ $(document).on('turbolinks:load', function() { $(".tables").on("click", function(){ active = $(this).hasClass('selected-table'); - if (active) { + if (active) { $(this).removeClass('bg-blue'); $(this).addClass('green'); $(this).removeClass('selected-table'); - }else{ + }else{ $(this).removeClass('green'); $(this).addClass('bg-blue'); $(this).addClass('selected-table'); @@ -63,7 +63,7 @@ $(document).on('turbolinks:load', function() { var table_id =[]; for (i = 0; i < list.length; i++) { table_id.push(list[i].value); - } + } console.log(table_id) $('#table').val(table_id); @@ -75,7 +75,7 @@ $(document).on('turbolinks:load', function() { }else{ var table = null } - + if (oqs_id > 0 || status != "All" || table != null) { $(".oqs_click").removeClass('oqs_active'); $(".queue_station").removeClass('queue_station_box'); @@ -86,7 +86,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -95,7 +95,7 @@ $(document).on('turbolinks:load', function() { }); // $(".oqs_click").on("click", function(){ - $(document).on('change', '.oqs_click', function(event){ + $(document).on('change', '.oqs_click', function(event){ oqs_id = $(this).val(); status = $("#status").val(); var table_id = $('#table_id').val(); @@ -104,7 +104,7 @@ $(document).on('turbolinks:load', function() { }else{ var table = null } - + if (oqs_id > 0 || status != "All" || table_id != null) { $(".oqs_click").removeClass('oqs_active'); $(".queue_station").removeClass('queue_station_box'); @@ -115,7 +115,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -124,7 +124,7 @@ $(document).on('turbolinks:load', function() { }); //End Click // $(".status_click").on("click", function(){ - $(document).on('change', '.status_click', function(event){ + $(document).on('change', '.status_click', function(event){ oqs_id = $("#oqs_id").val(); status = $(this).val(); var table_id = $('#table_id').val(); @@ -144,7 +144,7 @@ $(document).on('turbolinks:load', function() { // oqs_id = $(this).find(".oqs-id").text(); $("#oqs_active").attr('data-id',oqs_id); var url = 'oqs/get_items/'+oqs_id; - + show_details(url,table,status); }else{ $("#completed").removeClass('hide') @@ -152,17 +152,17 @@ $(document).on('turbolinks:load', function() { } }); //End Click - - function show_details(url,table_id,status){ + + function show_details(url,table_id,status){ console.log(table_id) var oqs_append = $('.oqs_append'); oqs_append.empty(); var filter = $('.filter').text(); - + //Start Ajax - $.ajax({ - type: "GET", - url: url, + $.ajax({ + type: "GET", + url: url, data: {'filter':filter,'table_id':table_id,'status':status}, dataType: "json", success: function(data) { @@ -175,7 +175,7 @@ $(document).on('turbolinks:load', function() { var options = data[field]["options"]; } - var date = new Date(data[field]["created_at"]); + var date = new Date(data[field]["created_at"]); // var show_date = date.getDate() + "-" + (date.getMonth()+1) + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes(); var show_date =date.getHours()+ ':' + date.getMinutes() +' '+(date.getHours() >= 12 ? 'PM' : 'AM'); var set_menu_items = data[field]["set_menu_items"]; @@ -193,7 +193,7 @@ $(document).on('turbolinks:load', function() { table_type = data[field]["table_type"] +'-'+data[field]["zone"] }else{ table_type = "No Table" - + } var delivery_status = '' if (data[field]["delivery_status"] == true) { @@ -235,24 +235,24 @@ $(document).on('turbolinks:load', function() { +'' +'' - +''; - + +''; + $('.oqs_append').append(row); - } + } } }); - //end Ajax + //end Ajax } - $(document).on('click', '.queue_station', function(event){ + $(document).on('click', '.queue_station', function(event){ $('#print_order_item').removeAttr("disabled",""); $('#print_order_summary').removeAttr("disabled",""); - var orderNo = $(this).attr('data-order-no'); + var orderNo = $(this).attr('data-order-no'); var orderZone=$(this).children().children().children('.order-zone').text().trim(); var orderZoneType=$(this).children().children().children('.order-zone-type').text().trim(); // var orderItem=$(this).children().children().children('.order-item').text(); var assigned_item_id = $(this).children().find(".assigned-order-item").text(); - var orderQty = $(this).children().children().children('.order-qty').text(); + var orderQty = $(this).children().children().children('.order-qty').text(); var orderBy = $(this).children().children().children().children('.order-by').text(); var orderAt = $(this).children().children().children().children('.order-at').text(); var orderCustomer = $(this).children().children('.order-customer').text(); @@ -272,10 +272,10 @@ $(document).on('turbolinks:load', function() { data: { 'status' : order_status }, success: function(res){ // console.log(res); - for (i = 0; i < res["items"].length; i++) { - var data = JSON.stringify(res["items"][i]); - var parse_data = JSON.parse(data); - var assigned_order_items = []; + for (i = 0; i < res["items"].length; i++) { + var data = JSON.stringify(res["items"][i]); + var parse_data = JSON.parse(data); + var assigned_order_items = []; var assigned_order_item_id = ''; if(res["assigned_order_items"]!= undefined && res["assigned_order_items"]!=''){ assigned_order_items = JSON.parse(JSON.stringify(res["assigned_order_items"])); @@ -286,7 +286,7 @@ $(document).on('turbolinks:load', function() { }); } // console.log(assigned_order_item_id); - + var set_menu_items = parse_data.set_menu_items; var set_instance_items = ""; if(set_menu_items!=null){ @@ -309,16 +309,16 @@ $(document).on('turbolinks:load', function() { "" + parse_data.qty + "" + ""; } - + }else{ var order_item_row = "" + "" + parse_data.item_name + set_instance_items + "" + "" + parse_data.qty + "" + ""; } - + $("#oqs-order-details-table").children("tbody").append(order_item_row); - } + } } }) @@ -329,21 +329,21 @@ $(document).on('turbolinks:load', function() { $(this).addClass('selected-item'); }); - $(document).on('click', '.order-item-edit', function(event){ + $(document).on('click', '.order-item-edit', function(event){ var _self = $(this); // To know in ajax return var assigned_item_id=$(this).attr('id').substr(5); window.location.href = '/oqs/'+ assigned_item_id + "/edit/oqs"; }); // complete for queue item - - $(document).on('click', '.order-complete', function(event){ + + $(document).on('click', '.order-complete', function(event){ //e.preventDefault(); var _self = $(this); // To know in ajax return var assigned_item_id=$(this).attr('id').substr(15); var params = { 'id':assigned_item_id }; - - // Call update_delivery_status() for changed delivery and move to delivery + + // Call update_delivery_status() for changed delivery and move to delivery $.ajax({ type: 'POST', url: '/oqs/update_delivery', @@ -383,7 +383,7 @@ $(document).on('turbolinks:load', function() { } else { window.location.href = "/origami/room/" + table_id - } + } }); // Page reload location.reload(); @@ -392,7 +392,7 @@ $(document).on('turbolinks:load', function() { }); // Print Order Item - $(document).on('click', '#print_order_item', function(event){ + $(document).on('click', '#print_order_item', function(event){ $(this).attr("disabled","disabled"); var assigned_item_id = $('.selected-item').children('.card-block').children('.assigned-order-item').text(); var options = $('.selected-item').children('.card-block').find('.item-options').text(); diff --git a/app/assets/stylesheets/BSBMaterial/style.css b/app/assets/stylesheets/BSBMaterial/style.css index ed00c5f5..a4620cf5 100755 --- a/app/assets/stylesheets/BSBMaterial/style.css +++ b/app/assets/stylesheets/BSBMaterial/style.css @@ -2323,7 +2323,7 @@ @media (max-width: 767px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { - margin-left: 35px; + margin-left: 15px; width: 73%; } .navbar .navbar-header { display: inline-block; @@ -8054,4 +8054,3 @@ html.ie11 .dropdown-menu ul.menu li a { html.ie11 .bs-searchbox .form-control { width: 90%; } - diff --git a/app/assets/stylesheets/CRM.scss b/app/assets/stylesheets/CRM.scss index de416831..ae2de4d8 100755 --- a/app/assets/stylesheets/CRM.scss +++ b/app/assets/stylesheets/CRM.scss @@ -69,11 +69,11 @@ z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -92,7 +92,7 @@ #videoElement { width: 480px; height: 375px; - + } .cashier_number{ @@ -243,7 +243,7 @@ i.logout_icon{ span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -268,4 +268,79 @@ i.logout_icon{ font-size: 14px; color: #FFFFFF; } -/*customer modal UI */ \ No newline at end of file +/*customer modal UI */ + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100% !important; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } + + .mbl_card{ + width: 100% !important; + } + + .mbl_lbl{ + display: none; + } + + .mbl-style{ + padding: 10px 10px; + } + + .m-auto{ + width: 33%; + } + + .online_order{ + text-align: right; + } + + .mbl-right-btn{ + text-align: right; + } +} diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss index 6a97bdcb..3e49913d 100755 --- a/app/assets/stylesheets/OQS.scss +++ b/app/assets/stylesheets/OQS.scss @@ -120,4 +120,79 @@ i.logout_icon{ .table-width{ width: 100%; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100% !important; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } + + .mbl_card{ + width: 100% !important; + } + + .mbl_lbl{ + display: none; + } + + .mbl-style{ + padding: 10px 10px; + } + + .m-auto{ + width: 33%; + } + + .online_order{ + text-align: right; + } + + .mbl-right-btn{ + text-align: right; + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b1718ee2..5b0c6845 100755 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -119,9 +119,108 @@ i.logout_icon{ margin-right: 15px; color:#fff !important; # background-color: green !important; -} +} .payment-btn-box { - width: 130px; + width: 130px; height: 50px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + #setting{ display: none;} + .menu-up{ display: none;} + .card-btn{padding: 0px 35px;} +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100% !important; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } + + .mbl_card{ + width: 100% !important; + } + + .mbl_lbl{ + display: none; + } + + .mbl-style{ + padding: 10px 10px; + } + + .m-auto{ + width: 33%; + } + + .online_order{ + text-align: right; + } + + .mbl-right-btn{ + text-align: right; + } + + .mbl-table{ + display: block; + overflow: scroll; + } + + .mbl-table-card{ + overflow: scroll; + display: inline-block; + } + + .p-l-15{ + padding: 0px 10px; + } + + #order_by{ + width: 100% !important; + } +} diff --git a/app/assets/stylesheets/inventory_definitions.scss b/app/assets/stylesheets/inventory_definitions.scss index aa02f08d..d134fbd7 100755 --- a/app/assets/stylesheets/inventory_definitions.scss +++ b/app/assets/stylesheets/inventory_definitions.scss @@ -279,4 +279,79 @@ tr.discount-item-row:hover { i.logout_icon{ position: relative; top: 5px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100% !important; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } + + .mbl_card{ + width: 100% !important; + } + + .mbl_lbl{ + display: none; + } + + .mbl-style{ + padding: 10px 10px; + } + + .m-auto{ + width: 33%; + } + + .online_order{ + text-align: right; + } + + .mbl-right-btn{ + text-align: right; + } +} diff --git a/app/assets/stylesheets/login.scss b/app/assets/stylesheets/login.scss index f156d4d3..b9a3f0df 100755 --- a/app/assets/stylesheets/login.scss +++ b/app/assets/stylesheets/login.scss @@ -22,7 +22,7 @@ display: block; width: 100%; text-align: center; - color: #000; + color: #000; margin-top: -5px; } @@ -117,4 +117,14 @@ .box { margin : 0 -60px 0 -60px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + .login_pwd{width: 90%;} + .login_ent{width: 10%;} + // .card-btn{padding: 0px 35px;} + // .nav-tabs{padding: 0px 44px;} + .box{margin: unset;} + .mbl-btn-usrgp{width: 48%;} + +} diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 2558d846..6bbce5a3 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -62,8 +62,8 @@ select.form-control { /* .order-info { - min-height:300px; - max-height:500px; + min-height:300px; + max-height:500px; overflow:auto } */ @@ -222,7 +222,7 @@ select.form-control { margin-right: 15px; color:#fff !important; # background-color: green !important; -} +} /* Reciept Style */ #order-charges-table td { @@ -336,11 +336,11 @@ tr.discount-item-row:hover { z-index: 1100; } -#sxModal-Content { +#sxModal-Content { position: relative; left: 42%; top: 30%; - background-color: #32ad1a; + background-color: #32ad1a; color: #fff; text-align: center; width: 200px; @@ -373,7 +373,7 @@ tr.discount-item-row:hover { opacity: 1; filter: alpha(opacity=100); /* ie */ -moz-opacity: 1; /* mozilla */ - + } /* For Payment Page */ @@ -465,7 +465,7 @@ iframe { } .tax-btn-box { - width: 230px; + width: 230px; height: 80px; } @@ -518,12 +518,12 @@ nav.pagination .page a:hover, opacity: 1; z-index: 101; filter: alpha(opacity=100); /* ie */ - -moz-opacity: 1; /* mozilla */ + -moz-opacity: 1; /* mozilla */ } .existing_invoice{ background-color:#ffab51; color:#fff; - + } @@ -628,7 +628,7 @@ nav.pagination .page a:hover, span.round-tab:hover{ color: white; border: 1px solid #fff; - background-color:#2196F3; + background-color:#2196F3; } .wizard .nav-tabs > li { width: 25%; @@ -656,6 +656,81 @@ nav.pagination .page a:hover, /*customer modal UI */ .payment-btn-box { - width: 130px; + width: 130px; height: 50px; -} \ No newline at end of file +} + +@media screen and (max-width: 785px) { + section.content{ + margin: 80px 15px 0 225px; + } + + .mbl_view{ + display: none; + } + + .navbar-brand-txt{ + margin-top: -15px; + } + + .toggle_mbl { + text-align: right; + } + + .toggle_mbl img{ + width: 24px; + margin-bottom: 14px; + } + + .toggle_mbl a:hover, a:focus{ + background-color: unset; + } + + .col-mbl-view{ + width: 50%; + } + + .info-box .icon{ + display: none; + } + + .mbl_product_div{ + display: none; + } + + .sidebar .menu{ + top: 10px; + } + + .page-header{ + width: 100% !important; + } + + .ls-closed .bars:after, .ls-closed .bars:before{ + top: 14px; + } + + .mbl_card{ + width: 100% !important; + } + + .mbl_lbl{ + display: none; + } + + .mbl-style{ + padding: 10px 10px; + } + + .m-auto{ + width: 33%; + } + + .online_order{ + text-align: right; + } + + .mbl-right-btn{ + text-align: right; + } +} diff --git a/app/controllers/api/orders_controller.rb b/app/controllers/api/orders_controller.rb index c893bb64..aab34b42 100755 --- a/app/controllers/api/orders_controller.rb +++ b/app/controllers/api/orders_controller.rb @@ -47,8 +47,12 @@ class Api::OrdersController < Api::ApiController # end @shop = Shop.first + puts "Hello world" + puts @shop.to_json + return @shop.to_json end + # Description # This API allow new order creation # Input Params diff --git a/app/controllers/oqs/print_controller.rb b/app/controllers/oqs/print_controller.rb index 6a59025e..abf20018 100755 --- a/app/controllers/oqs/print_controller.rb +++ b/app/controllers/oqs/print_controller.rb @@ -5,12 +5,14 @@ class Oqs::PrintController < ApplicationController # if ENV["SERVER_MODE"] != "cloud" #no print in cloud server order_slim_pdf = Lookup.collection_of("print_settings") #print_settings with name:OrderSlimPdf printer = PrintSetting.all - unique_code="OrderItemPdf" + unique_code="OrderItemStarPdf" if !order_slim_pdf.empty? if !printer.empty? printer.each do |printer_setting| - if printer_setting.unique_code == 'OrderItemPdf' + if printer_setting.unique_code == 'OrderItemPdf' unique_code="OrderItemPdf" + elsif printer_setting.unique_code == 'OrderItemStarPdf' + unique_code="OrderItemStarPdf" elsif printer_setting.unique_code == 'OrderItemSlimPdf' unique_code="OrderItemSlimPdf" elsif printer_setting.unique_code == 'OrderSetItemPdf' @@ -18,17 +20,17 @@ class Oqs::PrintController < ApplicationController elsif printer_setting.unique_code == 'OrderItemCustomisePdf' unique_code="OrderItemCustomisePdf" elsif printer_setting.unique_code == 'OrderSetItemCustomisePdf' - unique_code="OrderSetItemCustomisePdf" + unique_code="OrderSetItemCustomisePdf" elsif printer_setting.unique_code == 'OrderItemSlimCustomisePdf' unique_code="OrderItemSlimCustomisePdf" - end + end end end end assigned_item_id = params[:id] options = params[:options] - assigned_item = AssignedOrderItem.find(assigned_item_id) + assigned_item = AssignedOrderItem.find(assigned_item_id) assigned_items = AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'") # order queue stations @@ -38,28 +40,28 @@ class Oqs::PrintController < ApplicationController # Check Printed print_status = assigned_item.print_status == true ? " (Re-Print)" : "" - # print when complete click + # print when complete click print_settings = PrintSetting.find_by_unique_code(unique_code) order_queue_printer = Printer::OrderQueuePrinter.new(print_settings) filename, receipt_no, cashier_printer = order_queue_printer.print_order_item(print_settings,oqs, assigned_item.order_id, order_item.order_items_id, print_status, "", options ) - + # update print status for completed same order items assigned_items.each do |ai| ai.print_status=true - ai.save + ai.save end - # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) + # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) if ENV["SERVER_MODE"] == "cloud" - result = { - :filepath => filename, - :printer_model => print_settings.brand_name, - :printer_url => print_settings.api_settings + result = { + :filepath => filename, + :printer_model => print_settings.brand_name, + :printer_url => print_settings.api_settings } # Mobile Print - render :json => result.to_json + render :json => result.to_json end - # end + # end end # Print Order Details with booking id @@ -71,7 +73,7 @@ class Oqs::PrintController < ApplicationController if !order_slim_pdf.empty? if !printer.empty? printer.each do |printer_setting| - if printer_setting.unique_code == 'OrderSummaryPdf' + if printer_setting.unique_code == 'OrderSummaryPdf' unique_code="OrderSummaryPdf" elsif printer_setting.unique_code == 'OrderSummarySlimPdf' unique_code="OrderSummarySlimPdf" @@ -80,17 +82,17 @@ class Oqs::PrintController < ApplicationController elsif printer_setting.unique_code == 'OrderSummaryCustomisePdf' unique_code="OrderSummaryCustomisePdf" elsif printer_setting.unique_code == 'OrderSummarySetCustomisePdf' - unique_code="OrderSummarySetCustomisePdf" + unique_code="OrderSummarySetCustomisePdf" elsif printer_setting.unique_code == 'OrderSummarySlimCustomisePdf' unique_code="OrderSummarySlimCustomisePdf" - end + end end end end - + assigned_item_id = params[:id] table_name = params[:table_name] - assigned_item = AssignedOrderItem.find(assigned_item_id) + assigned_item = AssignedOrderItem.find(assigned_item_id) assigned_items = AssignedOrderItem.where("item_code='" + assigned_item.item_code + "' AND " + "order_id='" + assigned_item.order_id + "'"); # order queue stations @@ -105,8 +107,8 @@ class Oqs::PrintController < ApplicationController # Get Booking ID booking_id = BookingOrder.where("order_id='#{assigned_item.order_id}'").pluck(:booking_id)[0] - - # print when complete click + + # print when complete click print_settings = PrintSetting.find_by_unique_code(unique_code) order_queue_printer = Printer::OrderQueuePrinter.new(print_settings) filename, receipt_no, cashier_printer = order_queue_printer.print_booking_summary(print_settings,oqs, booking_id, print_status) @@ -114,20 +116,20 @@ class Oqs::PrintController < ApplicationController # update print status for completed same order items assigned_items.each do |ai| ai.print_status = true - ai.save + ai.save end - # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) + # filename, receipt_no, cashier_printer = printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_detail, "Frt",current_balance,nil,other_amount) if ENV["SERVER_MODE"] == "cloud" - result = { - :filepath => filename, - :printer_model => print_settings.brand_name, - :printer_url => print_settings.api_settings + result = { + :filepath => filename, + :printer_model => print_settings.brand_name, + :printer_url => print_settings.api_settings } # Mobile Print - render :json => result.to_json + render :json => result.to_json end - # end + # end end -end \ No newline at end of file +end diff --git a/app/controllers/reports/dailysale_controller.rb b/app/controllers/reports/dailysale_controller.rb index 838536a7..6fb7fe3f 100755 --- a/app/controllers/reports/dailysale_controller.rb +++ b/app/controllers/reports/dailysale_controller.rb @@ -1,6 +1,6 @@ class Reports::DailysaleController < BaseReportController authorize_resource :class => false - + def index from, to = get_date_range_from_params @sale_data = Sale.daily_sales_list(from,to) @@ -16,9 +16,9 @@ class Reports::DailysaleController < BaseReportController format.xls end end - + def show - + end - + end diff --git a/app/controllers/reports/saleitem_controller.rb b/app/controllers/reports/saleitem_controller.rb index b12b45d7..80d206ce 100755 --- a/app/controllers/reports/saleitem_controller.rb +++ b/app/controllers/reports/saleitem_controller.rb @@ -1,7 +1,7 @@ class Reports::SaleitemController < BaseReportController authorize_resource :class => false def index - + @account = Account.all from, to = get_date_range_from_params @@ -13,7 +13,7 @@ class Reports::SaleitemController < BaseReportController shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED) shift_sale = ShiftSale.find(params[:shift_name]) - if to.blank? + if to.blank? shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at) else if shift_sale.shift_closed_at.blank? @@ -43,7 +43,7 @@ class Reports::SaleitemController < BaseReportController @from = from @to = to - + # get printer info @print_settings = PrintSetting.get_precision_delimiter() @@ -80,38 +80,61 @@ class Reports::SaleitemController < BaseReportController # @sale_data.each {|acc| @totalByAccount[acc.account_id] += acc.grand_total} out = {:status => 'ok', :message => date_arr} - + respond_to do |format| format.json { render json: out } end end def print_sale_items - type = params[:type] - account = params[:account] - from_date = to_date = '-' - if !params[:from].nil? - from_date = Date.parse(params[:from]) - end - if !params[:to].nil? - to_date = Date.parse(params[:to]) - end + from, to = get_date_range_from_params - shift = params[:shift_name] - shift_name = "All Shifts" - if shift.to_i > 0 - shift_name = params[:shift_from].to_s+" - ".to_s+params[:shift_to].to_s - end + shift_sale_range = '' - period_name = get_period_name(params[:period]) + shift = '' + shift_name = 'All Shift' + if params[:shift_name].to_i != 0 + + shift_sale_range = Sale.get_by_shift_sale_by_item(from,to,Sale::SALE_STATUS_COMPLETED) + + shift_sale = ShiftSale.find(params[:shift_name]) + if to.blank? + shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL ',shift_sale.shift_started_at) + else + if shift_sale.shift_closed_at.blank? + shift = ShiftSale.where('shift_started_at = ? and shift_closed_at is NULL',shift_sale.shift_started_at) + else + shift = ShiftSale.where('shift_started_at = ? and shift_closed_at = ? ',shift_sale.shift_started_at, shift_sale.shift_closed_at) + end + end + + sh_name = "#{shift_sale.shift_started_at.utc.getlocal.strftime('%d %B %l:%M%p')} - #{shift_sale.shift_closed_at.utc.getlocal.strftime('%d %B %l:%M%p')}" + employee = Employee.find(shift_sale.employee_id) + shift_name = employee.nil? ? sh_name : "#{sh_name} (#{employee.name})" + end shop_details = shop_detail + account_type = params[:account_type] + @type = params[:period_type] + period_name = get_period_name(params[:period]) + @sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_shift_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type) + # get printer info - print_settings = PrintSetting.find_by_unique_code('CloseCashierPdf') # SaleItemsPdf - printer = Printer::CashierStationPrinter.new(print_settings) + print_settings = PrintSetting.find_by_unique_code('SaleItemsPdf') # SaleItemsPdf + print_settings_star = PrintSetting.find_by_unique_code('SaleItemsStarPdf') + + if print_settings.nil? + if !print_settings_star.nil? + printer = Printer::CashierStationPrinter.new(print_settings_star) + printer.print_sale_items_report(print_settings_star, shop_details, period_name, @type, account_type, from, to, shift_name, @sale_data) + end + else + printer = Printer::CashierStationPrinter.new(print_settings) + printer.print_sale_items_report(print_settings, shop_details, period_name, @type, account_type, from, to, shift_name, @sale_data) + end + - printer.print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, params[:sale_items], params[:menu_cate_count]) respond_to do |format| format.html { redirect_to '/en/reports/saleitem/', notice: 'Printing Completed.'} @@ -131,31 +154,31 @@ class Reports::SaleitemController < BaseReportController when PERIOD["this_week"] period_name = "This Week" - + when PERIOD["last_week"] period_name = "Last Week" - + when PERIOD["last_7"] period_name = "Last 7 days" - + when PERIOD["this_month"] period_name = "This Month" - + when PERIOD["last_month"] period_name = "Last Month" - + when PERIOD["last_30"] period_name = "Last 30 Days" - + when PERIOD["this_year"] period_name = "This Year" - + when PERIOD["last_year"] period_name = "Last Year" - + end end return period_name end - + end diff --git a/app/controllers/reports/shiftsale_controller.rb b/app/controllers/reports/shiftsale_controller.rb index 27645d83..0a969ca0 100755 --- a/app/controllers/reports/shiftsale_controller.rb +++ b/app/controllers/reports/shiftsale_controller.rb @@ -52,14 +52,11 @@ class Reports::ShiftsaleController < BaseReportController shift_id = params[:id] @shift = ShiftSale.find_by_id(shift_id) shift_obj = ShiftSale.where('id =?',shift_id) - puts "shift obj!!!!!" - puts shift_obj.to_json + if ENV["SERVER_MODE"] != "cloud" #no print in cloud server close_cashier_pdf = Lookup.collection_of("print_settings") - puts "close !!!!" - puts close_cashier_pdf unique_code = "CloseCashierPdf" diff --git a/app/models/print_setting.rb b/app/models/print_setting.rb index c1a17c5a..5af8994a 100755 --- a/app/models/print_setting.rb +++ b/app/models/print_setting.rb @@ -5,9 +5,14 @@ class PrintSetting < ApplicationRecord def self.get_precision_delimiter setting = PrintSetting.find_by_unique_code("CloseCashierPdf") if setting.nil? - setting = PrintSetting.find_by_unique_code("CloseCashierCustomisePdf") + star_setting = PrintSetting.find_by_unique_code("CloseCashierStarPdf") + if star_setting.nil? + setting = PrintSetting.find_by_unique_code("CloseCashierCustomisePdf") + else + return star_setting + end end return setting end - + end diff --git a/app/models/printer/cashier_station_printer.rb b/app/models/printer/cashier_station_printer.rb index 64c448c0..15a6d289 100755 --- a/app/models/printer/cashier_station_printer.rb +++ b/app/models/printer/cashier_station_printer.rb @@ -37,7 +37,7 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker # pdf.render_file filename # self.print(filename, cashier_terminal.printer_name) # end - + def print_close_cashier(printer_settings,cashier_terminal,shift_sale, sale_items,shop_details,sale_taxes,other_payment,amount,discount,member_discount,total_dinein,total_takeway,total_other_charges,total_waste,total_spoile,total_credit_payments) if !sale_items.blank? or !sale_items.nil? @@ -81,10 +81,15 @@ class Printer::CashierStationPrinter < Printer::PrinterWorker end end - def print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, menu_cate_count) + def print_sale_items_report(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items) filename = "tmp/reports_sale_items.pdf" - pdf = SaleItemsPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, nil, menu_cate_count, nil) + if print_settings.unique_code == "SaleItemsPdf" + pdf = SaleItemsPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, nil, nil, nil) + end + if print_settings.unique_code == "SaleItemsStarPdf" + pdf = SaleItemsStarPdf.new(print_settings, shop_details, period_name, type, account, from_date, to_date, shift_name, sale_items, nil, nil, nil) + end pdf.render_file filename diff --git a/app/models/sale.rb b/app/models/sale.rb index 761492b1..81322e77 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -879,7 +879,6 @@ def self.daily_sales_list(from,to) total_sale.each do |sale| grand_total = sale.grand_total - amount_received = sale.amount_received old_grand_total = sale.old_grand_total total_discount = sale.total_discount void_amount = sale.void_amount @@ -952,7 +951,6 @@ def self.get_by_shiftsales(from,to,shift) end shift_sale_data[shift_sale.id] = { - :shift_id => shift_sale.id, :cashier_terminal_name => shift_sale.cashier_terminal.name, :employee_name => shift_sale.employee.name, :shift_started_at => shift_sale.shift_started_at, @@ -961,7 +959,8 @@ def self.get_by_shiftsales(from,to,shift) :credit_sales => shift_sale.credit_sales, :other_sales => shift_sale.other_sales.to_f, :foc_sales => foc, - :grand_total => shift_sale.grand_total + :grand_total => shift_sale.grand_total, + :shift_id => shift_sale.id } end @@ -1127,15 +1126,6 @@ def self.get_by_shift_items(shift_sale_range, shift, from, to, status,type,accou return query,other_charges, product, discount_query , total_cash_amount , total_card_amount , total_credit_amount , total_foc_amount , total_grand_total , change_amount end -def self.get_shift_sale_items(sh_id) - query = Sale.select("sales.shift_sale_id as shift_sale_id, i.account_id as account_id, acc.title as account_name, i.item_instance_code as item_code, i.menu_category_name, i.menu_category_code as menu_category_id, i.product_name as product_name, i.unit_price, i.price as price, i.qty as qty, SUM(i.qty) as total_item, SUM(i.qty * i.unit_price) as grand_total, i.status as status_type, i.remark as remark") - .joins("JOIN sale_items i on i.sale_id = sales.sale_id") - .joins("JOIN accounts acc on acc.id = i.account_id") - .where("sales.shift_sale_id=?", sh_id) - .group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price") - .order("acc.title desc, i.account_id desc, i.menu_category_code desc, i.unit_price asc") -end - def self.get_product_sale() query = Sale.select("i.account_id as account_id, " + "SUM(i.qty * i.unit_price) as grand_total,SUM(i.qty) as total_item," + @@ -2544,6 +2534,15 @@ end end end + def self.get_shift_sale_items(sh_id) + query = Sale.select("sales.shift_sale_id as shift_sale_id, i.account_id as account_id, acc.title as account_name, i.item_instance_code as item_code, i.menu_category_name, i.menu_category_code as menu_category_id, i.product_name as product_name, i.unit_price, i.price as price, i.qty as qty, SUM(i.qty) as total_item, SUM(i.qty * i.unit_price) as grand_total, i.status as status_type, i.remark as remark") + .joins("JOIN sale_items i on i.sale_id = sales.sale_id") + .joins("JOIN accounts acc on acc.id = i.account_id") + .where("sales.shift_sale_id=?", sh_id) + .group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price") + .order("acc.title desc, i.account_id desc, i.menu_category_code desc, i.unit_price asc") +end + def self.pending_sale(type) query = Sale.all query = query.joins("join sale_orders as sale_orders on sale_orders.sale_id = sales.sale_id") diff --git a/app/pdf/move_table_star_pdf.rb b/app/pdf/move_table_star_pdf.rb index cce17677..0467cbab 100644 --- a/app/pdf/move_table_star_pdf.rb +++ b/app/pdf/move_table_star_pdf.rb @@ -11,9 +11,9 @@ class MoveTableStarPdf < Prawn::Document self.qty_width = 40 self.total_width = 40 # No Need for item self.item_width = self.page_width - (self.qty_width - self.margin) - self.item_height = 15 + self.item_height = 15 self.item_description_width = self.page_width - (self.price_width + self.qty_width + self.total_width) - self.label_width=90 + self.label_width=90 super(:margin => [self.margin, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height]) @@ -85,7 +85,7 @@ class MoveTableStarPdf < Prawn::Document move_down 5 order_items.each do|odi| - # check for item not to show + # check for item not to show # if odi.price != 0 y_position = cursor @@ -103,15 +103,15 @@ class MoveTableStarPdf < Prawn::Document bounding_box([0,y_position], :width => self.item_width) do text "#{odi.item_code} - #{odi.item_name}", :size => self.item_font_size,:align => :left end - + if !(odi.alt_name).empty? move_down 4 # font("public/fonts/NotoSansCJKtc-Regular.ttf") do text "(#{odi.alt_name})", :size => self.item_font_size,:align => :left, :inline_format => true # end end - - end + + end end end diff --git a/app/pdf/receipt_bill_star_pdf.rb b/app/pdf/receipt_bill_star_pdf.rb index 8f155811..c11603eb 100644 --- a/app/pdf/receipt_bill_star_pdf.rb +++ b/app/pdf/receipt_bill_star_pdf.rb @@ -2,19 +2,19 @@ class ReceiptBillStarPdf < Prawn::Document include ActionView::Helpers::NumberHelper 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, :line_move - + 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,current_balance,card_data,other_charges_amount,latest_order_no,card_balance_amount) self.page_width = printer_settings.page_width self.page_height = printer_settings.page_height self.header_font_size = printer_settings.header_font_size.to_i self.item_font_size = printer_settings.item_font_size.to_i self.margin = 0 - self.price_width = 50 - self.qty_width = 23 - self.total_width = 50 - self.item_width = self.page_width - ((self.qty_width + self.price_width + self.total_width)) + self.price_width = 60 + self.qty_width = 20 + self.total_width = 40 + self.item_width = 73 self.item_height = 15 - self.item_description_width = (self.page_width-20) / 2 + self.item_description_width = (self.page_width-30) / 2 self.label_width = 90 self.description_width = 140 @@ -101,7 +101,7 @@ class ReceiptBillStarPdf < Prawn::Document if shop_details.note && !shop_details.note.nil? shop_note(shop_details) end - + footer(printed_status) end @@ -129,7 +129,7 @@ class ReceiptBillStarPdf < Prawn::Document text "OrderNo : #{ latest_order_no }", :size => self.header_font_size,:align => :left end move_down line_move - + # move_down 2 y_position = cursor bounding_box([0,y_position], :width =>self.description_width + self.price_num_width, :height => self.item_height) do @@ -146,7 +146,7 @@ class ReceiptBillStarPdf < Prawn::Document y_position = cursor bounding_box([0, y_position], :width =>self.label_width, :height => self.item_height) do text "W: #{sale_data.requested_by}" , :size => self.item_font_size, :align => :left - end + end bounding_box([self.label_width - 2,y_position], :width =>self.label_width, :height => self.item_height) do text "C: #{sale_data.cashier_name}", :size => self.item_font_size,:align => :right end @@ -164,7 +164,7 @@ class ReceiptBillStarPdf < Prawn::Document end # bounding_box([self.item_description_width,y_position], :width =>self.label_width+5) do - # text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } + # text "(#{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') } # - #{ sale_data.bookings[0].checkin_at.utc.getlocal.strftime('%I:%M %p') })" , # :size => self.item_font_size,:align => :right # end @@ -201,7 +201,7 @@ class ReceiptBillStarPdf < Prawn::Document end def add_line_item_row(sale_items,precision,delimiter) - + if precision.to_i > 0 item_name_width = (self.item_width+self.price_width) item_qty_front_width = (self.item_width+self.price_width) + 2 @@ -222,14 +222,14 @@ class ReceiptBillStarPdf < Prawn::Document total_qty = 0.0 show_price = Lookup.find_by_lookup_type("show_price") sale_items.each do |item| - # check for item not to show - + # check for item not to show + if item.status != 'Discount' && item.qty > 0 if !show_price.nil? && show_price.value.to_i > 0 && item.price == 0 - total_qty += item.qty + total_qty += item.qty else if item.price != 0 - total_qty += item.qty + total_qty += item.qty end end end @@ -246,9 +246,9 @@ class ReceiptBillStarPdf < Prawn::Document qty = item.qty total_price = item.price #item.qty*item.unit_price - comment for room charges price = item.unit_price - + # end - + if !show_price.nil? && show_price.value.to_i>0 item_row(item,precision,delimiter,product_name,price,qty ,total_price) @@ -257,7 +257,7 @@ class ReceiptBillStarPdf < Prawn::Document item_row(item,precision,delimiter,product_name,price,qty ,total_price) end end - + end stroke_horizontal_rule @@ -291,10 +291,10 @@ class ReceiptBillStarPdf < Prawn::Document bounding_box([0,y_position], :width =>self.item_width) do text "#{product_name}", :size => self.item_font_size,:align => :left end - # text_box "#{product_name}", :at =>[0,y_position], :width => self.item_width, :size => self.item_font_size - text_box "#{number_with_precision(price, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[self.item_width,y_position], :width => self.price_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix - text_box "#{number_with_precision(qty, :precision => precision.to_i)}", :at =>[item_qty_front_width,y_position], :width => item_qty_end_width, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix - text_box "#{number_with_precision(total_price, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[item_total_front_width,y_position], :width =>item_total_end_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + # text_box "#{product_name}", :at =>[0,y_position], :width => self.item_width, :size => self.item_font_size + text_box "#{number_with_precision(price, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[self.item_width,y_position], :width => self.price_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + text_box "#{number_with_precision(qty, :precision => precision.to_i)}", :at =>[item_qty_front_width,y_position], :width => item_qty_end_width, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix + text_box "#{number_with_precision(total_price, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[item_total_front_width,y_position], :width =>item_total_end_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix if show_alt_name if !(item.product_alt_name).empty? @@ -367,7 +367,7 @@ class ReceiptBillStarPdf < Prawn::Document end bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{sale_data.rounding_adjustment}", :size => self.item_font_size,:align => :right - end + end end move_down line_move @@ -380,11 +380,11 @@ class ReceiptBillStarPdf < Prawn::Document text "#{number_with_precision(sale_data.grand_total, :precision => precision.to_i, :delimiter => delimiter)}" , :style => :bold, :size => self.header_font_size,:align => :right end move_down line_move - - sale_payment(sale_data,precision,delimiter) + + sale_payment(sale_data,precision,delimiter) end - def sale_payment(sale_data,precision,delimiter) + def sale_payment(sale_data,precision,delimiter) stroke_horizontal_rule #move_down line_move sql = "SELECT SUM(payment_amount) @@ -416,13 +416,13 @@ class ReceiptBillStarPdf < Prawn::Document text "#{payment.payment_method.capitalize} Payment", :size => self.item_font_size,:align => :left end end - + bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{number_with_precision(payment.payment_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end move_down line_move end - if sale_data.amount_received > 0 + if sale_data.amount_received > 0 y_position = cursor move_down line_move bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do @@ -437,7 +437,7 @@ class ReceiptBillStarPdf < Prawn::Document # show member information def member_info(member_info,customer_name,rebate_amount,sale_data,precision,delimiter,current_balance) - if rebate_amount != nil + if rebate_amount != nil if rebate_amount["status"] == true stroke_horizontal_rule total = 0 @@ -466,8 +466,8 @@ class ReceiptBillStarPdf < Prawn::Document bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end - - end + + end # Total Rebate Amount if birthday if res["receipt_no"]== sale_data.receipt_no && res["account_status"]== "RebatebonusAccount" && res["status"]== "Rebate" rebate_balance = rebate_balance + res["deposit"] @@ -479,7 +479,7 @@ class ReceiptBillStarPdf < Prawn::Document bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{number_with_precision(res["deposit"], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end - end + end #end Total rebate if birthday end @@ -502,7 +502,7 @@ class ReceiptBillStarPdf < Prawn::Document text "#{number_with_precision(current_balance, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right end end - + end end @@ -512,7 +512,7 @@ class ReceiptBillStarPdf < Prawn::Document if res["accountable_type"] == "RebateAccount" || res["accountable_type"] == "RebatebonusAccount" total_balance = total_balance + res["balance"] - + end end move_down line_move @@ -524,7 +524,7 @@ class ReceiptBillStarPdf < Prawn::Document text "#{number_with_precision(total_balance, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end end - + end def customer(customer_name) @@ -554,7 +554,7 @@ class ReceiptBillStarPdf < Prawn::Document end bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "(" + "#{ number_with_precision(ipa[:price], :precision => precision.to_i, :delimiter => delimiter) }" + ")" , :size => self.item_font_size,:align => :right - end + end move_down line_move end end @@ -571,7 +571,7 @@ class ReceiptBillStarPdf < Prawn::Document bounding_box([self.label_width,y_position], :width =>self.item_description_width) do text "#{number_with_precision(ipa[:price], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end - move_down line_move + move_down line_move end end @@ -583,7 +583,7 @@ class ReceiptBillStarPdf < Prawn::Document bounding_box([self.label_width,y_position], :width =>self.item_description_width) do text "#{number_with_precision(other_amount, :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right end - move_down line_move + move_down line_move end #individual payment per person @@ -623,17 +623,17 @@ class ReceiptBillStarPdf < Prawn::Document JOIN sale_audits sa ON SUBSTRING_INDEX(sa.remark,'||',1)=sale_payment_id where sa.sale_id='#{sale_data.sale_id}')) = 0 - THEN payment_method!='creditnote' ELSE 1 END) AND sale_id = ?", sale_data.sale_id).each do |payment| + THEN payment_method!='creditnote' ELSE 1 END) AND sale_id = ?", sale_data.sale_id).each do |payment| if payment.payment_method == "creditnote" y_position = cursor stroke_horizontal_rule - + bounding_box([self.label_width,y_position], :width =>self.item_description_width) do move_down 70 stroke_horizontal_rule end - + bounding_box([self.label_width,y_position], :width =>self.item_description_width) do move_down 73 text "Approved By" , :size => self.item_font_size,:align => :center @@ -650,7 +650,7 @@ class ReceiptBillStarPdf < Prawn::Document move_down 70 stroke_horizontal_rule end - + if sale_data.payment_status == "foc" bounding_box([self.label_width,y_position], :width =>self.item_description_width) do move_down 73 @@ -661,9 +661,9 @@ class ReceiptBillStarPdf < Prawn::Document move_down 73 text "Approved By" , :size => self.item_font_size,:align => :center end - end + end end - + end def shop_note(shop) @@ -673,8 +673,8 @@ class ReceiptBillStarPdf < Prawn::Document move_down line_move y_position = cursor - - text "#{shop.note}", :size => self.item_font_size, :align => :left + + text "#{shop.note}", :size => self.item_font_size, :align => :left move_down line_move end @@ -688,10 +688,10 @@ class ReceiptBillStarPdf < Prawn::Document y_position = cursor bounding_box([0, y_position], :width =>self.label_width) do text "#{printed_status}",:style => :bold, :size => header_font_size,:align => :left - end + end bounding_box([self.item_description_width,y_position], :width =>self.item_description_width+20, :height => self.item_height) do text "Thank You! See you Again", :left_margin => -5, :size => self.item_font_size,:align => :left - end + end move_down line_move end @@ -729,7 +729,7 @@ class ReceiptBillStarPdf < Prawn::Document y_position = cursor bounding_box([0, y_position], :width =>self.label_width) do text "Card Balance: ",:style => :bold, :size => header_font_size,:align => :left - end + end bounding_box([self.item_description_width,y_position], :width =>self.label_width) do text "#{card_balance_amount}" , :size => self.item_font_size,:align => :right end @@ -753,4 +753,4 @@ class ReceiptBillStarPdf < Prawn::Document end return status end -end \ No newline at end of file +end diff --git a/app/pdf/sale_items_pdf.rb b/app/pdf/sale_items_pdf.rb index 30c6e835..3b92fac8 100644 --- a/app/pdf/sale_items_pdf.rb +++ b/app/pdf/sale_items_pdf.rb @@ -105,7 +105,7 @@ class SaleItemsPdf < Prawn::Document text "From Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ from_date}" , :size => self.item_font_size,:align => :left + text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor @@ -113,14 +113,14 @@ class SaleItemsPdf < Prawn::Document text "To Date : ", :size => self.item_font_size,:align => :left end bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do - text "#{ to_date}" , :size => self.item_font_size,:align => :left + text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left end y_position = cursor bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do text "Shift : ", :size => self.item_font_size,:align => :left end - bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + bounding_box([@label_name_width,y_position], :width => @label_item_width) do text "#{shift}" , :size => self.item_font_size,:align => :left end @@ -148,10 +148,10 @@ class SaleItemsPdf < Prawn::Document arr = Array.new unless sale_items.nil? - JSON.parse(sale_items).each do |item| + sale_items.each do |item| if !arr.include?(item['menu_category_id']) - + unless total_qty == 0 and sub_total == 0 total_details('Sub Total', total_qty, sub_total) end @@ -193,7 +193,7 @@ class SaleItemsPdf < Prawn::Document text_box "#{item['total_item'].to_i}", :at =>[item_label_qty_front_width,y_position], :width => item_label_qty_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix text_box "#{item['grand_total'].to_i}", :at =>[item_label_total_front_width,y_position], :width => item_label_total_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix } - + if item['total_item'].to_i > 0 total_qty += item['total_item'].to_i total_items += item['total_item'].to_i @@ -209,7 +209,7 @@ class SaleItemsPdf < Prawn::Document move_down 5 total_details('Total Amount', total_items, total_amount) move_down 10 - end + end end def total_details(col_name, total_qty, sub_total) @@ -230,4 +230,4 @@ class SaleItemsPdf < Prawn::Document } end -end \ No newline at end of file +end diff --git a/app/pdf/sale_items_star_pdf.rb b/app/pdf/sale_items_star_pdf.rb new file mode 100644 index 00000000..8ce08f28 --- /dev/null +++ b/app/pdf/sale_items_star_pdf.rb @@ -0,0 +1,233 @@ +class SaleItemsStarPdf < Prawn::Document + include ActionView::Helpers::NumberHelper + 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,:text_width + + def initialize(printer_settings, shop_details, period, type, account, from_date, to_date, shift, sale_items, acc_cate_count, menu_cate_count, total_by_acc) + self.page_width = printer_settings.page_width #PrintSetting.where("name = ?","Close Cashier").first.page_width + self.page_height = printer_settings.page_height + self.header_font_size = printer_settings.header_font_size.to_i + self.item_font_size = printer_settings.item_font_size.to_i + self.margin = 5 + self.price_width = 60 + self.qty_width = 20 + self.total_width = 40 + self.item_width = self.page_width - ((self.price_width + self.qty_width + self.total_width)) + self.item_height = 15 + self.item_description_width = (self.page_width-20) / 2 + @label_name_width = 50 + @label_item_width = self.page_width-@label_name_width + self.label_width = 100 + + self.text_width = (self.page_width - 80) - self.price_width / 3 + # @item_width = self.page_width.to_i / 2 + # @qty_width = @item_width.to_i / 3 + # @double = @qty_width * 1.3 + # @half_qty = @qty_width / 2 + #setting page margin and width + super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height]) + + # db font setup + if printer_settings.font != "" + font_families.update("#{printer_settings.font}" => { + :normal => "public/fonts/#{printer_settings.font}.ttf", + :italic => "public/fonts/#{printer_settings.font}.ttf", + :bold => "public/fonts/#{printer_settings.font}.ttf", + :bold_italic => "public/fonts/#{printer_settings.font}.ttf" + }) + + font "#{printer_settings.font}" + fallback_fonts ["Courier", "Helvetica", "Times-Roman"] + end + # font "public/fonts/Zawgyi-One.ttf" + # font "public/fonts/padauk.ttf" + + #precision checked + if printer_settings.precision.to_i > 2 + printer_settings.precision = 2 + end + #check delimiter + if printer_settings.delimiter + delimiter = "," + else + delimiter = "" + end + + header( shop_details) + + stroke_horizontal_rule + + sale_details(period, type, account, from_date, to_date, shift) + + sale_items_detail(sale_items, acc_cate_count, menu_cate_count, total_by_acc) + end + + def header (shop_details) + move_down 7 + text "#{shop_details.name}", :left_margin => -10, :size => self.header_font_size,:align => :center + move_down 5 + text "#{shop_details.address}", :size => self.item_font_size,:align => :center + # move_down self.item_height + move_down 5 + text "#{shop_details.phone_no}", :size => self.item_font_size,:align => :center + move_down 5 + + stroke_horizontal_rule + end + + def sale_details(period, type, account, from_date, to_date, shift) + move_down 7 + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "Period : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + text "#{period}" , :size => self.item_font_size,:align => :left + end + + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "Type : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + text "#{type}" , :size => self.item_font_size,:align => :left + end + + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "Account : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + text "#{account}" , :size => self.item_font_size,:align => :left + end + + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "From Date : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + end + + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "To Date : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do + text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left + end + + y_position = cursor + bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do + text "Shift : ", :size => self.item_font_size,:align => :left + end + bounding_box([@label_name_width,y_position], :width => @label_item_width) do + text "#{shift}" , :size => self.item_font_size,:align => :left + end + + move_down 10 + end + + def sale_items_detail(sale_items, acc_cate_count, menu_cate_count, total_by_acc) + self.item_width = 73 + self.price_width = 35 + item_label_qty_front_width = (self.item_width+self.price_width) + 2 + item_label_qty_end_width = 32 + item_label_total_front_width = (self.item_width+self.price_width) + 2 + item_label_total_end_width = 64 + + y_position = cursor + bounding_box([0,y_position], :width =>self.page_width - 10, :height => 20) do + text "Sale Items Summary", :size => self.header_font_size, :align => :center + end + + total_items = 0 + total_amount = 0 + total_qty = 0 + sub_total = 0 + + arr = Array.new + + unless sale_items.nil? + sale_items.each do |item| + + if !arr.include?(item['menu_category_id']) + + unless total_qty == 0 and sub_total == 0 + total_details('Sub Total', total_qty, sub_total) + end + + total_qty = 0 + sub_total = 0 + + move_down 10 + + y_position = cursor + bounding_box([0,y_position], :width =>self.page_width - 10, :height => 20) do + text "#{item['menu_category_name']}", :size => self.header_font_size, :align => :left + end + + # write_stroke_dash + # dash(1, :space => 1, :phase => 1) + # stroke_horizontal_rule + # move_down 2 + y_position = cursor + pad_top(15) { + text_box "Items", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix + text_box "Price", :at =>[(self.item_width),y_position], :width => self.price_width, :height =>self.item_height, :size => self.item_font_size, :align => :left, :overflow => :shrink_to_fix + text_box "Qty", :at =>[item_label_qty_front_width,y_position], :width => item_label_qty_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix + text_box "Total", :at =>[item_label_total_front_width,y_position], :width => item_label_total_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + } + move_down 2 + stroke_horizontal_rule + end + + + move_down 3 + + y_position = cursor + pad_top(15) { + bounding_box([0,y_position], :width =>self.item_width) do + text "#{item['product_name']}", :size => self.item_font_size, :align => :left#, :overflow => :shrink_to_fix + end + text_box "#{item['unit_price'].to_i}", :at =>[(self.item_width),y_position], :width => self.price_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + text_box "#{item['total_item'].to_i}", :at =>[item_label_qty_front_width,y_position], :width => item_label_qty_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix + text_box "#{item['grand_total'].to_i}", :at =>[item_label_total_front_width,y_position], :width => item_label_total_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + } + + if item['total_item'].to_i > 0 + total_qty += item['total_item'].to_i + total_items += item['total_item'].to_i + end + + sub_total += item['grand_total'].to_i + total_amount += item['grand_total'].to_i + arr.push(item['menu_category_id']) + end + + # stroke_horizontal_rule + total_details('Sub Total', total_qty, sub_total) + move_down 5 + total_details('Total Amount', total_items, total_amount) + move_down 10 + end + end + + def total_details(col_name, total_qty, sub_total) + self.item_width = 73 + self.price_width = 35 + item_label_qty_front_width = (self.item_width+self.price_width) + 2 + item_label_qty_end_width = 32 + item_label_total_front_width = (self.item_width+self.price_width) + 2 + item_label_total_end_width = 64 + + move_down 5 + stroke_horizontal_rule + y_position = cursor + pad_top(15) { + text_box "#{col_name}", :at =>[0,y_position], :width => self.item_width, :height =>self.item_height, :size => self.item_font_size, :overflow => :shrink_to_fix + text_box "#{total_qty.to_i}", :at =>[item_label_qty_front_width,y_position], :width => item_label_qty_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix + text_box "#{sub_total.to_i}", :at =>[item_label_total_front_width,y_position], :width => item_label_total_end_width, :height =>self.item_height, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix + } + end + +end diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index a65ac631..0f9890d7 100755 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -14,10 +14,10 @@ else delimiter = "" end - %> + %>
-
+
help @@ -30,7 +30,7 @@
-
+
attach_money @@ -44,7 +44,7 @@
-
+
person_add @@ -57,7 +57,7 @@
-
+
credit_card @@ -99,27 +99,27 @@ to_time = '' end %> -
- +
+
-
- +
+
-
- +
+
-
- +
+
-
+

@@ -131,26 +131,29 @@
<% if current_user.role == 'administrator' || current_user.role == 'manager' || current_user.role == 'account' %>
-
-
-
-
-

dashboard<%= (t :top) + " " + (t :products) %>

- - <%= pie_chart @top_products %> + <% isMobile = request.user_agent %> + <% if !isMobile.include? "Mobile" %> +
+
+
+
+

dashboard<%= (t :top) + " " + (t :products) %>

+ + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
-
-
-
-

dashboard<%= (t :bottom) + " " + (t :products) %>

- - <%= pie_chart @bottom_products %> -
-
-
-
+ <% end %> + <%= pie_chart @top_products %> +
+
+
+
+
+
+

dashboard<%= (t :bottom) + " " + (t :products) %>

+ + <%= pie_chart @bottom_products %> +
+
+
+
+ <% end %>
\ No newline at end of file + diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index a8a6d85c..acb35329 100755 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -154,7 +154,7 @@ $(".collapse.in").each(function () { $(this).siblings(".panel-heading").find(".glyphicon").addClass("glyphicon-minus").removeClass("glyphicon-plus"); }); - + // Toggle plus minus icon on show hide of collapse element $(".collapse").on('show.bs.collapse', function () { $(this).parent().find(".glyphicon").removeClass("glyphicon-plus").addClass("glyphicon-minus"); @@ -164,11 +164,3 @@ }); - - - - - - - - diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 164b6c4f..415e8f2c 100755 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -18,19 +18,19 @@ <%if current_login_employee.role !="waiter" %> <% if current_login_employee.role == "administrator" || current_login_employee.role == "manager" || current_login_employee.role == "account" %> - + <% elsif current_login_employee.role == "supervisor" || current_login_employee.role == "cashier" || current_login_employee.role == "waiter" %> - + <%else%> - + <% end %> <% else %> - + <%end%> Logo SX Restaurant - + @@ -40,11 +40,17 @@ <%= shop_detail.name %>
- +
@@ -159,7 +159,7 @@ - - - - diff --git a/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb b/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb index 0d70fe4f..e46b8408 100644 --- a/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb +++ b/app/views/reports/card_sale_tran/_shift_card_sale_tran_report_filter.html.erb @@ -2,15 +2,15 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
- + <% if defined? @payment_method %> -
- - <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> +
+ + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
- <% end %> -
- + <% end %> +
+
<% if not defined? payments %> - -
- - + +
+ + -
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + diff --git a/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb index 0d70fe4f..fe2a7a62 100644 --- a/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb +++ b/app/views/reports/card_settle_tran/_shift_card_settle_tran_report_filter.html.erb @@ -2,15 +2,15 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
- + <% if defined? @payment_method %> -
- - <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %> +
+ + <%= select_tag "payment_type", options_for_select(@payment_method, :selected => params[:payment_type]), :class => "form-control" %>
- <% end %> -
- + <% end %> +
+
<% if not defined? payments %> - -
+ +
- + -
+
<% end %> -
+
- +
-
- +
+
-
- +
+
-
+

-
-
+
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + diff --git a/app/views/reports/commission/_commission_report_filter.html.erb b/app/views/reports/commission/_commission_report_filter.html.erb index d7d41eb6..a39915b9 100755 --- a/app/views/reports/commission/_commission_report_filter.html.erb +++ b/app/views/reports/commission/_commission_report_filter.html.erb @@ -11,17 +11,17 @@ <% end %>
--> -
+
- +
-
- +
+
- +
-
+

@@ -89,4 +89,4 @@ }); - --> \ No newline at end of file + --> diff --git a/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb b/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb index 22ae03ce..4f960e96 100755 --- a/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb +++ b/app/views/reports/credit_payment/_shift_sale_report_filter.html.erb @@ -2,8 +2,8 @@ <%= form_tag report_path, :method => :get, :id=>"frm_report", :class => "form" do %> <% if period_type != false %>
-
- +
+
<% if defined? filter_for_credit %> -
- +
+ <%= select_tag "filter_check", options_for_select(@filter_for_credit, :selected => params[:filter_check]), :class => "form-control", :style => "height: 37px;" %>
<% end %> -
- - <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> -
-
+
+ + <%= select_tag "order_source", options_for_select(@sources, :selected => params[:order_source]), :class => "form-control" %> +
+
- +
-
- +
+
-
- +
+ -
-
+
+
-
+

-
+
<% end %> - <% end %> -
+ <% end %> +
\ No newline at end of file + diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb index a6b57134..d72be97c 100755 --- a/app/views/reports/dailysale/index.html.erb +++ b/app/views/reports/dailysale/index.html.erb @@ -1,5 +1,5 @@ -