Class: Xrechnung::TaxTotal

Inherits:
Object
  • Object
show all
Includes:
MemberContainer
Defined in:
lib/xrechnung/tax_total.rb

Overview

<cbc:TaxAmount currencyID="EUR">297.09</cbc:TaxAmount> 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> cac:TaxSubtotal <cbc:TaxableAmount currencyID="EUR">1285.70</cbc:TaxableAmount> <cbc:TaxAmount currencyID="EUR">90.00</cbc:TaxAmount> cac:TaxCategory cbc:IDS</cbc:ID> cbc:Percent7.00</cbc:Percent> cac:TaxScheme cbc:IDVAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal>

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MemberContainer

#[], #[]=, included, #initialize

Instance Attribute Details

#tax_amountXrechnung::Currency

Returns:



31
# File 'lib/xrechnung/tax_total.rb', line 31

member :tax_amount, type: Xrechnung::Currency

#tax_subtotalsArray

Returns:

  • (Array)


35
# File 'lib/xrechnung/tax_total.rb', line 35

member :tax_subtotals, type: Array, default: []

Instance Method Details

#to_xml(xml) ⇒ Object

noinspection RubyResolve



38
39
40
41
42
43
44
# File 'lib/xrechnung/tax_total.rb', line 38

def to_xml(xml)
  xml.cbc :TaxAmount, *tax_amount.xml_args
  tax_subtotals.each do |tax_subtotal|
    tax_subtotal&.to_xml(xml)
  end
  xml.target!
end