tweak order_summary and receipt bill pdfs

This commit is contained in:
DevTeam
2025-07-28 17:07:10 +06:30
parent ca6bb56fc3
commit cfa73532db
2 changed files with 70 additions and 7 deletions

View File

@@ -252,7 +252,7 @@ class ReceiptBillPdf < Prawn::Document
show_price = Lookup.find_by_lookup_type("show_price")
sale_items.each do |item|
# check for item not to show
if item.status != 'Discount' && item.qty > 0
if !show_price.nil? && show_price.value.to_i > 0 && item.price == 0
total_qty += item.qty
@@ -263,6 +263,10 @@ class ReceiptBillPdf < Prawn::Document
end
end
if item.qty < 0 && item.status == 'void'
total_qty += item.qty
end
product_name = item.product_name
# if item.status = 'promotion' && (item.remark =='promotion nett price' || item.remark == 'promotion discount')