<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <template id="report_tax">
        <t t-call="web.html_container">
            <t t-set="data_report_margin_top" t-value="12"/>
            <t t-set="data_report_header_spacing" t-value="9"/>
            <t t-set="data_report_dpi" t-value="110"/>
            <t t-call="web.internal_layout">
                <div class="page">
                    <h3>PDV izvještaj</h3>
                    <div class="row">
                        <div class="col-4">
                            <strong>Preduzeće:</strong>
                            <p t-esc="res_company.name"/>
                        </div>
                        <div class="col-4">
                            <t>
                                <strong>Datum od :</strong>
                                <span t-esc="data['date_from']"/>
                            </t>
                            <br/>
                            <t>
                                <strong>Datum do :</strong>
                                <span t-esc="data['date_to']"/>
                            </t>
                        </div>
                        <div class="col-4">
                            <strong>Knjiženja:</strong>
                            <p>
                                <span t-if="data['target_move'] == 'all'">Sve stavke</span>
                                <span t-if="data['target_move'] == 'posted'">Sve što je proknjiženo</span>
                            </p>
                        </div>

                    </div>
                    <table class="table table-sm table-reports">
                        <thead>
                            <tr align="left">
                                <th>Prodaja</th>
                                <th>Osnovica</th>
                                <th>PDV</th>
                            </tr>
                        </thead>
                        <tr align="right" t-foreach="lines['sale']" t-as="line">
                            <td>
                                <span t-esc="line.get('name')"/>
                            </td>
                            <td>
                                <span t-att-style="style" t-esc="line.get('net')"
                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                            </td>
                            <td>
                                <span t-att-style="style" t-esc="line.get('tax')"
                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                            </td>
                        </tr>
                        <br/>
                        <tr align="left">
                            <td>
                                <strong>Nabavke</strong>
                            </td>
                            <td></td>
                            <td></td>
                        </tr>
                        <tr align="right" t-foreach="lines['purchase']" t-as="line">
                            <td>
                                <span t-esc="line.get('name')"/>
                            </td>
                            <td>
                                <span t-att-style="style" t-esc="line.get('net')"
                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                            </td>
                            <td>
                                <span t-att-style="style" t-esc="line.get('tax')"
                                      t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/>
                            </td>
                        </tr>
                    </table>
                </div>
            </t>
        </t>
    </template>

</odoo>
