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

    <!--Template for hotel folio rest order -->
    <template id="report_rest_order">
        <t t-call="web.html_container">
            <t t-call="web.external_layout">
                <div class="page">
                    <br />
                    <br />
                    <div class="row">
                        <h2>
                            <span>
                                <center>Restaurants Reservation Order Details
                                </center>
                            </span>
                        </h2>
                    </div>
                    <div class="row mt32 mb32">
                        <div class="text-center">
                            <strong>From:</strong>
                            <span t-esc="data['date_start']" />
                            <strong>To:</strong>
                            <span t-esc="data['date_end']" />
                        </div>
                    </div>
                    <t t-if="data['check'] == True">
                        <div>
                            <table t-foreach="GetRest" t-as="info" width="100%">
                                <table class="table table-bordered">
                                    <tr>
                                        <td width="40%">
                                            <strong>Folio Number :</strong>
                                        </td>
                                        <td width="60%">
                                            <span t-esc="info.get('folio_name', '')" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="40%">
                                            <strong>Customer Name :</strong>
                                        </td>
                                        <td width="60%">
                                            <span
                                                t-esc="info.get('customer_name', '')"
                                            />
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <table class="table table-bordered">
                                    <tr>
                                        <td>
                                            <strong>Order Number.</strong>
                                        </td>
                                        <td>
                                            <strong>Order Date</strong>
                                        </td>
                                        <td>
                                            <strong>Items</strong>
                                        </td>
                                        <td>
                                            <strong>State</strong>
                                        </td>
                                        <td>
                                            <strong>Total</strong>
                                        </td>
                                    </tr>
                                    <t
                                        t-foreach="info.get('order_data', '')"
                                        t-as="infodata"
                                    >
                                        <tr>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_no', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_date', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_len', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('state', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('amount_total', '')"
                                                />
                                            </td>
                                        </tr>
                                    </t>
                                </table>
                            </table>
                        </div>
                    </t>
                    <t t-if="data['check'] == False">
                        <table class="table table-bordered">
                            <tr>
                                <td>
                                    <strong>Folio No.</strong>
                                </td>
                                <td>
                                    <strong>Customer Name</strong>
                                </td>
                                <td>
                                    <strong>CheckIN</strong>
                                </td>
                                <td>
                                    <strong>CheckOut</strong>
                                </td>
                                <td>
                                    <strong>Total Orders</strong>
                                </td>
                                <td>
                                    <strong>Total</strong>
                                </td>
                            </tr>
                            <tr t-foreach="GetData" t-as="info">
                                <td>
                                    <span t-esc="info.get('folio_name', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('customer_name', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('checkin_date', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('checkout_date', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('total_order', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('total_amount', '')" />
                                </td>
                            </tr>
                            <t t-foreach="GetData" t-as="info">
                                <t t-if="info.get('total', '')">
                                    <tr>
                                        <td />
                                        <td />
                                        <td />
                                        <td />
                                        <td>
                                            <strong>Net Total:</strong>
                                        </td>
                                        <td>
                                            <span t-esc="info.get('total', '')" />
                                        </td>
                                    </tr>
                                </t>
                            </t>
                        </table>
                    </t>
                </div>
            </t>
        </t>
    </template>

    <!--Template for hotel folio reserved order -->
    <template id="report_reserv_order">
        <t t-call="web.html_container">
            <t t-call="web.external_layout">
                <div class="page">
                    <br />
                    <br />
                    <div class="row">
                        <h2>
                            <span>
                                <center>Restaurants Orders Details</center>
                            </span>
                        </h2>
                    </div>
                    <div class="row mt32 mb32">
                        <div class="text-center">
                            <strong>From:</strong>
                            <span t-esc="data['date_start']" />
                            <strong>To:</strong>
                            <span t-esc="data['date_end']" />
                        </div>
                    </div>
                    <t t-if="data['check'] == True">
                        <div>
                            <table t-foreach="GetReserv" t-as="info" width="100%">
                                <table class="table table-bordered">
                                    <tr>
                                        <td width="40%">
                                            <strong>Folio Number :</strong>
                                        </td>
                                        <td width="30%">
                                            <span t-esc="info.get('folio_name', '')" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width="40%">
                                            <strong>Customer Name :</strong>
                                        </td>
                                        <td width="30%">
                                            <span
                                                t-esc="info.get('customer_name', '')"
                                            />
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <table class="table table-bordered">
                                    <tr>
                                        <td>
                                            <strong>Order Number.</strong>
                                        </td>
                                        <td>
                                            <strong>Order Date</strong>
                                        </td>
                                        <td>
                                            <strong>Items</strong>
                                        </td>
                                        <td>
                                            <strong>Tables</strong>
                                        </td>
                                        <td>
                                            <strong>Room No.</strong>
                                        </td>
                                        <td>
                                            <strong>State</strong>
                                        </td>
                                        <td>
                                            <strong>Total</strong>
                                        </td>
                                    </tr>
                                    <t
                                        t-foreach="info.get('order_data', '')"
                                        t-as="infodata"
                                    >
                                        <tr>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_no', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_date', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('order_no', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('table_nos_ids', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('room_id', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('state', '')"
                                                />
                                            </td>
                                            <td>
                                                <span
                                                    t-esc="infodata.get('amount_total', '')"
                                                />
                                            </td>
                                        </tr>
                                    </t>
                                </table>
                            </table>
                        </div>
                    </t>
                    <t t-if="data['check'] == False">
                        <table class="table table-condensed">
                            <tr>
                                <td>
                                    <strong>Folio No.</strong>
                                </td>
                                <td>
                                    <strong>Customer Name</strong>
                                </td>
                                <td>
                                    <strong>CheckIN</strong>
                                </td>
                                <td>
                                    <strong>CheckOut</strong>
                                </td>
                                <td>
                                    <strong>Total Orders</strong>
                                </td>
                                <td>
                                    <strong>Total</strong>
                                </td>
                            </tr>
                            <tr t-foreach="GetData" t-as="info">
                                <td>
                                    <span t-esc="info.get('folio_name', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('customer_name', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('checkin_date', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('checkout_date', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('total_order', '')" />
                                </td>
                                <td>
                                    <span t-esc="info.get('total_amount', '')" />
                                </td>
                            </tr>
                            <t t-foreach="GetData" t-as="info">
                                <t t-if="info.get('total', '')">
                                    <tr>
                                        <td />
                                        <td />
                                        <td />
                                        <td />
                                        <td>
                                            <strong>Net Total:</strong>
                                        </td>
                                        <td>
                                            <span t-esc="info.get('total', '')" />
                                        </td>
                                    </tr>
                                </t>
                            </t>
                        </table>
                    </t>
                </div>
            </t>
        </t>
    </template>

</odoo>
