sale items pdf

This commit is contained in:
Zoey
2019-05-30 13:28:24 +06:30
parent 46dd96d0bb
commit b45c639631
4 changed files with 65 additions and 27 deletions

View File

@@ -105,7 +105,7 @@ class SaleItemsPdf < Prawn::Document
text "From Date : ", :size => self.item_font_size,:align => :left
end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do
text "#{ from_date}" , :size => self.item_font_size,:align => :left
text "#{ from_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left
end
y_position = cursor
@@ -113,14 +113,14 @@ class SaleItemsPdf < Prawn::Document
text "To Date : ", :size => self.item_font_size,:align => :left
end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do
text "#{ to_date}" , :size => self.item_font_size,:align => :left
text "#{ to_date.utc.getlocal.strftime("%d-%m-%Y")}" , :size => self.item_font_size,:align => :left
end
y_position = cursor
bounding_box([0,y_position], :width =>@label_name_width, :height => self.item_height) do
text "Shift : ", :size => self.item_font_size,:align => :left
end
bounding_box([@label_name_width,y_position], :width => @label_item_width, :height => self.item_height) do
bounding_box([@label_name_width,y_position], :width => @label_item_width) do
text "#{shift}" , :size => self.item_font_size,:align => :left
end
@@ -148,7 +148,7 @@ class SaleItemsPdf < Prawn::Document
arr = Array.new
unless sale_items.nil?
JSON.parse(sale_items).each do |item|
sale_items.each do |item|
if !arr.include?(item['menu_category_id'])