Pull from master

This commit is contained in:
San Wai Lwin
2018-07-05 15:42:58 +06:30
parent ebaf4ad418
commit e5eb9b90ad
11 changed files with 78 additions and 104 deletions

View File

@@ -199,9 +199,9 @@ class ReceiptBillPdf < Prawn::Document
move_down line_move
sub_total = 0.0
total_qty = 0.0
show_price = Lookup.find_by_lookup_type("show_price")
sale_items.each do |item|
# check for item not to show
show_price = Lookup.find_by_lookup_type("show_price")
if item.status != 'Discount' && item.qty > 0
if !show_price.nil? && show_price.value.to_i > 0 && item.price == 0