265 lines
7.4 KiB
Handlebars
265 lines
7.4 KiB
Handlebars
<center>
|
|
<h2>
|
|
Stock Card
|
|
</h2>
|
|
<h3>
|
|
{{company_name}}
|
|
</h3>
|
|
<h4>
|
|
From {{date_from}} to {{date_to}}
|
|
</h4>
|
|
</center>
|
|
{{#if loc_view}}
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="2">Location</th>
|
|
<th colspan="{{#if show_qty2}}3{{else}}2{{/if}}" style="text-align:center">In</th>
|
|
<th colspan="{{#if show_qty2}}3{{else}}2{{/if}}" style="text-align:center">Out</th>
|
|
<th colspan="{{#if show_qty2}}3{{else}}2{{/if}}" style="text-align:center">Balance</th>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each lines}}
|
|
<tr>
|
|
<td>
|
|
<a href="ui#name=report_stock_card&defaults.location_id={{loc_id}}&defaults.date_from{{../date_from}}&defaults.date_to={{../date_to}}">
|
|
{{loc_name}}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{currency total_in_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency total_in_amount}}
|
|
</td>
|
|
<td>
|
|
{{currency total_in_qty2}}
|
|
</td>
|
|
<td>
|
|
{{currency total_out_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency total_out_amount}}
|
|
</td>
|
|
<td>
|
|
{{currency total_out_qty2}}
|
|
</td>
|
|
<td>
|
|
{{currency total_bl_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency total_bl_amount}}
|
|
</td>
|
|
<td>
|
|
{{currency total_bl_qty2}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
<tfoot>
|
|
</tfoot>
|
|
</table>
|
|
{{else}}
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="2">Date</th>
|
|
<th rowspan="2">Ref</th>
|
|
<th rowspan="2">Lot / Serial Number</th>
|
|
<th rowspan="2">Invoice</th>
|
|
<th colspan="{{#if show_qty2}}4{{else}}3{{/if}}" style="text-align:center">In</th>
|
|
<th colspan="{{#if show_qty2}}4{{else}}3{{/if}}" style="text-align:center">Out</th>
|
|
<th colspan="{{#if show_qty2}}4{{else}}3{{/if}}" style="text-align:center">Balance</th>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Unit Price
|
|
</th>
|
|
<th>
|
|
Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Unit Price
|
|
</th>
|
|
<th>
|
|
Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
<th>
|
|
Qty
|
|
</th>
|
|
<th>
|
|
Cost Price
|
|
</th>
|
|
<th>
|
|
Cost Amount
|
|
</th>
|
|
{{#if show_qty2}}
|
|
<th>
|
|
Secondary Qty
|
|
</th>
|
|
{{/if}}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each groups context=context}}
|
|
<tr>
|
|
<th colspan="20">
|
|
{{product_name}}
|
|
@ {{location_name}}
|
|
</th>
|
|
</tr>
|
|
{{#each lines context=context}}
|
|
<tr>
|
|
<td>
|
|
{{date}}
|
|
</td>
|
|
<td>
|
|
{{view "link" string=ref action="view_stock_transaction" active_id=id context=context}}
|
|
</td>
|
|
<td>
|
|
{{view "link" string=lot_num action="stock_lot" action_options="mode=form" active_id=lot_id context=context}}
|
|
</td>
|
|
<td>
|
|
{{view "link" string=invoice_num action="view_invoice" active_id=invoice_id context=context}}
|
|
</td>
|
|
<td>
|
|
{{currency in_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency in_unit_price}}
|
|
</td>
|
|
<td>
|
|
{{currency in_amount}}
|
|
</td>
|
|
{{#if ../../show_qty2}}
|
|
<td>
|
|
{{currency in_qty2}}
|
|
</td>
|
|
{{/if}}
|
|
<td>
|
|
{{currency out_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency out_unit_price}}
|
|
</td>
|
|
<td>
|
|
{{currency out_amount}}
|
|
</td>
|
|
{{#if ../../show_qty2}}
|
|
<td>
|
|
{{currency out_qty2}}
|
|
</td>
|
|
{{/if}}
|
|
<td>
|
|
{{currency bal_qty}}
|
|
</td>
|
|
<td>
|
|
{{currency bal_cost_price}}
|
|
</td>
|
|
<td>
|
|
{{currency bal_cost_amount}}
|
|
</td>
|
|
{{#if ../../show_qty2}}
|
|
<td>
|
|
{{currency bal_qty2}}
|
|
</td>
|
|
{{/if}}
|
|
</tr>
|
|
{{/each}}
|
|
<tr>
|
|
<td>
|
|
</td>
|
|
<th>
|
|
Total
|
|
</th>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<th>
|
|
{{currency total_in_qty}}
|
|
</th>
|
|
<td>
|
|
</td>
|
|
<th>
|
|
{{currency total_in_amount}}
|
|
</th>
|
|
{{#if ../show_qty2}}
|
|
<th>
|
|
{{currency total_in_qty2}}
|
|
</th>
|
|
{{/if}}
|
|
<th>
|
|
{{currency total_out_qty}}
|
|
</th>
|
|
<td>
|
|
</td>
|
|
<th>
|
|
{{currency total_out_amount}}
|
|
</th>
|
|
{{#if ../show_qty2}}
|
|
<th>
|
|
{{currency total_out_qty2}}
|
|
</th>
|
|
{{/if}}
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{/if}}
|