<?xml version="1.0"?>
<t t-name="account_edi_ubl_cii.ubl_20_TaxTotalType">
        <t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
            <cbc:TaxAmount t-att-currencyID="vals['currency'].name" t-out="format_float(vals.get('tax_amount'), vals.get('currency_dp'))"/>
            <cac:TaxSubtotal t-foreach="vals.get('tax_subtotal_vals', [])" t-as="foreach_vals">
                <cbc:TaxableAmount t-att-currencyID="foreach_vals['currency'].name" t-out="format_float(foreach_vals.get('taxable_amount'), foreach_vals.get('currency_dp'))"/>
                <cbc:TaxAmount t-att-currencyID="foreach_vals['currency'].name" t-out="format_float(foreach_vals.get('tax_amount'), foreach_vals.get('currency_dp'))"/>
                <cbc:Percent t-out="foreach_vals.get('percent')"/>
                <cbc:BaseUnitMeasure t-att="foreach_vals.get('base_unit_measure_attrs', {})" t-out="foreach_vals.get('base_unit_measure')"/>
                <cbc:PerUnitAmount t-att-currencyID="foreach_vals['currency'].name" t-out="foreach_vals.get('per_unit_amount')"/>
                <cac:TaxCategory>
                    <t t-call="{{TaxCategoryType_template}}">
                        <t t-set="vals" t-value="foreach_vals.get('tax_category_vals', {})"/>
                    </t>
                </cac:TaxCategory>
            </cac:TaxSubtotal>
        </t>
    </t>

    