<?xml version="1.0" encoding="utf-8"?>
<odoo auto_sequence="1">
    <record id="tax_report" model="account.report">
        <field name="name">Singapore Tax Report</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.sg"/>
        <field name="filter_fiscal_position" eval="True"/>
        <field name="availability_condition">country</field>
        <field name="column_ids">
            <record id="tax_report_balance" model="account.report.column">
                <field name="name">Balance</field>
                <field name="expression_label">balance</field>
            </record>
        </field>
        <field name="line_ids">
            <record id="account_tax_report_line_supplies" model="account.report.line">
                <field name="name">Supplies</field>
                <field name="aggregation_formula">BOX1.balance + BOX2.balance + BOX3.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="account_tax_report_line_std_rated_supplies" model="account.report.line">
                        <field name="name">Box 1 - Total value of standard-rated supplies</field>
                        <field name="code">BOX1</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_std_rated_supplies_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 1</field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_zero_rated_supplies" model="account.report.line">
                        <field name="name">Box 2 - Total value of zero-rated supplies</field>
                        <field name="code">BOX2</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_zero_rated_supplies_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 2</field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_exempt_supplies" model="account.report.line">
                        <field name="name">Box 3 - Total value of exempt supplies</field>
                        <field name="code">BOX3</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_exempt_supplies_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 3</field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_total_supplies" model="account.report.line">
                        <field name="name">Box 4 - Total value of (1) + (2) + (3)</field>
                        <field name="aggregation_formula">BOX1.balance + BOX2.balance + BOX3.balance</field>
                    </record>
                </field>
            </record>
            <record id="account_tax_report_line_purchases" model="account.report.line">
                <field name="name">Purchases</field>
                <field name="aggregation_formula">BOX_5.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="account_tax_report_line_total_taxable_purchases" model="account.report.line">
                        <field name="name">Box 5 - Total value of taxable purchases</field>
                        <field name="code">BOX_5</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_total_taxable_purchases_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 5</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="account_tax_report_line_taxes" model="account.report.line">
                <field name="name">Taxes</field>
                <field name="aggregation_formula">BOX6.balance + BOX7.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="account_tax_report_line_output_tax_due" model="account.report.line">
                        <field name="name">Box 6 - Output tax due</field>
                        <field name="code">BOX6</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_output_tax_due_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 6</field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_inp_tax_refund_claim" model="account.report.line">
                        <field name="name">Box 7 - Less : Input tax and refunds claimed</field>
                        <field name="code">BOX7</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_inp_tax_refund_claim_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 7</field>
                            </record>
                        </field>
                    </record>
                    <record id="account_tax_report_line_total_gst_paid_iras" model="account.report.line">
                        <field name="name">Box 8 - Equals : Net GST to be paid to IRAS</field>
                        <field name="aggregation_formula">BOX6.balance - BOX7.balance</field>
                    </record>
                </field>
            </record>
            <record id="account_tax_report_line_applicable" model="account.report.line">
                <field name="name">Applicable to Taxable Persons under Major Exported Scheme / Approved 3rd Party Logistics Company / Other Approved Schemes Only</field>
                <field name="aggregation_formula">BOX_9.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="account_tax_report_line_applicable_goods_imported_value" model="account.report.line">
                        <field name="name">Box 9 - Total value of goods imported under this scheme</field>
                        <field name="code">BOX_9</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_applicable_goods_imported_value_tag" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">Box 9</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
            <record id="account_tax_report_line_revenues" model="account.report.line">
                <field name="name">Revenue</field>
                <field name="aggregation_formula">BOX_13.balance</field>
                <field name="hierarchy_level">0</field>
                <field name="children_ids">
                    <record id="account_tax_report_line_revenues_accounting_period" model="account.report.line">
                        <field name="name">Box 13 - Revenue for the accounting period</field>
                        <field name="code">BOX_13</field>
                        <field name="expression_ids">
                            <record id="account_tax_report_line_revenues_accounting_period_formula" model="account.report.expression">
                                <field name="label">balance</field>
                                <field name="engine">aggregation</field>
                                <field name="formula">OPINC.balance</field>
                                <field name="subformula">cross_report</field>
                            </record>
                        </field>
                    </record>
                </field>
            </record>
        </field>
    </record>
</odoo>
