Class: SAFT::V2::HTML::Supplier
- Inherits:
-
Object
- Object
- SAFT::V2::HTML::Supplier
- Defined in:
- lib/saft/v2/html.rb
Instance Attribute Summary collapse
-
#supplier ⇒ Object
readonly
Returns the value of attribute supplier.
Instance Method Summary collapse
-
#initialize(supplier) ⇒ Supplier
constructor
A new instance of Supplier.
- #name ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize(supplier) ⇒ Supplier
Returns a new instance of Supplier.
595 596 597 |
# File 'lib/saft/v2/html.rb', line 595 def initialize(supplier) @supplier = supplier end |
Instance Attribute Details
#supplier ⇒ Object (readonly)
Returns the value of attribute supplier.
593 594 595 |
# File 'lib/saft/v2/html.rb', line 593 def supplier @supplier end |
Instance Method Details
#name ⇒ Object
607 608 609 |
# File 'lib/saft/v2/html.rb', line 607 def name supplier.name end |
#title ⇒ Object
599 600 601 602 603 604 605 |
# File 'lib/saft/v2/html.rb', line 599 def title <<~TEXT #{supplier.name} #{supplier.registration_number} opening balance #{HTML.format_big_decimal(supplier.opening_debit_balance || -supplier.opening_credit_balance)} closing balance #{HTML.format_big_decimal(supplier.closing_debit_balance || -supplier.closing_credit_balance)} TEXT end |