update receipt bill pdf for promotion % and netprice with sub total wrong
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user