<center>
    <h2>จำนวนยาที่ใช้</h2>
    <h3>
        {{parent_company_name}}&nbsp;{{company_name}}<br/>
    </h3>
    <h4>
        ประจำเดือน {{month}} {{year}}
    </h4>
</center>
<table class="table table-bordered">
    <thead>
        {{#each titles}}
            <th style="text-align:center">{{name}}</th>
        {{/each}}
    </thead>
    <tbody>
        {{#each lines}}
            <tr>
                <td style="width:20%;">
                    <a href="/ui#name=product&active_id={{prod_id}}&mode=form"> {{prod_name}} </a>
                </td>
                {{#each sub_lines}}
                    <td style="text-align:center">
                        <a href="/ui#name=clinic_report_medical_detail&defaults.date_from={{time_start}}&defaults.date_to={{time_stop}}&defaults.types={{types}}&defaults.product_id={{product_id}}&defaults.product_categ_id={{product_categ_id}}">{{qty}} </a>
                    </td>
                {{/each}}
            </tr>
        {{/each}}
    </tbody>
    <tfoot>
    </tfoot>
</table>