update paymal response record and show double payment
This commit is contained in:
@@ -254,7 +254,8 @@ class ReceiptBillPdf < Prawn::Document
|
||||
def sale_payment(sale_data,precision,delimiter)
|
||||
stroke_horizontal_rule
|
||||
move_down 5
|
||||
SalePayment.where('sale_id = ?', sale_data.sale_id).each do |payment|
|
||||
sale_payments = SalePayment.select("SUM(sale_payments.payment_amount) as payment_amount,sale_payments.payment_method").where('sale_id = ?', sale_data.sale_id).group("payment_method")
|
||||
sale_payments.each do |payment|
|
||||
y_position = cursor
|
||||
if payment.payment_method == "paypar"
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
@@ -441,6 +442,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
move_down 73
|
||||
text "Approved By" , :size => self.item_font_size,:align => :center
|
||||
end
|
||||
break;
|
||||
end
|
||||
end
|
||||
if sale_data.payment_status == "foc"
|
||||
|
||||
Reference in New Issue
Block a user