<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="Asset/font-awesome.min.css">
    <style type="text/css">

        table {
            border-collapse: collapse;
            width: 100%;
            margin-bottom: 50px;
        }

        th,
        td {
            text-align: left;
            width: 50%;
        }


        .invoice-info-table {
            width: 100%;
            font-size: 18px;
            text-align: left;
        }
    </style>
</head>
<body style="font-family:FontAwesome; margin:3%">
    <div>
        <div style="padding-bottom: 0">
            <h1 style='float:left; color :#1EB0FC'>
                <b>Daily Sales Summary</b>
            </h1>
            <br style="clear:both;">
        </div>
        <div style="width: 100%;overflow: hidden;">
            <div style="float: left; line-height:50%">
                <h3>Company Name : {{config.company_name}}</h3>
                <h3>Time From : {{datetime_start}}</h3>
                <h3>Time To : {{datetime_end}}</h3>
            </div>
        </div>
        <div>
            {{#each daily}}
            <table style="font-size:20px; font-weight: 600; width: 100%; text-align:left; margin-bottom: 0;">
                <tbody>
                    <tr>
                        <td>Payment Type</td>
                        <td>Total</td>
                    </tr>
                </tbody>
            </table>


            <table style="font-size:18px;width: 100%; text-align:left; ">
                <tbody>
                    <tr style="font-size:18px; font-weight: 600; border-top: 2px solid #000; border-bottom:2px solid #000;">
                        <td>
                            {{date}}
                        </td>
                        <td></td>
                    </tr>
                    {{#each payment}}
                    <tr>
                        <td>{{label}}</td>
                        <td>S$ {{data}}</td>
                    </tr>
                    {{/each}}
                    <tr>
                        <td>No. Voided Invoice</td>
                        <td>x {{Count invoice_void}}</td>
                    </tr>

                    <tr>
                        <td>No. Paid Invoice</td>
                        <td>x {{Count invoice_close}}</td>
                    </tr>
                    <tr>
                        <td>Service Charge</td>
                        <td>S$ {{Sum 'service_charge' invoice_close}}</td>
                    </tr>
                    <tr>
                        <td>GST</td>
                        <td>S$ {{Sum 'tax' invoice_close}}</td>
                    </tr>
                    <tr>
                        <td>Discount</td>
                        <td>S$ {{discount}}</td>
                    </tr>

                    <tr>
                        <td>Rounding</td>
                        <td>S$ {{Sum 'rounding' invoice_close}}</td>
                    </tr>
                    <tr>
                        <td style="font-weight: 600;">Gross</td>
                        <td>S$ {{gross}}</td>
                    </tr>
                    <tr>
                        <td style="font-weight: 600;">Nett</td>
                        <td>S$ {{nett}}</td>
                    </tr>
                </tbody>
            </table>
            {{/each}}
            <table style="border-top: 2px solid #000; font-size: 20px; font-weight: 600;">  
                {{#each payment}}
                <tr>
                    <td>
                        {{name}}
                    </td>
                    <td>
                        S$ {{subtotal}}
                    </td>
                </tr> 
                {{/each}}     
                <tr>
                    <td>No. Voided Invoice</td>
                    <td>x {{Count invoice_void}}</td>
                </tr>

                <tr>
                    <td>No. Paid Invoice</td>
                    <td>x {{Count invoice_close}}</td>
                </tr>
                <tr>
                    <td>Service Charge</td>
                    <td>S$ {{Sum 'service_charge' invoice_close}}</td>
                </tr>
                <tr>
                    <td>GST</td>
                    <td>S$ {{Sum 'tax' invoice_close}}</td>
                </tr>
                <tr>
                    <td>Discount</td>
                    <td>S$ {{discount}}</td>
                </tr>
                <tr>
                    <td>Rounding</td>
                    <td>S$ {{Sum 'rounding' invoice_close}}</td>
                </tr>
                <tr>
                    <td>
                        Total Gross
                    </td>
                    <td>
                        S$ {{gross_sale}}
                    </td>
                </tr>
                <tr>
                    <td>
                        Total Nett
                    </td>
                    <td>
                        S$ {{net_sale}}
                    </td>
                </tr>
            </table>

        </div>
    </div>

</body>
</html>