update db index

This commit is contained in:
Aung Myo
2018-07-04 18:08:15 +06:30
parent bdd20f727e
commit 4f9a4e2984
7 changed files with 49 additions and 47 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