Class: SAFT::V2::HTML::Customer
- Inherits:
-
Object
- Object
- SAFT::V2::HTML::Customer
- Defined in:
- lib/saft/v2/html.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
Instance Method Summary collapse
-
#initialize(customer) ⇒ Customer
constructor
A new instance of Customer.
- #name ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(customer) ⇒ Customer
Returns a new instance of Customer.
571 572 573 |
# File 'lib/saft/v2/html.rb', line 571 def initialize(customer) @customer = customer end |
Instance Attribute Details
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
569 570 571 |
# File 'lib/saft/v2/html.rb', line 569 def customer @customer end |
Instance Method Details
#name ⇒ Object
583 584 585 |
# File 'lib/saft/v2/html.rb', line 583 def name customer.name end |
#title ⇒ Object
575 576 577 578 579 580 581 |
# File 'lib/saft/v2/html.rb', line 575 def title " \#{customer.name} \#{customer.registration_number}\n opening balance \#{HTML.format_big_decimal(customer.opening_debit_balance || -customer.opening_credit_balance)}\n closing balance \#{HTML.format_big_decimal(customer.closing_debit_balance || -customer.closing_credit_balance)}\n TEXT\nend\n" |