receipt bill order

This commit is contained in:
phyusin
2018-12-10 14:02:40 +06:30
parent b1bd69c70e
commit cb0a1ad34f

View File

@@ -212,13 +212,13 @@ class ReceiptBillOrderPdf < Prawn::Document
text_box "#{number_with_precision(total_qty, :precision => precision.to_i)}", :at =>[item_qty_front_width,y_position], :width => item_qty_end_width, :size => self.item_font_size, :align => :center, :overflow => :shrink_to_fix
text_box "#{number_with_precision(order_reservation.total_amount, :precision => precision.to_i, :delimiter => delimiter)}", :at =>[item_total_front_width,y_position], :width =>item_total_end_width, :size => self.item_font_size, :align => :right, :overflow => :shrink_to_fix
if !order_reservation.delivery_type.nil? && order_reservation.delivery_fee > '0'
if !order_reservation.delivery_type.nil? && order_reservation.delivery_fee.to_f > 0
y_position = cursor
bounding_box([0, y_position], :width =>self.item_description_width , :height => self.item_height) do
text "Delivery Charges(#{order_reservation.delivery_type}) " , :size => self.item_font_size, :align => :left
bounding_box([0, y_position], :width =>self.item_description_width + 5, :height => self.item_height) do
text "Delivery Charges (#{order_reservation.delivery_type}) " , :size => self.item_font_size, :align => :left
end
bounding_box([self.item_description_width,y_position], :width =>self.label_width, :height => self.item_height) do
bounding_box([self.item_description_width + 5,y_position], :width =>self.label_width, :height => self.item_height) do
text "#{number_with_precision(order_reservation.delivery_fee, :precision => precision.to_i, :delimiter => delimiter)}", :size => self.item_font_size,:align => :right
end
end