function getDatosInternos($factura)
 {
     //BUSCA LOS DATOS DE LA EMPRESA QUE FACTURA.
     $ROUTETOINCLUDE = '../../../../';
     $empresaController = new EmpresaController($ROUTETOINCLUDE);
     $sucursalController = new SucursalController($ROUTETOINCLUDE);
     $selloController = new SelloController($ROUTETOINCLUDE);
     $impuestoController = new ImpuestoController($ROUTETOINCLUDE);
     $rowEmpresa = $empresaController->execute("allId", array("idempresa" => $factura->bu));
     if ($rowEmpresa['cantidad'] < 1) {
         log_action("_ERROR EN EMPRESA PROCESANDO FACTURA ", 1);
     } else {
         $factura->emisor = $rowEmpresa['respuesta'];
     }
     //BUSCA LOS DATOS DE LA SUCURSAL QUE EMITE.
     $rowSucursal = $sucursalController->execute("sucursalId", array("idempresa" => $factura->emisor['idempresa'], "sucursal" => $factura->encabezado->sucursal));
     if ($rowSucursal['cantidad'] > 0) {
         $factura->sucursal = $rowSucursal['respuesta'];
     } else {
         log_action("ERROR EN SUCURSAL PROCESANDO FACTURA", 1);
     }
     //BUSCA LOS DATOS DEl SELLO QUE EMITE.
     $fechahoraemision = $factura->encabezado->fechaemision . " " . $factura->encabezado->horaemision;
     $rowSello = $selloController->execute("selloValido", array("idempresa" => $factura->emisor['idempresa'], "sucursal" => $factura->encabezado->sucursal, "fechaEmision" => $fechahoraemision));
     if ($rowSello['cantidad'] > 0) {
         $factura->sello = $rowSello['respuesta'];
     } else {
         log_action("ERROR EN SELLO PROCESANDO FACTURA ", 1);
         $factura->sello = null;
     }
     $rowIva = $impuestoController->execute("tipoPredeterminado", array("idempresa" => $factura->emisor['idempresa']));
     foreach ($rowIva['respuesta'] as $impuesto) {
         if ($impuesto['tipo'] = 1) {
             $factura->rowIva = $impuesto;
             break;
         }
     }
 }
示例#2
0
<?php

$PAGELEVEL = EMISOR;
$AUTH_redirectTo = $NOAU;
pageClearence($PAGELEVEL, $AUTH_redirectTo);
$empresaController = new EmpresaController($path);
$impuestoController = new ImpuestoController($path);
$colname_idempresa = base64_decode($_SESSION['idempresa']);
$colname_empresa = "0";
if (isset($_GET['idempresa'])) {
    $colname_empresa = $_GET['idempresa'];
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if (isset($_POST["MM_update"]) && $_POST["MM_update"] == "form1") {
    $data = $_POST;
    $empresaController->execute('editaImpuestoEmpresa', $data);
    $impuestoController->execute('editaImpuestoEmpresa', $data);
    $updateGoTo = "contenido.php?pr=admn";
    header(sprintf("Location: %s", $updateGoTo));
}
$data['idempresa'] = $colname_empresa;
$data['predet'] = 1;
$tipoEmpresa = $empresaController->execute('empresaTipo', $data);
$empresa = $empresaController->execute('allId', $data);
$row_empresa = $empresa['respuesta'];
$impuesto = $impuestoController->execute('impuestosDeEmpresa', $data);
?>
<script>
示例#3
0
<?php

if (isset($_GET['alrt']) && $_GET['alrt'] == "0") {
    $_SESSION['alertas'] = 0;
}
$colname_idusuario = base64_decode($_SESSION['FWK_USERID']);
$colname_tipousuario = base64_decode($_SESSION['FWK_USERTYPE']);
$colname_idempresa = base64_decode($_SESSION['idempresa']);
$path = '../';
$data = "";
$usuarioController = new UsuarioController($path);
$selloController = new SelloController($path);
$impuestoController = new ImpuestoController($path);
$empresaController = new EmpresaController($path);
$data['idusuario'] = $colname_idusuario;
$data['idEmpresa'] = $colname_idempresa;
$row_usuario = $usuarioController->execute('usuario', $data);
$data['usuario'] = $row_usuario['respuesta']['usuario'];
$row_sello = $selloController->execute('all', $colname_idempresa);
$row_gas = $impuestoController->execute('all', $colname_idempresa);
$row_empr = $empresaController->execute('empresasPorUsuario', $data);
$row_mprs = $empresaController->execute('allId', array("idempresa" => $colname_idempresa));
$_SESSION['alertas'] = 0;
?>
<style>

.cmbr { cursor:pointer; float:right; }
.cncl { cursor:pointer; float:right; }

.ttl0 { overflow:hidden;position:relative;height:42px;margin-bottom:0px;background:#566074 url('img/bgtp.png') no-repeat; }
.ttl0 #ent0 { float:left;width:780px;height:16px;padding:12px 40px 12px 40px;color:#f4f4f4;position:absolute;top:0;left:0; }