{"en_US": "<t t-name=\"l10n_es_edi_facturae.invoice_type\">\n            <Invoice>\n                <InvoiceHeader>\n                    <InvoiceNumber t-out=\"invoice['invoice_record'].name\"/>\n                    <InvoiceDocumentType t-out=\"invoice['InvoiceDocumentType']\"/>\n                    <InvoiceClass t-out=\"invoice['InvoiceClass']\"/>\n                    <t t-if=\"refund_multiplier == -1\" t-call=\"l10n_es_edi_facturae.corrective_type\"/>\n                </InvoiceHeader>\n                <InvoiceIssueData>\n                    <IssueDate t-out=\"invoice['invoice_record'].invoice_date.isoformat()\"/>\n                    <OperationDate t-out=\"invoice['InvoiceIssueData'].get('OperationDate')\"/>\n                    <InvoicingPeriod t-if=\"invoice['InvoiceIssueData'].get('InvoicingPeriod')\">\n                        <StartDate t-out=\"invoice['InvoiceIssueData']['InvoicingPeriod']['StartDate']\"/>\n                        <EndDate t-out=\"invoice['InvoiceIssueData']['InvoicingPeriod']['EndDate']\"/>\n                    </InvoicingPeriod>\n                    <InvoiceCurrencyCode t-out=\"invoice['invoice_currency'].name\"/>\n                    <ExchangeRateDetails t-if=\"invoice['InvoiceIssueData'].get('ExchangeRateDetails')\">\n                        <ExchangeRate t-out=\"invoice['InvoiceIssueData']['ExchangeRate']\"/>\n                        <ExchangeRateDate t-out=\"(invoice['invoice_record'].invoice_date or invoice['invoice_record'].date).isoformat()\"/>\n                    </ExchangeRateDetails>\n                    <TaxCurrencyCode t-out=\"invoice['invoice_currency'].name\"/>\n                    <LanguageName t-out=\"invoice['InvoiceIssueData']['LanguageName']\"/>\n                    <ReceiverTransactionReference t-out=\"invoice['InvoiceIssueData']['ReceiverTransactionReference']\"/>\n                    <FileReference t-out=\"invoice['InvoiceIssueData']['FileReference']\"/>\n                    <ReceiverContractReference t-out=\"invoice['InvoiceIssueData']['ReceiverContractReference']\"/>\n                </InvoiceIssueData>\n                <TaxesOutputs>\n                    <t t-foreach=\"invoice['TaxOutputs']\" t-as=\"tax\"><t t-call=\"l10n_es_edi_facturae.tax_type\"/></t>\n                </TaxesOutputs>\n                <TaxesWithheld t-if=\"invoice.get('TaxesWithheld')\">\n                    <t t-foreach=\"invoice['TaxesWithheld']\" t-as=\"tax\"><t t-call=\"l10n_es_edi_facturae.tax_type\"/></t>\n                </TaxesWithheld>\n                <InvoiceTotals>\n                    <TotalGrossAmount t-out=\"float_repr(refund_multiplier*invoice['TotalGrossAmount'], file_currency.decimal_places)\"/>\n                    <GeneralDiscounts t-if=\"invoice.get('GeneralDiscounts')\">\n                        <t t-foreach=\"invoice['GeneralDiscounts']\" t-as=\"discount\">\n                            <Discount>\n                                <DiscountReason t-out=\"discount['DiscountReason']\"/>\n                                <DiscountRate t-out=\"discount.get('DiscountRate')\"/>\n                                <DiscountAmount t-out=\"float_repr(refund_multiplier*discount['DiscountAmount'], file_currency.decimal_places)\"/>\n                            </Discount>\n                        </t>\n                    </GeneralDiscounts>\n                    <GeneralSurcharges t-if=\"invoice.get('GeneralSurcharges')\">\n                        <t t-foreach=\"invoice['GeneralSurcharges']\" t-as=\"charge\">\n                            <Charge>\n                                <ChargeReason t-out=\"charge['ChargeReason']\"/>\n                                <ChargeRate t-out=\"charge.get('ChargeRate')\"/>\n                                <ChargeAmount t-out=\"float_repr(refund_multiplier*charge['ChargeAmount'], file_currency.decimal_places)\"/>\n                            </Charge>\n                        </t>\n                    </GeneralSurcharges>\n                    <TotalGeneralDiscounts t-if=\"invoice.get('TotalGeneralDiscounts')\" t-out=\"float_repr(refund_multiplier*invoice['TotalGeneralDiscounts'], file_currency.decimal_places)\"/>\n                    <TotalGeneralSurcharges t-if=\"invoice.get('TotalGeneralSurcharges')\" t-out=\"float_repr(refund_multiplier*invoice['TotalGeneralSurcharges'], file_currency.decimal_places)\"/>\n                    <TotalGrossAmountBeforeTaxes t-out=\"float_repr(refund_multiplier*invoice['TotalGrossAmountBeforeTaxes'], file_currency.decimal_places)\"/>\n                    <TotalTaxOutputs t-out=\"float_repr(refund_multiplier*invoice['TotalTaxOutputs'], file_currency.decimal_places)\"/>\n                    <TotalTaxesWithheld t-out=\"float_repr(refund_multiplier*invoice['TotalTaxesWithheld'], file_currency.decimal_places)\"/>\n                    <InvoiceTotal t-out=\"float_repr(refund_multiplier*invoice['InvoiceTotal'], file_currency.decimal_places)\"/>\n                    <PaymentsOnAccount t-if=\"invoice.get('PaymentsOnAccount')\">\n                        <t t-foreach=\"invoice['PaymentsOnAccount']\" t-as=\"payment\">\n                            <PaymentOnAccount>\n                                <PaymentOnAccountDate t-out=\"payment['PaymentOnAccountDate']\"/>\n                                <PaymentOnAccountAmount t-out=\"float_repr(refund_multiplier*payment['PaymentOnAccountAmount'], file_currency.decimal_places)\"/>\n                            </PaymentOnAccount>\n                        </t>\n                    </PaymentsOnAccount>\n                    <TotalFinancialExpenses t-if=\"invoice.get('ReimbursableExpensesAmount')\" t-out=\"float_repr(refund_multiplier*invoice['ReimbursableExpensesAmount'], file_currency.decimal_places)\"/>\n                    <TotalOutstandingAmount t-out=\"float_repr(refund_multiplier*invoice['TotalOutstandingAmount'], file_currency.decimal_places)\"/>\n                    <TotalPaymentsOnAccount t-if=\"invoice.get('TotalPaymentsOnAccount')\" t-out=\"float_repr(refund_multiplier*invoice['TotalPaymentsOnAccount'], file_currency.decimal_places)\"/>\n                    <AmountsWithheld t-if=\"invoice.get('AmountsWithheld')\">\n                        <WithholdingReason t-out=\"invoice['AmountsWithheld']['WithholdingReason']\"/>\n                        <WithholdingRate t-out=\"invoice['AmountsWithheld'].get('WithholdingRate')\"/>\n                        <WithholdingAmount t-out=\"float_repr(refund_multiplier*invoice['AmountsWithheld']['WithholdingAmount'], file_currency.decimal_places)\"/>\n                    </AmountsWithheld>\n                    <TotalExecutableAmount t-out=\"float_repr(refund_multiplier*invoice['TotalExecutableAmount'], file_currency.decimal_places)\"/>\n                    <TotalReimbursableExpenses t-if=\"invoice.get('TotalReimbursableExpenses')\" t-out=\"float_repr(refund_multiplier*invoice['TotalReimbursableExpenses'], file_currency.decimal_places)\"/>\n                </InvoiceTotals>\n                <Items>\n                    <t t-foreach=\"invoice['Items']\" t-as=\"line\"><t t-call=\"l10n_es_edi_facturae.invoice_line_type\"/></t>\n                </Items>\n                <PaymentDetails t-if=\"invoice['PaymentDetails']\">\n                    <Installment t-foreach=\"invoice['PaymentDetails']\" t-as=\"installment\">\n                        <InstallmentDueDate t-out=\"installment['InstallmentDueDate']\"/>\n                        <InstallmentAmount t-out=\"float_repr(installment['InstallmentAmount'], 2)\"/>\n                        <PaymentMeans t-out=\"installment['PaymentMeans']\"/>\n                        <AccountToBeCredited>\n                            <IBAN t-out=\"installment['AccountToBeCredited']['IBAN']\"/>\n                            <BIC t-out=\"installment['AccountToBeCredited']['BIC']\"/>\n                        </AccountToBeCredited>\n                    </Installment>\n                </PaymentDetails>\n                <LegalLiterals t-if=\"invoice.get('LegalLiterals')\">\n                    <t t-foreach=\"invoice['LegalLiterals']\" t-as=\"reference\"><LegalReference t-out=\"reference[:250]\"/></t>\n                </LegalLiterals>\n            </Invoice>\n        </t>"}