<?xml version="1.0" encoding="UTF-8"?>

<templates>

    <t t-name="odex30_account_base_import.accountImportTemplate">
        <ControlPanel/>
        <div class="container text-justify overflow-auto h-100">
            <div class="d-flex flex-column my-5 pt-4">
                <div class="title">
                    <h1>
                        Accounting Import Options
                    </h1>
                    <p>
                        Use predefined format to import your data faster.
                    </p>
                </div>
                <t t-if="countryCode === 'BE'">
                    <div class="winbooks-import pt-4">
                        <h2 class="text-primary">
                            Winbooks
                        </h2>
                        <p>
                            Winbooks is an old school Belgian accounting software acquired by Exact.
                            Use the
                            <a class="fw-bold" href="#" t-on-click.prevent="() => this._openModuleInstallation('account_winbooks_import')">
                                Account Winbooks Import module
                            </a>
                            to import a Winbooks full back-up (Maintenance > Backup) to get the chart of accounts, contacts, taxes, history of journal entries, and documents.
                            Support versions: Winbooks Desktop 5.50, 6, 7, 8.
                        </p>
                    </div>
                </t>
                <t t-if="['FR', 'LU'].includes(countryCode) || isFecImportModuleInstalled">
                    <div class="fec-import pt-4">
                        <h2 class="text-primary">
                            FEC
                        </h2>
                        <p>
                            Most accounting software in France support exporting FEC file for audit purposes.
                            Use the
                            <a class="fw-bold" href="#" t-on-click.prevent="() => this._openModuleInstallation('l10n_fr_fec_import')">
                                FEC Import module
                            </a>
                            to import the FEC file. We will setup your charts of accounts and the history of journal entries.
                        </p>
                    </div>
                </t>
                <t t-if="['DK', 'LT', 'LU', 'NO', 'RO'].includes(countryCode)">
                    <div class="saft-import pt-4">
                        <h2 class="text-primary">
                            SAF-T
                        </h2>
                        <p>
                            Most accounting software in Europe support exporting SAF-T file for audit purposes.
                            Use the
                            <a class="fw-bold" href="#" t-on-click.prevent="() => this._openModuleInstallation('account_saft_import')">
                                SAF-T Import module
                            </a>
                            to import the SAF-T file. <br/>
                            We will setup your charts of accounts and the history of journal entries, that will stay in draft.
                        </p>
                    </div>
                </t>
                <t t-if="countryCode === 'SE'">
                    <div class="sie-import pt-4">
                        <h2 class="text-odoo">
                            SIE 4/5
                        </h2>
                        <p>
                            The SIE standard file format is very common in Sweden for several purposes such as auditing, importing and exporting data
                            from and to other accounting applications. Odoo support importing data from both type 4 and 5 of SIE.
                            <ul>
                                <li>
                                    <a class="fw-bold" href="#" t-on-click.prevent="() => this._openModuleInstallation('l10n_se_sie4_import')">
                                        SIE 4 Import module
                                    </a>
                                    is required to import the SIE 4 files.
                                    By design, it's also backward compatible with previous SIE versions (version 1 up to 3).
                                    This import will not validate the correctness of the file.
                                </li>
                                <li>
                                    <a class="fw-bold" href="#" t-on-click.prevent="() => this._openModuleInstallation('l10n_se_sie_import')">
                                        SIE 5 Import module
                                    </a>
                                    is required to import the SIE 5 and SIE 5 entry files.
                                    For general SIE 5, we will set up your charts of accounts balances, journals, partners, and the history of journal entries
                                    (journals data must be present in the file).
                                    For the SIE 5 entry, only entries and partners will be created, the rest must already be present in the system.
                                </li>
                            </ul>
                        </p>
                        <div class="d-flex gap-2 sie-import-buttons"/>
                    </div>
                </t>
                <div class="excel-import pt-4">
                    <h2 class="text-primary">
                        Excel Import
                    </h2>
                    <p>
                        Use templates to import CSV or Excel for your accounting setup.
                    </p>
                    <ol class="d-flex flex-column flex-lg-row">
                        <li class="pt-4">
                            <div class="row">
                                <div class="col-lg-10">
                                    <h3>Import contacts</h3>
                                    <p>Import customers or suppliers (partners) and their contacts using a
                                        <a class="fw-bold" href="/base/static/xls/res_partner.xlsx" aria-label="Download" title="Download">
                                            template.
                                        </a>
                                    </p>
                                    <button type="button" class="btn btn-primary" t-on-click="() => this._importAccountGuideAction('odex30_account_base_import.action_partner_import')">Import Contacts</button>
                                </div>
                                <div class="col-lg-2 border-start"/>
                            </div>
                        </li>
                        <li class="pt-4">
                            <div class="row">
                                <div class="col-lg-10">
                                    <h3>Import Chart of Accounts</h3>
                                    <p>Import the Chart of Accounts and initial balances using a
                                        <a class="fw-bold" href="/account/static/xls/coa_import_template.xlsx" aria-label="Download" title="Download">
                                            template.
                                        </a>
                                    </p>
                                    <button type="button" class="btn btn-primary" t-on-click="() => this._importAccountGuideAction('odex30_account_base_import.action_account_import')" style="margin-right: 2px;">Import CoA</button>
                                    or<button type="button" class="btn btn-link px-2" t-on-click="() => this._importAccountGuideAction('odex30_account_base_import.action_open_coa_setup')">Review Manually</button>
                                </div>
                                <div class="col-lg-2 border-start"/>
                            </div>
                        </li>
                        <li class="pt-4">
                            <div class="row">
                                <div class="col-lg-10">
                                    <h3>Import Journal Items</h3>
                                    <p>Optional, but useful to import open receivables &amp; payables using a
                                        <a class="fw-bold" href="/account/static/xls/aml_import_template.xlsx" aria-label="Download" title="Download">
                                            template.
                                        </a>
                                    </p>
                                    <button type="button" class="btn btn-primary" t-on-click="() => this._importAccountGuideAction('odex30_account_base_import.action_account_move_line_import')">Import Journal Items</button>
                                </div>
                            </div>
                        </li>
                    </ol>
                    <div class="pt-5 pb-5">
                        <p>Tip: we recommend importing your initial balances using the Chart of Account import. Only use the Journal Items import for unreconciled entries in your Payable and Receivable Accounts.</p>
                    </div>
                </div>

            </div>

        </div>
    </t>

</templates>
