34 lines
1.5 KiB
Smarty
Executable File
34 lines
1.5 KiB
Smarty
Executable File
<table border="1" width="100%">
|
|
{foreach from=$ventas item=suc key=header}
|
|
<thead>
|
|
<tr style="background:#CCC;text-align:center">
|
|
<th colspan="3"><b>{$suc.nombre|urldecode}</b></th>
|
|
</tr>
|
|
<tr style="background:#E0E5E7;text-align:center">
|
|
<th><b>Nombre del Vendedor</b></th><th><b>Total de venta</b></th><th><b>Comision</b></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$suc.vendedor item=it1 key=k1}
|
|
<tr>
|
|
<td style="text-align:center">{($it1.nombre|utf8_encode)|urldecode} {($it1.apellidos|utf8_encode)|urldecode}</td>
|
|
<td style="text-align:right; padding-right:20px">${$it1.totalventas|number_format:2:'.':','}</td>
|
|
<td style="text-align:right; padding-right:20px">${$it1.comisionVendedor|number_format:2:'.':','}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
<tbody>
|
|
<th style="background:#F9F9F9">Venta Total</th>
|
|
<th colspan="2" style="background:#F9F9F9"><b>${$suc.ventasucursal|number_format:2:'.':','}</b></th>
|
|
</tbody>
|
|
{/foreach}
|
|
|
|
{if $Usr.type == "admin" || $Usr.type == "centralizador" || $Usr.type == "almacen"}
|
|
<tr height="20px"><td colspan="3"></td></tr>
|
|
<tbody>
|
|
<th style="background:#F9F9F9">Venta General</th>
|
|
<th colspan="2" style="background:#F9F9F9"><b>${$ventaTotal|number_format:2:'.':','}</b></th>
|
|
</tbody>
|
|
{/if}
|
|
|
|
</table> |