Class: Xrechnung::TaxSubtotal
- Inherits:
-
Object
- Object
- Xrechnung::TaxSubtotal
- Includes:
- MemberContainer
- Defined in:
- lib/xrechnung/tax_subtotal.rb
Overview
cac:TaxSubtotal <cbc:TaxableAmount currencyID="EUR">1294.30</cbc:TaxableAmount> <cbc:TaxAmount currencyID="EUR">207.09</cbc:TaxAmount> cac:TaxCategory cbc:IDS</cbc:ID> cbc:Percent16.00</cbc:Percent> cac:TaxScheme cbc:IDVAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal>
Instance Attribute Summary collapse
- #tax_amount ⇒ Xrechnung::Currency
- #tax_category ⇒ Xrechnung::TaxCategory
- #taxable_amount ⇒ Xrechnung::Currency
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ TaxSubtotal
constructor
A new instance of TaxSubtotal.
-
#to_xml(xml) ⇒ Object
noinspection RubyResolve.
Methods included from MemberContainer
Constructor Details
#initialize(**kwargs) ⇒ TaxSubtotal
Returns a new instance of TaxSubtotal.
33 34 35 36 |
# File 'lib/xrechnung/tax_subtotal.rb', line 33 def initialize(**kwargs) super self.taxable_amount ||= Currency::EUR(0) end |
Instance Attribute Details
#tax_amount ⇒ Xrechnung::Currency
24 |
# File 'lib/xrechnung/tax_subtotal.rb', line 24 member :tax_amount, type: Xrechnung::Currency |
#tax_category ⇒ Xrechnung::TaxCategory
28 |
# File 'lib/xrechnung/tax_subtotal.rb', line 28 member :tax_category, type: Xrechnung::TaxCategory |
#taxable_amount ⇒ Xrechnung::Currency
20 |
# File 'lib/xrechnung/tax_subtotal.rb', line 20 member :taxable_amount, type: Xrechnung::Currency |
Instance Method Details
#to_xml(xml) ⇒ Object
noinspection RubyResolve
39 40 41 42 43 44 45 |
# File 'lib/xrechnung/tax_subtotal.rb', line 39 def to_xml(xml) xml.cac :TaxSubtotal do xml.cbc :TaxableAmount, *taxable_amount.xml_args xml.cbc :TaxAmount, *tax_amount.xml_args tax_category&.to_xml(xml) end end |