77 lines
1.9 KiB
PHP
Executable File
77 lines
1.9 KiB
PHP
Executable File
<?php
|
|
|
|
$empresa->AuthUser();
|
|
|
|
if($Usr['type'] != 'almacen' && $Usr['type'] != 'compras' && $Usr['type'] != 'gerente' && $Usr['type'] != 'direccion'){
|
|
header('Location: '.WEB_ROOT);
|
|
exit;
|
|
}
|
|
|
|
$envioId = intval($_GET['id']);
|
|
|
|
$_SESSION['envProds'] = array();
|
|
unset($_SESSION['envProds']);
|
|
|
|
if($envioId){
|
|
|
|
$envio->setEnvioId($envioId);
|
|
$infE = $envio->Info();
|
|
|
|
$info['sucursalId'] = $infE['sucOrigen'];
|
|
$info['sucursalId2'] = $infE['sucursalId'];
|
|
|
|
$products = $envio->GetProdsTienda();
|
|
|
|
$productos = array();
|
|
foreach($products as $res){
|
|
|
|
$prodItemId = $res['prodItemId'];
|
|
|
|
$card['cantidad'] = $res['cantidad'];
|
|
|
|
$producto->setProdItemId($prodItemId);
|
|
$infI = $producto->GetInfoItemById();
|
|
|
|
$card['productoId'] = $infI['productoId'];
|
|
|
|
$producto->setProductoId($infI['productoId']);
|
|
$infP = $producto->Info();
|
|
|
|
$nombre = $infP['modelo'].', ';
|
|
$nombre .= $producto->GetAtributosAll();
|
|
|
|
$atribVal->setAtribValId($infI['tallaId']);
|
|
$nombre .= ', '.$atribVal->GetNameById();
|
|
|
|
$atribVal->setAtribValId($infI['colorId']);
|
|
$nombre .= ', '.$atribVal->GetNameById();
|
|
|
|
$card['nombre'] = $nombre;
|
|
$card['prodItemId'] = $prodItemId;
|
|
|
|
$inventario->setSucursalId($info['sucursalId']);
|
|
$inventario->setProdItemId($prodItemId);
|
|
$card['disponible'] = $inventario->GetDisponible();
|
|
|
|
$productos[] = $card;
|
|
|
|
}//foreach
|
|
|
|
$_SESSION['envProds'] = $util->EncodeResult($productos);
|
|
|
|
}//if
|
|
|
|
$resSuc = $sucursal->GetSucursalesByEmpresaId();
|
|
$resSuc2 = $util->DecodeUrlResult($resSuc);
|
|
$sucursales = $util->DecodeResult($resSuc2);
|
|
|
|
$proveedores = $proveedor->EnumerateAll();
|
|
$categorias = $prodCat->EnumerateAll();
|
|
|
|
$smarty->assign('info',$info);
|
|
$smarty->assign('productos',$productos);
|
|
$smarty->assign('sucursales',$sucursales);
|
|
$smarty->assign('categorias', $categorias);
|
|
$smarty->assign('proveedores', $proveedores);
|
|
|
|
?>
|