Files
ventas_php/ajax/reportes-compras.php

32 lines
1.1 KiB
PHP
Executable File

<?php
include_once('../init.php');
include_once('../config.php');
include_once(DOC_ROOT.'/libraries.php');
//session_start();
$Usr = $user->Info();
echo "en mantenimiento";exit();
$smarty->assign('Usr', $Usr); /* if(isset($_POST['action'])) $_POST['type'] = $_POST['action'];*/
switch($_POST["type"])
{
case "tipoComprado"://reporte de productos mas comprados
$reportes->setFechaI($_POST['fechaI']);
$reportes->setFechaF($_POST['fechaF']);
$smarty->assign("fi",$_POST['fechaI']);
$smarty->assign("ff",$_POST['fechaF']);
$reportes->setOrden($_POST['orden']);
if($reportes->validaF($_POST['fechaI'],$_POST['fechaF']))
{
$resProdCom=$reportes->ProductosComprados();
$resProdCom=$util->DecodeUrlResult($resProdCom);
$smarty->assign("resProdCom",$resProdCom);
$smarty->assign("DOC_ROOT", DOC_ROOT);
$smarty->display(DOC_ROOT.'/templates/lists/reportes-productosCompra.tpl');
}
else
{
echo "<div style=\"text-align:center\">fecha inicial no puede ser mayor que fecha final</div>";
}
break;//fin reporte de productos mas comprados
}//switch
?>