Primer commit del sistema avantika sin cambios
This commit is contained in:
49
modules/envios-recibir-reporte.php
Executable file
49
modules/envios-recibir-reporte.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
$empresa->AuthUser();
|
||||
|
||||
if(!$usuario->AllowPage($page, $_SESSION['loginKey'])){
|
||||
header('Location: '.WEB_ROOT);
|
||||
exit;
|
||||
}
|
||||
|
||||
$Usr = $user->Info();
|
||||
|
||||
$envio->SetPage($_GET["p"]);
|
||||
$envio->setSucursalId($Usr['sucursalId']);
|
||||
$productos = $envio->EnumRepProd();
|
||||
|
||||
$items = array();
|
||||
foreach($productos['items'] as $res){
|
||||
$card = $res;
|
||||
|
||||
$producto->setProductoId($res['productoId']);
|
||||
$infP = $producto->Info();
|
||||
|
||||
$card['codigoBarra'] = $infP['codigoBarra'];
|
||||
$card['modelo'] = $infP['modelo'];
|
||||
|
||||
$sucursal->setSucursalId($res['sucursalId']);
|
||||
$card['sucursal'] = urldecode($sucursal->GetNameById());
|
||||
|
||||
if($card['tipo'] == 'Faltante')
|
||||
$card['recibido'] = $card['total'] - $card['cantidad'];
|
||||
else
|
||||
$card['recibido'] = $card['total'] + $card['cantidad'];
|
||||
|
||||
$items[] = $card;
|
||||
}
|
||||
$productos['items'] = $items;
|
||||
|
||||
$sucursal->setSucursalId($Usr['sucursalId']);
|
||||
$info['sucursal'] = urldecode($sucursal->GetNameById());
|
||||
|
||||
$resSuc = $sucursal->GetSucursalesByEmpresaId();
|
||||
$resSuc2 = $util->DecodeUrlResult($resSuc);
|
||||
$sucursales = $util->DecodeResult($resSuc2);
|
||||
|
||||
$smarty->assign('info',$info);
|
||||
$smarty->assign('sucursales',$sucursales);
|
||||
$smarty->assign('productos',$productos);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user