<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="sales_hourly_view">
        <t t-call="web.html_container">
            <t t-call="web.external_layout">
                <style>
                </style>
                <t class="page">
                    <div class="oe_structure"/>
                    <center>
                        <b>
                            <h3>Hourly Sales Report</h3>
                        </b>
                    </center>
                    <t t-foreach="times" t-as="t">
                        <center>
                            <b>
                                <span t-esc="t['name']" style="font-size:21px;"/>
                            </b>
                        </center>
                        <t t-set="t_amt" t-value="0"/>
                        <table class="table table-condensed">
                            <thead>
                                <tr>
                                    <th>Order Number</th>
                                    <th>Order Date</th>
                                    <t t-if="type=='untax'">
                                        <th>Untaxed Total</th>
                                    </t>
                                    <t t-else="">
                                        <th>Total</th>
                                    </t>
                                </tr>
                            </thead>
                            <tbody>
                                <tr t-foreach="form" t-as="order">
                                    <t t-if="order['time'] == t['id']">
                                        <td>
                                            <span t-esc="order['order']"/>
                                        </td>
                                        <td>
                                            <span t-esc="order['date']"/>
                                        </td>
                                        <td>
                                            <span t-esc="order['amount']"/>
                                            <t t-set="t_amt" t-value="t_amt + order['amount']"></t>

                                        </td>
                                    </t>
                                </tr>
                                <tr>
                                    <td colsapn="3">
                                        <b>
                                            <span>Total Amount</span>
                                        </b>
                                        <t t-esc="t_amt"/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </t>
                </t>
            </t>
        </t>
    </template>
</odoo>