update receipt b9ll qty count with price 0
This commit is contained in:
@@ -212,7 +212,13 @@ class ReceiptBillA5Pdf < Prawn::Document
|
|||||||
|
|
||||||
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
|
||||||
if item.status != 'Discount' && item.qty > 0
|
if item.status != 'Discount' && item.qty > 0
|
||||||
total_qty += item.qty
|
if !show_price.nil? && show_price.value.to_i > 0 && item.price == 0
|
||||||
|
total_qty += item.qty
|
||||||
|
else
|
||||||
|
if item.price != 0
|
||||||
|
total_qty += item.qty
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
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
|
||||||
|
|||||||
@@ -204,7 +204,13 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
show_price = Lookup.find_by_lookup_type("show_price")
|
show_price = Lookup.find_by_lookup_type("show_price")
|
||||||
|
|
||||||
if item.status != 'Discount' && item.qty > 0
|
if item.status != 'Discount' && item.qty > 0
|
||||||
total_qty += item.qty
|
if !show_price.nil? && show_price.value.to_i > 0 && item.price == 0
|
||||||
|
total_qty += item.qty
|
||||||
|
else
|
||||||
|
if item.price != 0
|
||||||
|
total_qty += item.qty
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
product_name = item.product_name
|
product_name = item.product_name
|
||||||
|
|||||||
Reference in New Issue
Block a user