diff --git a/Gemfile.lock b/Gemfile.lock index 01c505f6..3f9a8a09 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,7 +47,7 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) aescrypt (1.0.0) - airbrussh (1.3.4) + airbrussh (1.4.0) sshkit (>= 1.6.1, != 1.7.0) arel (8.0.0) axlsx (2.0.1) @@ -62,7 +62,7 @@ GEM builder (3.2.3) byebug (11.0.1) cancancan (1.17.0) - capistrano (3.11.1) + capistrano (3.11.2) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -88,7 +88,7 @@ GEM coffee-script-source (1.12.2) concurrent-ruby (1.1.5) connection_pool (2.2.2) - crass (1.0.4) + crass (1.0.5) cups (0.1.10) database_cleaner (1.7.0) diff-lcs (1.3) @@ -99,8 +99,8 @@ GEM factory_girl_rails (4.9.0) factory_girl (~> 4.9.0) railties (>= 3.0.0) - faker (2.4.0) - i18n (~> 1.6.0) + faker (2.6.0) + i18n (>= 1.6, < 1.8) ffi (1.11.1) filterrific (5.2.1) font-awesome-rails (4.7.0.5) @@ -110,7 +110,7 @@ GEM htmlentities (4.3.4) httparty (0.15.7) multi_xml (>= 0.5.2) - i18n (1.6.0) + i18n (1.7.0) concurrent-ruby (~> 1.0) jbuilder (2.9.1) activesupport (>= 4.2.0) @@ -140,7 +140,7 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.2.3) + loofah (2.3.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -150,11 +150,11 @@ GEM method_source (0.9.2) mime-types (3.3) mime-types-data (~> 3.2015) - mime-types-data (3.2019.0904) + mime-types-data (3.2019.1009) mini_magick (4.9.5) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.12.0) + minitest (5.12.2) momentjs-rails (2.20.1) railties (>= 3.1) multi_xml (0.6.0) @@ -175,9 +175,9 @@ GEM prawn (2.2.2) pdf-core (~> 0.7.0) ttfunk (~> 1.5) - prawn-qrcode (0.3.1) + prawn-qrcode (0.4.0) prawn (>= 1) - rqrcode (>= 0.4.1) + rqrcode (>= 1.0.0) prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) puma (3.12.1) @@ -202,15 +202,15 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.2.0) - loofah (~> 2.2, >= 2.2.2) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) railties (5.1.7) actionpack (= 5.1.7) activesupport (= 5.1.7) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.3.3) + rake (13.0.0) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) @@ -223,23 +223,23 @@ GEM chunky_png (~> 1.0) rqrcode_core (~> 0.1.0) rqrcode_core (0.1.0) - rspec-core (3.8.2) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.4) + rspec-core (3.9.0) + rspec-support (~> 3.9.0) + rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.1) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-rails (3.8.2) + rspec-support (~> 3.9.0) + rspec-rails (3.9.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.2) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.0) ruby-ole (1.2.12.2) rubyzip (1.0.0) sass (3.7.4) @@ -262,12 +262,13 @@ GEM rack (>= 1.5.0) rack-protection (>= 1.5.0) redis (>= 3.3.5, < 5) - simple_form (4.1.0) + simple_form (5.0.1) actionpack (>= 5.0) activemodel (>= 5.0) spreadsheet (1.2.4) ruby-ole (>= 1.0) - spring (2.1.0) + spring (2.0.2) + activesupport (>= 4.2) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) diff --git a/app/controllers/reports/dailysale_controller.rb b/app/controllers/reports/dailysale_controller.rb index 6fb7fe3f..2603fce4 100755 --- a/app/controllers/reports/dailysale_controller.rb +++ b/app/controllers/reports/dailysale_controller.rb @@ -9,6 +9,7 @@ class Reports::DailysaleController < BaseReportController @to = to @payment_methods = PaymentMethodSetting.where("is_active='1'").pluck("payment_method") + # get printer info @print_settings = PrintSetting.get_precision_delimiter() respond_to do |format| diff --git a/app/controllers/reports/hourly_saleitem_controller.rb b/app/controllers/reports/hourly_saleitem_controller.rb index 24547c0c..a08c24e4 100644 --- a/app/controllers/reports/hourly_saleitem_controller.rb +++ b/app/controllers/reports/hourly_saleitem_controller.rb @@ -27,8 +27,6 @@ class Reports::HourlySaleitemController < BaseReportController account_type = params[:account_type] @type = params[:sale_type] @sale_data, @other_charges,@product, @discount_data , @cash_data , @card_data , @credit_data , @foc_data , @grand_total , @change_amount = Sale.get_by_hourly_items(shift_sale_range,shift, from, to, Sale::SALE_STATUS_COMPLETED,@type,account_type) - # logger.debug 'product>>>>>>>>>>>>>>>>>>>>>>>>>>' - # logger.debug @sale_data.group(:date_format) @sale_taxes = Sale.get_separate_tax(shift_sale_range,shift,from,to,nil) @@ -59,7 +57,7 @@ class Reports::HourlySaleitemController < BaseReportController # @hourly_total_qty = @sale_data.group_by {|s| s.date_format }.collect{|key,qty| {"date" => key , "total_qty" => qty.sum{|d| d.qty.to_i}}} @hourly_total_qty = @sale_data.group_by(&:date_format).map { |k,v|{"date" => k , "total_qty" => v.count }} - puts @hourly_total_qty.to_json + respond_to do |format| format.html format.xls diff --git a/app/models/printer/receipt_printer.rb b/app/models/printer/receipt_printer.rb index b45c722b..f7b35a5a 100755 --- a/app/models/printer/receipt_printer.rb +++ b/app/models/printer/receipt_printer.rb @@ -227,8 +227,8 @@ class Printer::ReceiptPrinter < Printer::PrinterWorker count = printer_settings.print_copies # override print copies for print worker loop - print_settings.print_copies = 1 - print_settings.save! + # print_settings.print_copies = 1 + # print_settings.save! end directory_name = 'public/receipts' Dir.mkdir(directory_name) unless File.exists?(directory_name) diff --git a/app/models/sale.rb b/app/models/sale.rb index cb4854b8..ae350e80 100644 --- a/app/models/sale.rb +++ b/app/models/sale.rb @@ -2727,16 +2727,17 @@ def self.get_hourly_item_query(type) "i.status as status_type,i.remark as remark,"+ "i.unit_price,i.price as price,i.product_name as product_name, " + "i.menu_category_name,i.menu_category_code as menu_category_id, " + - "date_format(CONVERT_TZ(receipt_date,'+00:00', '+06:30'), '%I %p') - as date_format") + + "concat(hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')), ':00 - ', hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')) + 1, ':00') as date_format," + + "hour(CONVERT_TZ(receipt_date,'+00:00', '+06:30')) as hour") query = query.joins("JOIN sale_items i ON i.sale_id = sales.sale_id" + " JOIN shift_sales sh ON sh.`id` = sales.shift_sale_id") # "JOIN employee_accesses ea ON ea.`employee_id` = sales.cashier_id ") query = query.joins(" JOIN accounts acc ON acc.id = i.account_id") query = query.where("#{sale_type}") - query = query.group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price") - .order("date_format asc") + query = query.group("acc.title,i.account_id,i.menu_category_code,i.item_instance_code,i.product_name,i.unit_price,hour") + .order("hour asc") # query = query.order("i.menu_category_name asc, SUM(i.qty) desc") end diff --git a/app/pdf/order_item_customise_pdf.rb b/app/pdf/order_item_customise_pdf.rb index 727991ef..b509a01a 100644 --- a/app/pdf/order_item_customise_pdf.rb +++ b/app/pdf/order_item_customise_pdf.rb @@ -12,9 +12,9 @@ class OrderItemCustomisePdf < 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 => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height]) # super(:margin => [10, 5, 30, 5], :page_size => [200,400]) @@ -29,17 +29,17 @@ class OrderItemCustomisePdf < Prawn::Document }) font "#{print_settings.font}" - fallback_fonts ["Courier", "Helvetica", "Times-Roman"] + fallback_fonts ["Courier", "Helvetica", "Times-Roman"] end # font "public/fonts/Zawgyi-One.ttf" - # font "public/fonts/padauk.ttf" - #font "public/fonts/Chinese.ttf" + # font "public/fonts/padauk.ttf" + #font "public/fonts/Chinese.ttf" if !order_item.dining.nil? text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20 else text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20 end - + stroke_horizontal_rule move_down 3 @@ -51,31 +51,31 @@ class OrderItemCustomisePdf < Prawn::Document end # Write Order Information to PDF - def order_info(order_no, order_by, order_at) + def order_info(order_no, order_by, order_at) #booking ID booking_id = get_booking_id(order_no) y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Booking: #{booking_id}", :size => self.order_no_font_size,:align => :left + text "Booking: #{booking_id}", :size => self.order_no_font_size,:align => :left end move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "OrderNo: #{order_no} ", :size => self.order_no_font_size,:align => :left + text "OrderNo: #{order_no} ", :size => self.order_no_font_size,:align => :left end move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "OrderBy: #{order_by} ", :size => self.order_no_font_size,:align => :left + text "OrderBy: #{order_by} ", :size => self.order_no_font_size,:align => :left end move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule @@ -87,7 +87,7 @@ class OrderItemCustomisePdf < Prawn::Document def order_items(order_item, options, alt_name, precision, before_updated_qty) y_position = cursor - #Add Order Item + #Add Order Item add_order_items(order_item, options, alt_name, precision) dash(1, :space => 1, :phase => 1) @@ -129,7 +129,7 @@ class OrderItemCustomisePdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_item_pdf.rb b/app/pdf/order_item_pdf.rb index 58937093..ed079aeb 100755 --- a/app/pdf/order_item_pdf.rb +++ b/app/pdf/order_item_pdf.rb @@ -130,7 +130,7 @@ class OrderItemPdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_item_slim_pdf.rb b/app/pdf/order_item_slim_pdf.rb index 33e1e314..3e39644f 100755 --- a/app/pdf/order_item_slim_pdf.rb +++ b/app/pdf/order_item_slim_pdf.rb @@ -130,7 +130,7 @@ class OrderItemSlimPdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_item_star_pdf.rb b/app/pdf/order_item_star_pdf.rb index 711fb81e..2686efd7 100644 --- a/app/pdf/order_item_star_pdf.rb +++ b/app/pdf/order_item_star_pdf.rb @@ -130,7 +130,7 @@ class OrderItemStarPdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_set_item_customise_pdf.rb b/app/pdf/order_set_item_customise_pdf.rb index ce3e654f..2e1d0a2c 100644 --- a/app/pdf/order_set_item_customise_pdf.rb +++ b/app/pdf/order_set_item_customise_pdf.rb @@ -144,7 +144,7 @@ class OrderSetItemCustomisePdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_set_item_pdf.rb b/app/pdf/order_set_item_pdf.rb index a02dc3e2..09cdc6db 100755 --- a/app/pdf/order_set_item_pdf.rb +++ b/app/pdf/order_set_item_pdf.rb @@ -143,7 +143,7 @@ class OrderSetItemPdf < Prawn::Document # add option y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left end end diff --git a/app/pdf/order_summary_customise_pdf.rb b/app/pdf/order_summary_customise_pdf.rb index f434ac7d..8ffedca0 100644 --- a/app/pdf/order_summary_customise_pdf.rb +++ b/app/pdf/order_summary_customise_pdf.rb @@ -12,9 +12,9 @@ class OrderSummaryCustomisePdf < 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 => [print_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height]) @@ -28,18 +28,18 @@ class OrderSummaryCustomisePdf < Prawn::Document }) font "#{print_settings.font}" - fallback_fonts ["Courier", "Helvetica", "Times-Roman"] + fallback_fonts ["Courier", "Helvetica", "Times-Roman"] end # font "public/fonts/Zawgyi-One.ttf" # font "public/fonts/padauk.ttf" - + if !order[0].dining.nil? text "#{ order[0].type + '-' + order[0].dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20 else text "#{ print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20 end - + stroke_horizontal_rule move_down 5 @@ -55,31 +55,31 @@ class OrderSummaryCustomisePdf < Prawn::Document end # Write Order Information to PDF - def order_info(order_no, order_by, order_at) + def order_info(order_no, order_by, order_at) #booking ID booking_id = get_booking_id(order_no) y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Booking: #{booking_id}", :size => self.order_no_font_size,:align => :left - end - - move_down 1 - y_position = cursor - bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "OrderNo: #{order_no} ", :size => self.order_no_font_size,:align => :left + text "Booking: #{booking_id}", :size => self.order_no_font_size,:align => :left end move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "OrderBy: #{order_by} ", :size => self.order_no_font_size,:align => :left + text "OrderNo: #{order_no} ", :size => self.order_no_font_size,:align => :left end move_down 1 y_position = cursor bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do - text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left + text "OrderBy: #{order_by} ", :size => self.order_no_font_size,:align => :left + end + + move_down 1 + y_position = cursor + bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do + text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.order_no_font_size,:align => :left end stroke_horizontal_rule @@ -93,7 +93,7 @@ class OrderSummaryCustomisePdf < Prawn::Document #Add Order Item add_order_items(order_item, alt_name, precision) - + end # Add order items under order info @@ -103,7 +103,7 @@ class OrderSummaryCustomisePdf < Prawn::Document move_down 5 order_item.each do|odi| - # check for item not to show + # check for item not to show # if odi.price != 0 y_position = cursor @@ -120,7 +120,7 @@ class OrderSummaryCustomisePdf < Prawn::Document text "#{odi.item_code} - #{odi.item_name}", :size => self.item_font_size,:align => :left end - + if alt_name if !(odi.alt_name).empty? move_down 4 @@ -128,15 +128,15 @@ class OrderSummaryCustomisePdf < Prawn::Document text "(#{odi.alt_name})", :size => self.item_font_size,:align => :left, :inline_format => true # end end - + end # add option options = odi.options == "[]"? "" : odi.options - + if options != "" move_down 5 - + y_position = cursor bounding_box([0,y_position], :width => self.item_width) do text "#{options}", :size => self.item_font_size,:align => :left @@ -151,7 +151,7 @@ class OrderSummaryCustomisePdf < Prawn::Document stroke_horizontal_line 0, (self.page_width - self.margin) move_down 5 # end - end + end end def get_booking_id(order_no) diff --git a/app/views/reports/dailysale/index.html.erb b/app/views/reports/dailysale/index.html.erb index 5f7e35e0..3347408a 100755 --- a/app/views/reports/dailysale/index.html.erb +++ b/app/views/reports/dailysale/index.html.erb @@ -26,10 +26,58 @@
| <%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to ? @to.utc.getlocal.strftime("%Y-%b-%d") : '-'%> | +<%= t("views.right_panel.detail.from_date") %> : <%= @from.utc.getlocal.strftime("%Y-%b-%d") rescue '-' %> - <%= t("views.right_panel.detail.to_date") %> : <%= @to.utc.getlocal.strftime("%Y-%b-%d") rescue '-'%> | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= t("views.right_panel.detail.shift_name") %> = <%= @shift_from %> - <%= @shift_to %> ( <%= cashier_name %> ) | ||||||||||||||||||||
| <%= t("views.right_panel.detail.dining") %> | <%= t("views.right_panel.detail.receipt_no") %> | @@ -41,8 +40,21 @@<%= result.receipt_no rescue '-' %> | <%= result.cashier_name rescue '-' %> | -<%= result.total_amount rescue '-' %> | -<%= result.total_discount rescue '-' %> | - - <% if !result.sale_taxes.empty? %> - <% num = 1 - if tax_flag && tax_count > 0 %> - <% while num <= tax_count %> -0 | - <% num += 1 - end %> +<%= number_with_precision(result.total_amount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | +<%= number_with_precision(result.total_discount, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | + <% if !result.sale_taxes.empty? %> + <% num = 1 %> + <% if tax_flag && tax_count > 0 %> + <% while num <= tax_count %> +<%= number_with_precision(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | + <% num += 1 %> + <% end %> <% end %> <% result.sale_taxes.each do |tax| %> -- <%= tax.tax_payable_amount rescue '-' %> - | - <%end%> - <% num = 1 +<%= number_with_precision(tax.tax_payable_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | + <% end %> + <% num = 1 if tax_flag==false && tax_count > 0 %> <% while num <= tax_count %> -0 | +<%= number_with_precision(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | <% num += 1 end %> <% end %> - <% else %> - <% @tax_profiles.each do |tax| %> -0 | - <% end %> - <%end%> - -<%= result.grand_total - result.rounding_adjustment %> | -<%= result.rounding_adjustment.to_f rescue '-' %> | -<%= result.grand_total rescue '-'%> | + <% else %> + <% @tax_profiles.each do |tax| %> +<%= number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | + <% end %> + <%end%> +<%= number_with_precision(result.grand_total - result.rounding_adjustment, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | +<%= number_with_precision(result.rounding_adjustment.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | +<%= number_with_precision(result.grand_total, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | - <% end %>
| - | <%= total_sum rescue '-'%> | -<%= discount_amt rescue '-'%> | - +<%= number_with_precision(total_sum, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | +<%= number_with_precision(discount_amt, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | <% if !@sale_taxes.empty? %> <% num = 1 if ttax_flag && ttax_count > 0 %> <% while num <= ttax_count %> -0.00 | +<%= number_with_precision(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | <% num += 1 end %> <% end %> <% @sale_taxes.each do |tax| %> -- <%= tax.st_amount.to_f.round(2) %> - | +<%= number_with_precision(tax.st_amount, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | <%end%> <% num = 1 if ttax_flag==false && ttax_count > 0 %> <% while num <= ttax_count %> -0.00 | +<%= number_with_precision(0, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | <% num += 1 end %> <% end %> <% else %> <% @tax_profiles.each do |tax| %> -0.00 | +<%= number_with_precision(0, precision: precision.to_i ,delimiter: delimiter) rescue '-' %> | <% end %> <%end%> -<%= grand_total.to_f.round(2) rescue '-'%> | -<%= rounding_adj rescue '-'%> | -<%= grand_total.to_f.round + rounding_adj %> | +<%= number_with_precision(old_grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '0' %> | +<%= number_with_precision(rounding_adj.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | +<%= number_with_precision(grand_total.to_f, precision: precision.to_i, delimiter: delimiter) rescue '-' %> | ||
| @@ -173,8 +175,10 @@ | <%= t("views.right_panel.detail.grand_total") %> + <%= t("views.right_panel.detail.rnd_adj_sh") %> |
+ + | ||||||||||||||||||