Files
ventas_php/ajax/templates_c/22932b63ddaf66740b2dddbd73f75614c4bf6b39.file.reportes-prod-prov-item.tpl.php

352 lines
19 KiB
PHP
Executable File

<?php /* Smarty version Smarty3-b7, created on 2014-06-27 05:44:23
compiled from "/home/novomoda/domains/novomoda.com.mx/public_html/sistema/templates/lists/reportes-prod-prov-item.tpl" */ ?>
<?php /*%%SmartyHeaderCode:108225702953ad4b07cd45f5-47601480%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'22932b63ddaf66740b2dddbd73f75614c4bf6b39' =>
array (
0 => '/home/novomoda/domains/novomoda.com.mx/public_html/sistema/templates/lists/reportes-prod-prov-item.tpl',
1 => 1403865853,
),
),
'nocache_hash' => '108225702953ad4b07cd45f5-47601480',
'function' =>
array (
),
'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_modifier_date_format')) include '/home/novomoda/domains/novomoda.com.mx/public_html/sistema/libs/plugins/modifier.date_format.php';
?><table width="<?php echo $_smarty_tpl->getVariable('width')->value;?>
" cellpadding="0" cellspacing="0" id="tblProdProv" border="0" bgcolor="#FFFFFF" class="sortable">
<thead>
<tr>
<th width="60"></th>
<th width="60"></th>
<th width="100"></th>
<th width="100"></th>
<th width="200"></th>
<th width="60"></th>
<?php $_smarty_tpl->tpl_vars['mes'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['mes']->key => $_smarty_tpl->tpl_vars['mes']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['mes']->key;
?>
<th width="400" colspan="6"><b><?php echo $_smarty_tpl->getVariable('mes')->value;?>
</b></th>
<?php }} ?>
<th width="100"></th>
<th width="80"></th>
<th width="80"></th>
<th width="100"></th>
<th width="80"></th>
<th width="80"></th>
<th width="100"></th>
</tr>
<tr>
<th>Depto.</th>
<th>L&iacute;nea</th>
<th>Clave</th>
<th><b>C&oacute;digo</b></th>
<th><b>Producto</b></th>
<th><b>No. Prov.</b></th>
<?php $_smarty_tpl->tpl_vars['mes'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['mes']->key => $_smarty_tpl->tpl_vars['mes']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['mes']->key;
?>
<th><b>Inicial</b></th>
<th><b>Entrada</b></th>
<th><b>Salida</b></th>
<th><b>Ajuste Entrada</b></th>
<th><b>Ajuste Salida</b></th>
<th><b>Bloqueados</b></th>
<?php }} ?>
<th><b>Ultima Compra</b></th>
<th><b>Total Piezas</b></th>
<th><b>Costo</b></th>
<th><b>Importe Total de Inv.</b></th>
<th><b>Total Ventas</b></th>
<th><b>Precio Venta</b></th>
<th><b>Importe Total Ventas</b></th>
</tr>
</thead>
<?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('suc')->value['categorias']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
?>
<tr>
<td align="center"><?php echo $_smarty_tpl->getVariable('item')->value['prodCatId'];?>
</td>
<td align="center"><?php echo $_smarty_tpl->getVariable('item')->value['prodSubcatId'];?>
</td>
<td align="left" colspan="2"><?php echo $_smarty_tpl->getVariable('item')->value['nombre'];?>
</td>
<td align="left"></td>
<td align="center"></td>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<?php }} ?>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="right"></td>
</tr>
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('item')->value['prodCatId'];?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['iS'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kS'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('suc')->value['subcategorias'][$_tmp1]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['iS']->key => $_smarty_tpl->tpl_vars['iS']->value){
$_smarty_tpl->tpl_vars['kS']->value = $_smarty_tpl->tpl_vars['iS']->key;
?>
<tr>
<td align="center"><?php echo $_smarty_tpl->getVariable('item')->value['prodCatId'];?>
</td>
<td align="center"><?php echo $_smarty_tpl->getVariable('iS')->value['prodSubcatId'];?>
</td>
<td align="left" colspan="2"><?php echo $_smarty_tpl->getVariable('iS')->value['nombre'];?>
</td>
<td align="left"></td>
<td align="center"></td>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<?php }} ?>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="right"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
</tr>
<?php ob_start();?><?php echo $_smarty_tpl->getVariable('item')->value['prodCatId'];?>
<?php $_tmp2=ob_get_clean();?><?php ob_start();?><?php echo $_smarty_tpl->getVariable('iS')->value['prodSubcatId'];?>
<?php $_tmp3=ob_get_clean();?><?php $_smarty_tpl->tpl_vars['iP'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('suc')->value['productos'][$_tmp2][$_tmp3]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['iP']->key => $_smarty_tpl->tpl_vars['iP']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['iP']->key;
?>
<tr>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"><?php echo $_smarty_tpl->getVariable('iP')->value['codigoBarra'];?>
</td>
<td align="left"><?php echo $_smarty_tpl->getVariable('iP')->value['modelo'];?>
</td>
<td align="center"><?php echo $_smarty_tpl->getVariable('iP')->value['proveedorId'];?>
</td>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['iniciales'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['entradas'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['salidas'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['entradasA'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['salidasA'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['bloqueados'][$_smarty_tpl->getVariable('kP')->value],0,'.','');?>
</td>
<?php }} ?>
<td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->getVariable('iP')->value['fecha'],"%d-%m-%Y");?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['totalPzas'],0,'.','');?>
</td>
<td align="center">$<?php echo number_format($_smarty_tpl->getVariable('iP')->value['costo'],2,'.','');?>
</td>
<td align="right">$<?php echo number_format($_smarty_tpl->getVariable('iP')->value['importe'],2,'.','');?>
&nbsp;</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['totalVtas'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['precioVta'],2,'.','');?>
</td>
<td align="right"><?php echo number_format($_smarty_tpl->getVariable('iP')->value['importeVtas'],2,'.','');?>
&nbsp;</td>
</tr>
<?php }} else { ?>
<tr><td colspan="<?php echo $_smarty_tpl->getVariable('colspan')->value;?>
" align="center">Ning&uacute;n producto encontrado.</td></tr>
<?php } ?>
<tr>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"><b>TOTAL LINEA</b></td>
<td align="center"></td>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['inicial'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['entradas'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['salidas'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['entradasA'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['salidasA'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']][$_smarty_tpl->getVariable('kP')->value]['bloqueados'],0,'.','');?>
</td>
<?php }} ?>
<td align="center"></td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']]['totalPzas'],0,'.','');?>
</td>
<td align="center"></td>
<td align="right">$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']]['importe'],2,'.',',');?>
&nbsp;</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']]['totalVtas'],0,'.','');?>
</td>
<td align="center"></td>
<td align="right">$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSubs'][$_smarty_tpl->getVariable('iS')->value['prodSubcatId']]['importeVtas'],2,'.',',');?>
&nbsp;</td>
</tr>
<?php }} ?>
<tr>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"></td>
<td align="center"><b>TOTAL DEPTO.</b></td>
<td align="center"></td>
<?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['p']->key;
?>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['inicial'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['entradas'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['salidas'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['entradasA'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['salidasA'],0,'.','');?>
</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']][$_smarty_tpl->getVariable('kP')->value]['bloqueados'],0,'.','');?>
</td>
<?php }} ?>
<td align="center"></td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']]['totalPzas'],0,'.','');?>
</td>
<td align="center"></td>
<td align="right">$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']]['importe'],2,'.',',');?>
&nbsp;</td>
<td align="center"><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']]['totalVtas'],0,'.','');?>
</td>
<td align="center"></td>
<td align="right">$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totCats'][$_smarty_tpl->getVariable('item')->value['prodCatId']]['importeVtas'],2,'.',',');?>
&nbsp;</td>
</tr>
<?php }} ?>
</tbody>
</table>
<?php if (count($_smarty_tpl->getVariable('suc')->value['productos'])>0){?>
<table width="<?php echo $_smarty_tpl->getVariable('width')->value;?>
" cellpadding="0" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr>
<th width="60"></th>
<th width="60"></th>
<th width="100"></th>
<th width="100"></th>
<th width="200"><b>TOTALES</b></th>
<th width="60"></th>
<?php $_smarty_tpl->tpl_vars['mes'] = new Smarty_Variable;
$_smarty_tpl->tpl_vars['kP'] = new Smarty_Variable;
$_from = $_smarty_tpl->getVariable('periodo')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if (count($_from) > 0){
foreach ($_from as $_smarty_tpl->tpl_vars['mes']->key => $_smarty_tpl->tpl_vars['mes']->value){
$_smarty_tpl->tpl_vars['kP']->value = $_smarty_tpl->tpl_vars['mes']->key;
?>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totIniciales'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totEntradas'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSalidas'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totEntradasA'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totSalidasA'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<td width="60" align="center"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totBloqueadosA'][$_smarty_tpl->getVariable('kP')->value],0,'.',',');?>
</b></td>
<?php }} ?>
<th width="100"></th>
<th width="80"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totPzas'],0,'.',',');?>
</b></th>
<th width="80"></th>
<th width="100"><b>$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totImporte'],2,'.',',');?>
</b></th>
<th width="80"><b><?php echo number_format($_smarty_tpl->getVariable('suc')->value['totVtas'],0,'.',',');?>
</b></th>
<th width="80"></th>
<th width="100"><b>$<?php echo number_format($_smarty_tpl->getVariable('suc')->value['totImporteVtas'],2,'.',',');?>
</b></th>
</tr>
</tbody>
</table>
<?php }?>