{* smarty *}
{include file="general_header.tpl" menu="reports_menu.tpl" include_jquery=1}
<table width="100%" cellpadding="0" cellspacing="0" border="0">
{include file="element/quick_link.tpl" ql_title="Магазины:"|tr ql_href="$SCRIPT_NAME?current_cashline=" ql_entry=$cashlines ql_current=$smarty.session.current_cashline}
</table>
{include file="tr_validator.tpl"}
<form method="post" onsubmit="return validator(this);">
<table class="simple_form">
<tr>
<td>
{tr С:}
{include file="jq_smarty_date_time.tpl" name="date_from" id="date_from" form_validator="smarty_date_time" value=$date_from}
</td>
<td>
{tr По:}
{include file="jq_smarty_date_time.tpl" name="date_to" id="date_to" form_validator="smarty_date_time" value=$date_to}
</td>
<td>
<input type="submit" name="calculate" value="{tr Показать}" />
</td>
</tr>
</table>
</form>
<table class="simple_form">
<thead class="table_heading_1">
<th> </th>
{foreach from=$report.stocks_total item=t}
<th colspan="3">{$t.name}</th>
{/foreach}
<th colspan="3">{tr ИТОГО}</th>
</thead>
{foreach from=$report.stocks item=s}
<tr>
<td>{$s.name} ({$s.id}) {$s.inn} {$s.enterprise_name}</td>
{foreach from=$report.stocks_total key=k item=t}
<td align="right">{$s.payments[$k].refund|money}</td>
<td align="right"><b>{$s.payments[$k].sale|money}</b></td>
<td align="right"><span class="alert">{$s.payments[$k].total|money}</span></td>
{/foreach}
<td align="right">{$s.total_refund|money}</td>
<td align="right"><b>{$s.total_sale|money}</b></td>
<td align="right"><span class="alert">{$s.total|money}</span></td>
</tr>
{/foreach}
<tr>
<td>{tr ИТОГО}</td>
{foreach from=$report.stocks_total key=k item=t}
<td align="right">{$t.refund|money}</td>
<td align="right"><b>{$t.sale|money}</b></td>
<td align="right"><span class="alert">{$t.total|money}</span></td>
{/foreach}
<td align="right">{$report.total_refund|money}</td>
<td align="right"><b>{$report.total_sale|money}</b></td>
<td align="right"><span class="alert">{$report.total|money}</span></td>
</tr>
</table>
{include file="general_footer.tpl"}