diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index 26e6c151..6d8092cc 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -24,7 +24,9 @@ $(document).ready(function() { }); $('#order-detail-slimscroll').slimScroll({ - height: height-$('#order-detail-slimscroll').attr('data-height'), + // height: '250px', + height: $('#order-detail-slimscroll').attr('data-height'), + // height: height-$('#order-detail-slimscroll').attr('data-height'), size: '5px', color: 'rgba(0,0,0,0.5)', alwaysVisible: false, diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss new file mode 100644 index 00000000..e1d36dce --- /dev/null +++ b/app/assets/stylesheets/custom.scss @@ -0,0 +1,14 @@ +.home.card { + height: 100%; +} + +#order-detail-slimscroll { + display: block; +} + +.pending-order.card-footer, .home.card-footer, .credit_sale.card-footer .inventory.card-footer{ + width: 100%; + vertical-align: bottom; + position: absolute; + bottom: 0; +} diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 64cc2937..b971b6dd 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -11,6 +11,7 @@ @import "BSBMaterial/themes/all-themes"; @import "reset"; @import "fileinput.min"; +@import "custom"; /* Reset */ diff --git a/app/controllers/transactions/bookings_controller.rb b/app/controllers/transactions/bookings_controller.rb index 0a6f7cbb..5fe7fc4a 100644 --- a/app/controllers/transactions/bookings_controller.rb +++ b/app/controllers/transactions/bookings_controller.rb @@ -23,6 +23,7 @@ class Transactions::BookingsController < ApplicationController @receipt_no = filter @from = from @to = to + @food_court = Lookup.find_by_lookup_type_and_value("food_court", "1") respond_to do |format| format.html # index.html.erb format.json { render json: @bookings } diff --git a/app/controllers/transactions/orders_controller.rb b/app/controllers/transactions/orders_controller.rb index 5d41439c..4a3ab0ef 100755 --- a/app/controllers/transactions/orders_controller.rb +++ b/app/controllers/transactions/orders_controller.rb @@ -21,8 +21,9 @@ class Transactions::OrdersController < ApplicationController end @receipt_no = filter - @from = from - @to = to + @from = from + @to = to + @food_court = Lookup.find_by_lookup_type_and_value("food_court", "1") respond_to do |format| format.html diff --git a/app/controllers/transactions/sales_controller.rb b/app/controllers/transactions/sales_controller.rb index 98b420ff..7e69ac4b 100755 --- a/app/controllers/transactions/sales_controller.rb +++ b/app/controllers/transactions/sales_controller.rb @@ -35,6 +35,7 @@ class Transactions::SalesController < ApplicationController @receipt_no = receipt_no @from = from @to = to + @food_court = Lookup.find_by_lookup_type_and_value("food_court", "1") if @shift.present? @shift_from = @shift.shift_started_at.nil? ? '-' : @shift.shift_started_at.utc.getlocal.strftime("%e %b %I:%M%p") diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb new file mode 100644 index 00000000..91ee1ac3 --- /dev/null +++ b/app/helpers/breadcrumb_helper.rb @@ -0,0 +1,21 @@ +module BreadcrumbHelper + + def ensure_breadcrumb + @breadcrumb ||= [ { :title => t("views.right_panel.button.home"), :url => dashboard_path } ] + end + + def back + @back ||= [] + end + + def breadcrumb_add(title, url, back_url, act_name = nil) + ensure_breadcrumb << { :title => title, :url => url } + ensure_breadcrumb << { :title => act_name, :url => '' } if act_name.present? + + back << {url: back_url} if back_url.present? + end + + def render_breadcrumb + render :partial => 'shared/breadcrumb', :locals => { :nav => ensure_breadcrumb, :back => back } + end +end \ No newline at end of file diff --git a/app/models/customer.rb b/app/models/customer.rb index 29e93341..4f007b88 100755 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -109,6 +109,9 @@ class Customer < ApplicationRecord }, :timeout => 10 ) + + rescue Errno::ECONNREFUSED + response = {status: false, message: "Can't open membership server " } rescue HTTParty::Error response = {status: false, message: "Can't open membership server " } diff --git a/app/models/printer/printer_worker.rb b/app/models/printer/printer_worker.rb index d30af42d..5d7cce22 100755 --- a/app/models/printer/printer_worker.rb +++ b/app/models/printer/printer_worker.rb @@ -42,17 +42,17 @@ class Printer::PrinterWorker end def print(file_path, printer_destination = nil ) - if printer_destination.nil? - printer_destination = self.printer_destination - end + # if printer_destination.nil? + # printer_destination = self.printer_destination + # end - copy = self.print_copies - #Print only when printer information is not null - if !self.printer_destination.nil? - (1..copy).each do - page = Cups::PrintJob.new(file_path, printer_destination) - page.print - end - end + # copy = self.print_copies + # #Print only when printer information is not null + # if !self.printer_destination.nil? + # (1..copy).each do + # page = Cups::PrintJob.new(file_path, printer_destination) + # page.print + # end + # end end end diff --git a/app/views/crm/customers/show.html.erb b/app/views/crm/customers/show.html.erb index 646cd06a..d881b73f 100644 --- a/app/views/crm/customers/show.html.erb +++ b/app/views/crm/customers/show.html.erb @@ -1,14 +1,4 @@ -