edit for shop_code query
This commit is contained in:
@@ -5,7 +5,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
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, kbz_pay_status, qr_code, sale_items, sale_data, customer_account, 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, transaction_ref)
|
||||
def initialize(printer_settings, kbz_pay_status, qr_code, sale_items, sale_data, customer_account, item_price_by_accounts, discount_price_by_accounts, member_info, rebate_amount, shop_details, printed_status, current_balance, card_data, other_charges_amount, latest_order_no, card_balance_amount, transaction_ref = nil)
|
||||
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
|
||||
@@ -72,8 +72,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
else
|
||||
customer(customer_account,nil)
|
||||
end
|
||||
puts "Card data = >" +card_data
|
||||
puts "Printed =>" + printed_status
|
||||
|
||||
#start card sale trans data
|
||||
if card_data != nil
|
||||
card_sale_data(card_data)
|
||||
@@ -693,7 +692,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
query = sale_data.sale_payments
|
||||
.merge(SalePayment.where.not(payment_method: 'creditnote')
|
||||
.or(SalePayment.where.not(SalePayment.arel_table[:payment_amount].lteq(sale_data.sale_payments.joins(:sale_audit).sum(:payment_amount)))))
|
||||
|
||||
|
||||
query.each do |payment|
|
||||
if payment.payment_method == "creditnote"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user