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
|
product_name = item.product_name
|
||||||
|
|
||||||
if item.status = 'promotion' && (item.remark =='promotion nett price' || item.remark == 'promotion discount')
|
# 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
|
# sub_total += -item.price #(item.qty*item.unit_price) - comment for room charges
|
||||||
qty = -item.qty
|
# qty = -item.qty
|
||||||
total_price = -item.price #item.qty*item.unit_price - comment for room charges
|
# total_price = -item.price #item.qty*item.unit_price - comment for room charges
|
||||||
price = -item.unit_price
|
# price = -item.unit_price
|
||||||
else
|
# else
|
||||||
sub_total += item.price #(item.qty*item.unit_price) - comment for room charges
|
sub_total += item.price #(item.qty*item.unit_price) - comment for room charges
|
||||||
qty = item.qty
|
qty = item.qty
|
||||||
total_price = item.price #item.qty*item.unit_price - comment for room charges
|
total_price = item.price #item.qty*item.unit_price - comment for room charges
|
||||||
price = item.unit_price
|
price = item.unit_price
|
||||||
|
|
||||||
end
|
# end
|
||||||
|
|
||||||
|
|
||||||
if !show_price.nil? && show_price.value.to_i>0
|
if !show_price.nil? && show_price.value.to_i>0
|
||||||
|
|||||||
Reference in New Issue
Block a user