change func: for receipt bill

This commit is contained in:
phyusin
2018-05-17 16:39:59 +06:30
parent 34fd712f5e
commit 3838ee29e0
2 changed files with 6 additions and 2 deletions

View File

@@ -207,7 +207,9 @@ class ReceiptBillA5Pdf < Prawn::Document
# check for item not to show
if item.price != 0
sub_total += item.price #(item.qty*item.unit_price) - comment for room charges
total_qty += item.qty
if item.status != 'Discount' && item.qty > 0
total_qty += item.qty
end
qty = item.qty
total_price = item.price #item.qty*item.unit_price - comment for room charges
price = item.unit_price

View File

@@ -201,7 +201,9 @@ class ReceiptBillPdf < Prawn::Document
# check for item not to show
if item.price != 0
sub_total += item.price #(item.qty*item.unit_price) - comment for room charges
total_qty += item.qty
if item.status != 'Discount' && item.qty > 0
total_qty += item.qty
end
qty = item.qty
total_price = item.price #item.qty*item.unit_price - comment for room charges
price = item.unit_price