<html>

<head>
    <title>Itemized Report</title>
    <style>
        td.header {
            background-color: gray;
            text-transform: uppercase;
            font-weight: bold;
            color: white;
        }
    </style>
</head>

<body>
<table cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <td>
            <big>Itemized Report</big>
            <br />
            <br /> Company name : {{config.company_name}}
            <br /> DateTime Start : {{datetime_start}}
            <br /> DateTime End : {{datetime_end}}
            <br />
        </td>
        <td width="235">
            <img src="WickedSWLogo.gif" />
        </td>
    </tr>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>


{{#each category}}

<table cellspacing="5">
    <tr>
        <td width="2100" height="10" colspan="4"></td>
    </tr>
    <tr>
        <td width="2100" colspan="4" class="header">{{name}}</td>
    </tr>
    <tr>
        <td width="1400" class="header">Item Name</td>
        <td width="300" class="header">Total Quantity Sold</td>
        <td width="300" class="header">Total Weight Sold</td>
        <td width="100" class="header">Subtotal</td>
    </tr>
    {{#each item}}
    <tr>
        <td>{{name}}</td>
        <td>{{Sum 'quantity' invoice_line_close}}</td>
        <td>{{Sum 'weight' invoice_line_close}}</td>
        <td>{{Sum 'subtotal' invoice_line_close}}</td>
    </tr>
    {{/each}}
</table>
{{/each}}

</body>

</html>
