Class: FacturX::Totals
- Inherits:
-
Object
- Object
- FacturX::Totals
- Defined in:
- lib/factur_x/totals.rb
Overview
The document level totals (BT-106 to BT-115). The gem never derives these; the invoicing domain supplies them and they are checked for coherence against the lines and the VAT breakdowns.
Instance Attribute Summary collapse
-
#allowance_total ⇒ Object
readonly
Returns the value of attribute allowance_total.
-
#charge_total ⇒ Object
readonly
Returns the value of attribute charge_total.
-
#due_payable ⇒ Object
readonly
Returns the value of attribute due_payable.
-
#grand_total ⇒ Object
readonly
Returns the value of attribute grand_total.
-
#line_total ⇒ Object
readonly
Returns the value of attribute line_total.
-
#prepaid ⇒ Object
readonly
Returns the value of attribute prepaid.
-
#rounding_amount ⇒ Object
readonly
Returns the value of attribute rounding_amount.
-
#tax_basis_total ⇒ Object
readonly
Returns the value of attribute tax_basis_total.
-
#tax_total ⇒ Object
readonly
Returns the value of attribute tax_total.
Instance Method Summary collapse
-
#initialize(line_total:, tax_basis_total:, grand_total:, due_payable:, tax_total: nil, allowance_total: nil, charge_total: nil, rounding_amount: nil, prepaid: nil) ⇒ Totals
constructor
A new instance of Totals.
Constructor Details
#initialize(line_total:, tax_basis_total:, grand_total:, due_payable:, tax_total: nil, allowance_total: nil, charge_total: nil, rounding_amount: nil, prepaid: nil) ⇒ Totals
Returns a new instance of Totals.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/factur_x/totals.rb', line 13 def initialize(line_total:, tax_basis_total:, grand_total:, due_payable:, tax_total: nil, allowance_total: nil, charge_total: nil, rounding_amount: nil, prepaid: nil) @line_total = line_total @allowance_total = allowance_total @charge_total = charge_total @tax_basis_total = tax_basis_total @tax_total = tax_total @rounding_amount = rounding_amount @grand_total = grand_total @prepaid = prepaid @due_payable = due_payable end |
Instance Attribute Details
#allowance_total ⇒ Object (readonly)
Returns the value of attribute allowance_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def allowance_total @allowance_total end |
#charge_total ⇒ Object (readonly)
Returns the value of attribute charge_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def charge_total @charge_total end |
#due_payable ⇒ Object (readonly)
Returns the value of attribute due_payable.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def due_payable @due_payable end |
#grand_total ⇒ Object (readonly)
Returns the value of attribute grand_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def grand_total @grand_total end |
#line_total ⇒ Object (readonly)
Returns the value of attribute line_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def line_total @line_total end |
#prepaid ⇒ Object (readonly)
Returns the value of attribute prepaid.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def prepaid @prepaid end |
#rounding_amount ⇒ Object (readonly)
Returns the value of attribute rounding_amount.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def rounding_amount @rounding_amount end |
#tax_basis_total ⇒ Object (readonly)
Returns the value of attribute tax_basis_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def tax_basis_total @tax_basis_total end |
#tax_total ⇒ Object (readonly)
Returns the value of attribute tax_total.
10 11 12 |
# File 'lib/factur_x/totals.rb', line 10 def tax_total @tax_total end |