52 lines
1.2 KiB
PHP
Executable File
52 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
$empresa->AuthUser();
|
|
|
|
if(!$usuario->AllowPage($page, $_SESSION['loginKey'])){
|
|
header('Location: '.WEB_ROOT);
|
|
exit;
|
|
}
|
|
|
|
$ventaId = intval($_GET['ventaId']);
|
|
$sucursalId = $_SESSION['idSuc'];
|
|
|
|
$venta->setVentaId($ventaId);
|
|
$info = $venta->Info();
|
|
|
|
$usuario->setUsuarioId($info['vendedorId']);
|
|
$info['vendedor'] = $usuario->GetFullNameById();
|
|
|
|
$usuario->setUsuarioId($info['usuarioId']);
|
|
$info['usuario'] = $usuario->GetFullNameById();
|
|
|
|
$sucursal->setSucursalId($info['sucursalId']);
|
|
$info['sucursal'] = utf8_decode(urldecode($sucursal->GetNameById()));
|
|
|
|
$venta->setVentaId($ventaId);
|
|
$resProds = $venta->GetSingleProds();
|
|
|
|
$_SESSION['prodDesc'] = array();
|
|
|
|
$productos = array();
|
|
foreach($resProds as $res){
|
|
|
|
$venta->setVentaId($ventaId);
|
|
$venta->setProdItemId($res['prodItemId']);
|
|
$res['cantidad'] = $venta->GetCantProdsByItem();
|
|
$res['precioUnitario'] = $venta->GetMaxPrecioByItem();
|
|
$res['total'] = $venta->GetTotalByItem();
|
|
|
|
$producto->setProductoId($res['productoId']);
|
|
$res['nombre'] = $producto->GetModeloById();
|
|
|
|
$res['tipoDesc'] = '';
|
|
|
|
$productos[] = $res;
|
|
}
|
|
|
|
$_SESSION['prodDesc'] = $productos;
|
|
|
|
$smarty->assign('productos', $productos);
|
|
$smarty->assign('info', $info);
|
|
|
|
?>
|