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.
563 564 565 |
# File 'lib/saft/v2/html.rb', line 563 def initialize(customer) @customer = customer end |
Instance Attribute Details
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
561 562 563 |
# File 'lib/saft/v2/html.rb', line 561 def customer @customer end |
Instance Method Details
#name ⇒ Object
575 576 577 |
# File 'lib/saft/v2/html.rb', line 575 def name customer.name end |
#title ⇒ Object
567 568 569 570 571 572 573 |
# File 'lib/saft/v2/html.rb', line 567 def title <<~TEXT #{customer.name} #{customer.registration_number} opening balance #{HTML.format_big_decimal(customer.opening_debit_balance || -customer.opening_credit_balance)} closing balance #{HTML.format_big_decimal(customer.closing_debit_balance || -customer.closing_credit_balance)} TEXT end |