update addorder and show_account_info add shops

This commit is contained in:
Aung Myo
2017-11-22 16:49:34 +06:30
parent d3ceba0a7a
commit fafd6df5e1
5 changed files with 13 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ class ReceiptBillPdf < Prawn::Document
delimiter = ""
end
header( shop_details)
header(shop_details)
stroke_horizontal_rule
@@ -60,12 +60,14 @@ class ReceiptBillPdf < Prawn::Document
customer(customer_name)
if discount_price_by_accounts.length > 0
if discount_price_by_accounts.length > 0 && shop_details.show_account_info
discount_account(discount_price_by_accounts,printer_settings.precision,delimiter)
end
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
if shop_details.show_account_info
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
end
sign(sale_data)
footer(printed_status)
@@ -389,6 +391,8 @@ class ReceiptBillPdf < Prawn::Document
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
end
end
def discount_account(discount_price_by_accounts,precision,delimiter)
move_down 5
stroke_horizontal_rule