diff --git a/lib/receipts/base.rb b/lib/receipts/base.rb index 444ae45..d42a197 100644 --- a/lib/receipts/base.rb +++ b/lib/receipts/base.rb @@ -68,6 +68,8 @@ def render_billing_details(company:, recipient:, margin_top: 16) move_down margin_top company_details = [ + company[:company_code], + company[:iban], company[:address], company[:phone], company[:email] diff --git a/test/test_receipts.rb b/test/test_receipts.rb index 3b03be9..5be61d2 100644 --- a/test/test_receipts.rb +++ b/test/test_receipts.rb @@ -49,6 +49,25 @@ def test_invoice_with_arguments ) end + def test_invoice_with_additional_company_data + assert_instance_of Receipts::Invoice, Receipts::Invoice.new( + company: { + name: "Company", + address: "123 Street", + email: "company@example.org", + company_code: "000123", + iban: "LT241997677264666618" + }, + recipient: [], + details: [ + ["Receipt", "123"] + ], + line_items: [ + ["Product", "$10"] + ] + ) + end + def test_statement_with_arguments assert_instance_of Receipts::Statement, Receipts::Statement.new( company: {