re-fixed in production
This commit is contained in:
@@ -493,7 +493,7 @@ def self.get_by_range_by_saleitems(from,to,status,report_type)
|
||||
JOIN employees ea ON ea.id = sales.cashier_id")
|
||||
|
||||
|
||||
query = query.where("receipt_date between ? and ? and sale_status=?",from,to,status)
|
||||
query = query.where("(receipt_date between ? and ? and sale_status=?) AND i.unit_price <> 0",from,to,status)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -386,10 +386,10 @@ class ReceiptBillPdf < Prawn::Document
|
||||
y_position = cursor
|
||||
item_price_by_accounts.each do |ipa|
|
||||
y_position = cursor
|
||||
bounding_box([0,y_position], :width =>self.item_description_width, :height => self.item_height) do
|
||||
bounding_box([0,y_position], :width =>self.label_width) do
|
||||
text "#{ ipa[:name] }", :size => self.item_font_size,:align => :left
|
||||
end
|
||||
bounding_box([self.item_description_width,y_position], :width =>self.label_width) do
|
||||
bounding_box([self.label_width,y_position], :width =>self.item_description_width) do
|
||||
text "#{number_with_precision(ipa[:price], :precision => precision.to_i, :delimiter => delimiter)}" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user