update paymal response record and show double payment

This commit is contained in:
Aung Myo
2017-12-08 13:59:05 +06:30
parent 8a98af32eb
commit e8626e78f5
5 changed files with 28 additions and 6 deletions

View File

@@ -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"