class Xrechnung::TaxSubtotal

<cac:TaxSubtotal>

<cbc:TaxableAmount currencyID="EUR">1294.30</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">207.09</cbc:TaxAmount>
<cac:TaxCategory>
  <cbc:ID>S</cbc:ID>
  <cbc:Percent>16.00</cbc:Percent>
  <cac:TaxScheme>
    <cbc:ID>VAT</cbc:ID>
  </cac:TaxScheme>
</cac:TaxCategory>

</cac:TaxSubtotal>

Public Class Methods

new(**kwargs) click to toggle source

@!attribute taxable_amount

@return [Xrechnung::Currency]
Calls superclass method Xrechnung::MemberContainer::new
# File lib/xrechnung/tax_subtotal.rb, line 33
def initialize(**kwargs)
  super
  self.taxable_amount ||= Currency::EUR(0)
end

Public Instance Methods

to_xml(xml) click to toggle source

noinspection RubyResolve

# 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