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.
603 604 605 |
# File 'lib/saft/v2/html.rb', line 603 def initialize(supplier) @supplier = supplier end |
Instance Attribute Details
#supplier ⇒ Object (readonly)
Returns the value of attribute supplier.
601 602 603 |
# File 'lib/saft/v2/html.rb', line 601 def supplier @supplier end |
Instance Method Details
#name ⇒ Object
615 616 617 |
# File 'lib/saft/v2/html.rb', line 615 def name supplier.name end |
#title ⇒ Object
607 608 609 610 611 612 613 |
# File 'lib/saft/v2/html.rb', line 607 def title " \#{supplier.name} \#{supplier.registration_number}\n opening balance \#{HTML.format_big_decimal(supplier.opening_debit_balance || -supplier.opening_credit_balance)}\n closing balance \#{HTML.format_big_decimal(supplier.closing_debit_balance || -supplier.closing_credit_balance)}\n TEXT\nend\n" |