update all report generate and excel

This commit is contained in:
Aung Myo
2017-12-19 16:27:00 +06:30
parent aec3b17127
commit bba3aa7631
8 changed files with 31 additions and 13 deletions

View File

@@ -40,7 +40,7 @@ class OrderItemPdf < Prawn::Document
text "#{ order_item.type + '-' + order_item.dining + print_status }", :size => self.header_font_size,:align => :center, :left_margin => -20
stroke_horizontal_rule
move_down 5
move_down 3
#order_info
order_info(order_item.order_id, order_item.order_by,order_item.order_at)
@@ -56,13 +56,13 @@ class OrderItemPdf < Prawn::Document
text "OrderNo: #{order_no} ", :size => self.item_font_size,:align => :left
end
move_down 5
move_down 2
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "OrderBy: #{order_by} ", :size => self.item_font_size,:align => :left
end
move_down 5
move_down 2
y_position = cursor
bounding_box([0,y_position], :width => self.item_width, :height => self.item_height) do
text "Date: #{order_at.utc.getlocal.strftime("%Y-%m-%d %I:%M %p")}", :size => self.item_font_size,:align => :left

View File

@@ -4,7 +4,7 @@ class ReceiptBillPdf < Prawn::Document
def initialize(printer_settings, sale_items, sale_data, customer_name, item_price_by_accounts, discount_price_by_accounts, member_info = nil,rebate_amount = nil,shop_details, printed_status,current_balance)
self.page_width = printer_settings.page_width
self.page_height = printer_settings.page_height
self.margin = 5
self.margin = 0
self.price_width = 40
self.qty_width = 20
self.total_width = 40
@@ -20,7 +20,7 @@ class ReceiptBillPdf < Prawn::Document
# @double = @qty_width * 1.3
# @half_qty = @qty_width / 2
#setting page margin and width
super(:margin => [printer_settings.heading_space, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
super(:margin => [20, self.margin, self.margin, self.margin], :page_size => [self.page_width, self.page_height])
# db font setup
if printer_settings.font != ""
@@ -74,7 +74,7 @@ class ReceiptBillPdf < Prawn::Document
end
def header (shop_details)
move_down 7
move_down 5
text "#{shop_details.name}", :left_margin => -10, :size => self.header_font_size,:align => :center
move_down 5
text "#{shop_details.address}", :size => self.item_font_size,:align => :center