update receipt bill pdf for promotion % and netprice with sub total wrong

This commit is contained in:
Aung Myo
2018-06-20 17:54:31 +06:30
parent 84084303f4
commit e45e17968f

View File

@@ -209,18 +209,18 @@ class ReceiptBillPdf < Prawn::Document
product_name = item.product_name
if item.status = 'promotion' && (item.remark =='promotion nett price' || item.remark == 'promotion discount')
sub_total += -item.price #(item.qty*item.unit_price) - comment for room charges
qty = -item.qty
total_price = -item.price #item.qty*item.unit_price - comment for room charges
price = -item.unit_price
else
# if item.status = 'promotion' && (item.remark =='promotion nett price' || item.remark == 'promotion discount')
# sub_total += -item.price #(item.qty*item.unit_price) - comment for room charges
# qty = -item.qty
# total_price = -item.price #item.qty*item.unit_price - comment for room charges
# price = -item.unit_price
# else
sub_total += item.price #(item.qty*item.unit_price) - comment for room charges
qty = item.qty
total_price = item.price #item.qty*item.unit_price - comment for room charges
price = item.unit_price
end
# end
if !show_price.nil? && show_price.value.to_i>0