Example #1
0
 public function renderListaContribuyente()
 {
     $dataSet = new Zend_Session_Namespace("registro.cidpers");
     $rows = $dataSet->data;
     $procedure = "pl_function.panel_persona";
     $parameters[] = "'" . implode("','", $rows) . "'";
     $db = new Model_DataAdapter();
     $json = $db->executeRowsToJSON($procedure, $parameters);
     echo $json;
 }
 public function anularAction()
 {
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $this->_helper->viewRenderer->setNoRender();
         $this->_helper->layout->disableLayout();
         $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
         $userlogin = $ddatosuserlog->userlogin;
         $codcajero = $ddatosuserlog->codcajero;
         $nrorec = $this->_request->getPost('nrorec');
         $obs = $this->_request->getPost('obs');
         $nombrestore = 'tesoreria.obt_estadorecibo';
         $arraydatos[0] = $nrorec;
         $cn = new Model_DataAdapter();
         $datosrecibo = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
         if (count($datosrecibo) == 1) {
             if ($datosrecibo[0][1] == '0') {
                 echo 'Recibo ya esta anulado';
             } else {
                 $nombrestore = '"public"."pxcobrowww"';
                 $arraydatos[0] = '1';
                 $arraydatos[1] = '';
                 $arraydatos[2] = '';
                 $cn = new Model_DataAdapter();
                 $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
                 $dfecha = explode(" ", $datosfecha[0][0]);
                 if ($codcajero == $datosrecibo[0][5]) {
                     if ($dfecha[0] == $datosrecibo[0][3]) {
                         $nombrestore = 'tesoreria.anular_recibo';
                         $arraydatos[0] = $nrorec;
                         $arraydatos[1] = $obs;
                         $arraydatos[2] = $userlogin;
                         $arraydatos[3] = '';
                         $cn = new Model_DataAdapter();
                         $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
                         if (count($datos) > 0) {
                             echo $datos[0][0];
                         } else {
                             echo 'Error en la anulación';
                         }
                     } else {
                         echo 'Solo se pueden eliminar recibos del mismo día.';
                     }
                 } else {
                     echo 'El recibo nro: ' . $nrorec . 'no pertenece a su nro de cajero.';
                 }
             }
         } else {
             echo "No se encontro Recibo....o algo anda mal";
         }
     }
 }
 public function combocontenedorAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $procedure = 'public.obtener_tabla';
         $parameters[0] = $this->_request->getParam('idsigma');
         $dataAdapter = new Model_DataAdapter();
         $records = $dataAdapter->ejec_store_procedura_sql($procedure, $parameters);
         echo json_encode($records);
     }
 }
 public function seleccionarAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $name = $this->_request->getParam('name');
         $procedure = $this->_request->getParam('procedure');
         $parameters = json_decode($this->_request->getParam('parameters'), true);
         $dataAdapter = new Model_DataAdapter();
         $records = $dataAdapter->saveSelect($name, $procedure, $parameters);
         $this->view->name = $name;
         $this->view->records = $records;
     }
 }
 public function validarlogeoAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $url = $this->view->util()->getPath();
         $user = trim($this->_request->getPost('user'));
         $pass = trim($this->_request->getPost('pass'));
         $local = trim($this->_request->getPost('cboLocal'));
         $nivel = $this->_request->getPost('nivel');
         // Aun no se usa!! pero igual lo pongo xD!
         if ($user == '' || $user == null || $pass == '' || $pass == null) {
             echo 'Ingresar Usuario y/o Contraseña';
         } else {
             $nombrestore = 'seguridad.login';
             $arraydatos[] = $user;
             $arraydatos[] = $pass;
             $cn = new Model_DataAdapter();
             $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
             $caddatos = "";
             if ($datos == '' || $datos == null || count($datos) <= 0) {
                 echo '<font color="#FF0000">Datos Incorrectos...</font>';
                 $this->flag = false;
             } else {
                 //					if($datos[0][7] >= $dias[0][2]){
                 //						echo '<font color="#FF0000">Usuario bloqueado por superar el limite de inactividad <br>... Comuniquese con la S/G de Informatica</font>';
                 //					}else
                 if ($datos[0][5] == '1') {
                     $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
                     $ddatosuserlog->cidpers = $datos[0][0];
                     $ddatosuserlog->nompers = $datos[0][1];
                     $ddatosuserlog->userlogin = $datos[0][2];
                     $ddatosuserlog->arealogin = $datos[0][3];
                     $ddatosuserlog->codcajero = $datos[0][4];
                     $ddatosuserlog->vhostnm = 'TEST';
                     $ddatosuserlog->idlocal = $local;
                     $ddatosuserlog->cidapertura = $datos[0][6];
                     echo '<script language=\\"JavaScript\\">window.open(\'' . $url . 'index.php\', \'_self\')</script>';
                 } else {
                     echo '<font color="#FF0000">Usuario Inactivo...</font>';
                 }
                 $this->flag = true;
             }
             $auth = Zend_Auth::getInstance();
             $auth->authenticate($this);
         }
     }
 }
 public function resumenPersona($cidpers, $crazsoc)
 {
     $parameters[] = $cidpers;
     $dataAdapter = new Model_DataAdapter();
     $rows = $dataAdapter->executeAssocQuery("pl_function.panel_persona", $parameters);
     if ($rows != null) {
         $mperson = $rows[0];
     } else {
         $mperson = array('cidpers' => $cidpers, 'crazsoc' => $crazsoc, 'vnrodoc' => 'No existe informaci&oacute;n', 'dfecdoc' => '', 'vmotivo' => '', 'ntotpre' => '0', 'ntotcom' => '0', 'nbaseim' => '0.00', 'nimpanu' => '0.00', 'vprofis' => 'No', 'vprotra' => 'No', 'dfecpag' => '');
     }
     $rows = $dataAdapter->executeAssocQuery("pl_function.resumen_saldo_personal", $parameters);
     if ($rows != null) {
         $msaldos = $rows[0];
     } else {
         $msaldos = array('cidpers' => '', 'ntotals' => '', 'npendie' => '', 'ncancel' => '', 'nporcen' => '', 'vindica' => 'ff0000.png');
     }
     return array("mperson" => $mperson, "msaldos" => $msaldos);
 }
Example #7
0
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $controller = $request->getControllerName();
     $action = $request->getActionName();
     $resource = $controller . ':' . $action;
     $auth = " [Acceso autorizado.]";
     $login = new Zend_Session_Namespace('datosuserlog');
     $nompers = $login->nompers;
     if (!in_array($resource, $this->_blackList) && ($nompers == '' || $nompers == null)) {
         if ($request->isXmlHttpRequest()) {
             $request->setControllerName('logeo')->setActionName('redirect');
         } else {
             $request->setControllerName('logeo')->setActionName('index');
         }
         $auth = " [Acceso no autorizado.]";
     }
     if (strlen($login->codcajero) != 0 && in_array($controller, $this->_executeController) && !in_array($action, $this->_executeView)) {
         $nombrestore = 'tesoreria.verif_est_caja';
         $arraydatos[] = $login->codcajero;
         $cn = new Model_DataAdapter();
         $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
         if (count($datos)) {
             if ($datos[0][0] == '1' || $datos[0][0] == '3') {
                 $mensaje = $datos[0][1];
             } else {
                 $mensaje = $datos[0][1];
             }
         } else {
             $mensaje = 'Aperture su caja.';
         }
         $this->_logger->info($mensaje);
         if ($mensaje != 'Ok') {
             $request->setControllerName('cajaflujo')->setActionName('aperturar')->setParam('mensaje', $mensaje);
         }
     }
     $this->_logger->info($resource . $auth);
 }
 public function imprimirreciboconceptopagodiversoAction()
 {
     $this->_helper->layout->disableLayout();
     echo $this->view->util()->getScript("js/common");
     $nrorecibo = $this->_request->getParam('nrorecibo', '');
     $txtduplicado = $this->_request->getParam('duplicado', '');
     echo $this->view->util()->getScript("js/app/ui");
     if (strlen($nrorecibo) == 12) {
         $nombrestore = 'tesoreria.imprimir_recibo_pagodiverso';
         $arraydatos[0] = $nrorecibo;
         $cn = new Model_DataAdapter();
         $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
         $func = new Libreria_Pintar();
         if (count($datos) > 0) {
             $detalle = '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
             for ($i = 0; $i < count($datos); $i++) {
                 $detalle .= '<tr>';
                 $detalle .= '<td colspan="2"  width="170" class="Estilo8">' . $datos[$i][4] . '</td>';
                 $detalle .= '<td width="45" align="right" class="Estilo6">' . number_format($datos[$i][7], '2', '.', '') . '</td>';
                 $detalle .= '</tr>';
                 $detalle .= '<tr>';
                 $detalle .= '<td colspan="3" class="Estilo6">' . $datos[$i][8] . '</td>';
                 $detalle .= '</tr>';
             }
             $detalle .= '</table>';
             $val[0] = array("duplicado", $txtduplicado, "html");
             $val[1] = array("datos0", $datos[0][0], "html");
             $val[2] = array("datos1", $datos[0][1], "html");
             $val[3] = array("datos2", $datos[0][2], "html");
             $val[4] = array("datos9", number_format($datos[0][9], '2', '.', ''), "html");
             $val[5] = array("datos10", "Fecha: " . $datos[0][10], "html");
             $val[6] = array("datos11", "Cajero: " . $datos[0][11], "html");
             $val[7] = array("detalle", $detalle, "html");
         } else {
             $val[] = array("detalle", '<div align="center">NO EXISTEN DATOS...</div>', "html");
         }
         $func->PintarValor($val);
     } else {
         echo 'Ingresar número de recibo valido';
     }
 }
 public function prehabsencilleraAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         header('Content-type: application/json');
         $p_cnrcaja = $this->_request->getPost('p_cnrcaja');
         $p_ciduser = $this->_request->getPost('p_ciduser');
         $p_fechadia = $this->_request->getPost('p_fechadia');
         $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
         $p_vusernm = $ddatosuserlog->userlogin;
         $p_vhostnm = $this->view->util()->getHost();
         $cn = new Model_DataAdapter();
         $nombrestore = 'tesoreria.habcaja_moneddefault';
         $parametros[0] = $p_fechadia;
         $parametros[1] = $p_cnrcaja;
         $parametros[2] = $p_ciduser;
         $parametros[3] = $p_vusernm;
         $parametros[4] = $p_vhostnm;
         $datos = $cn->ejec_store_procedura_sql($nombrestore, $parametros);
         if ($datos[0][0] == '1') {
             $jsonarr = array('v_esttransac' => $datos[0][0], 'v_edt' => $datos[0][1], 'v_msg' => $datos[0][2], 'v_idsigma' => $datos[0][3]);
             echo json_encode($jsonarr);
             //print_r($datos);
         } else {
             $jsonarr = array('v_esttransac' => $datos[0][0], 'v_descrip' => 'Error en Base de Datos...');
             echo json_encode($jsonarr);
             //print_r($datos);
         }
         //v_edt,v_msg , v_idsigma
     }
     /*tesoreria.habcaja_moneddefault(
     				p_cnrcaja character varying
     				, p_ciduser character varying
     				
     				, p_vusernm character varying
     				, p_vhostnm character varying
     				, p_ref refcursor)
     		*/
 }
 public function detallerecibosemitidosAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         //$this->_helper->viewRenderer->setNoRender ();
         $arraymeses = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');
         $nummeses = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
         $cad = $this->_request->getPost('cad');
         $cad = substr($cad, 0, strlen($cad) - 1);
         $datos = explode("~", $cad);
         $datosprincipales = explode("^", $datos[0]);
         //$descrip.'^'.$periodo.'^'.$total.'^'.$nrorecibo.'^'.$observ.'^'.$predio.'^'.$usuario.'^'.$fecha.'^'.$estado.'^'.$ctiping.'^'.$codper
         //print_r($datosprincipales);
         $nombrestore = '"public"."pxcobrowww"';
         $arraydatos[0] = '1';
         $arraydatos[1] = '';
         $arraydatos[2] = '';
         $cn = new Model_DataAdapter();
         $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
         $dfecha = explode(" ", $datosfecha[0][0]);
         $nombrestore = 'tesoreria.obt_estadorecibo';
         $arraydatosrecibo[0] = $datosprincipales[3];
         $cn = new Model_DataAdapter();
         $datosrecibo = $cn->ejec_store_procedura_sql($nombrestore, $arraydatosrecibo);
         $func = new Libreria_Pintar();
         $slec[0] = array("txtnrorecibo", true);
         $slec[1] = array("txtusuario", true);
         $slec[2] = array("txtfechapago", true);
         $slec[3] = array("txtcodpredio", true);
         $slec[4] = array("txtobservacion", true);
         //
         $val[0] = array("datosp8", '<font size="+1"><b>' . $datosprincipales[8] . '<b>', "html");
         $val[1] = array("txtnrorecibo", $datosprincipales[3], "val");
         $val[2] = array("txtusuario", $datosprincipales[6], "val");
         $val[3] = array("txtfechapago", $datosprincipales[7], "val");
         $val[4] = array("txtcodpredio", $datosprincipales[5], "val");
         $val[5] = array("txtobservacion", $datosrecibo[0][6], "html");
         if ($datosprincipales[9] == '0000000273' || $datosprincipales[9] == '0000000278') {
             $dp = $datosprincipales[0];
         } else {
             $dp = 'Cobro Diverso ' . $datosprincipales[9];
         }
         $val[6] = array("datosp", $dp, "html");
         $sum = 0;
         $dtll = '<table width="266" border="1" cellspacing="3" cellpadding="0" class="reportes">';
         for ($i = 0; $i < count($datos); $i++) {
             $datosregistros = explode("^", $datos[$i]);
             $sum = $sum + $datosregistros[2];
             $dtll .= '<tr><td width="33">';
             if ($datosregistros[9] == '0000000273') {
                 $dtll .= 'PRED.';
             } else {
                 if ($datosregistros[9] == '0000000278') {
                     $dtll .= 'ARB.';
                 } else {
                     $dtll .= 'C.D.';
                 }
             }
             $dtll .= '</td><td width="162">';
             if ($datosregistros[9] == '0000000273') {
                 $dtll .= $datosregistros[1] . ' Trim.';
             } else {
                 if ($datosregistros[9] == '0000000278') {
                     $dtll .= str_replace($nummeses, $arraymeses, $datosregistros[1]);
                 } else {
                     $dtll .= $datosregistros[0];
                 }
             }
             $dtll .= '</td><td width="59" align="right">' . number_format($datosregistros[2], '2', '.', '') . '</td></tr>';
         }
         $dtll .= '</table>';
         $val[7] = array("div_detalle", $dtll, "html");
         $val[8] = array("numberformat", number_format($sum, '2', '.', ''), "html");
         $evt[0] = array("btnduplicado", "click", "Generarduplicadorecibodet('" . $datosprincipales[9] . "','" . $datosprincipales[3] . "','DUPLICADO'); ");
         $evt[1] = array("btnreimpresion", "click", "Generarduplicadorecibodet('" . $datosprincipales[9] . "','" . $datosprincipales[3] . "','')");
         $func->PintarValor($val);
         $func->ComponenteSoloLectura($slec);
         $func->PintarEvento($evt);
         // (($datosprincipales [8] == 'Anulado') ? ' disabled="disabled" ' : '')
         if ($datosprincipales[8] == 'Anulado') {
             $hab[0] = array("btnduplicado", false);
             $func->HabilitarComponente($hab);
         }
         if ($dfecha[0] == $datosrecibo[0][3] && $datosrecibo[0][1] == '1') {
             $hab2[0] = array("btnreimpresion", true);
         } else {
             $hab2[0] = array("btnreimpresion", false);
         }
         $func->HabilitarComponente($hab2);
     }
 }
    public function busquedapersonaAction()
    {
        $func = new Libreria_Pintar();
        $this->_helper->getHelper('ajaxContext')->initContext();
        $this->_helper->layout->disableLayout();
        if ($this->getRequest()->isXmlHttpRequest()) {
            $cidpers = trim($this->_request->getPost('cidpers'));
            $nombre = trim($this->_request->getPost('nombre'));
            $apepat = trim($this->_request->getPost('apepat'));
            $apemat = trim($this->_request->getPost('apemat'));
            $dni = trim($this->_request->getPost('dni'));
            $urlredirect = trim($this->_request->getPost('urlredirect'));
            $fech = trim($this->_request->getPost('fech'));
            $nombrestore = '"public"."buscar_persona"';
            $arraydatos[0] = $cidpers;
            // Codigo de contribuyente
            $arraydatos[1] = $nombre;
            // Nombre
            $arraydatos[2] = $apepat;
            // Apellido paterno
            $arraydatos[3] = $apemat;
            // Apellido materno
            $arraydatos[4] = $dni;
            // Doc. Identidad
            $cn = new Model_DataAdapter();
            $datos = $cn->executeRowsToJSON($nombrestore, $arraydatos);
            if ($datos == '' || $datos == null) {
                if ($cidpers == null || $cidpers == '' || $cidpers == '0000000000') {
                    $cper = '_________1';
                } else {
                    $cper = $cidpers;
                }
                $val[0] = array("cidpers", $cper, "html");
                $val[1] = array("div_pers_no_reg", $apepat . ' ' . $apemat . ' ' . $nombre, "html");
                $func->PintarValor($val);
                if ($apepat != null || $apepat != '' || $apemat != null || $apemat != '' || $nombre != null || $nombre != '') {
                    $evt[0] = array("genrecibo", "click", "window.open('" . $urlredirect . "_________1|" . $apepat . " " . $apemat . " " . $nombre . "', '_self')");
                    $evt[1] = array("limpiar", "click", "\$(\"#div_rsbusqpers\").html(\"\");");
                    $func->PintarEvento($evt);
                    $js[] = array("\$(\"input:submit, input:button, input:reset, button\").button();");
                    $func->EjecutarFuncion($js, "function");
                } else {
                    $val[0] = array("botones", "", "html");
                    $func->PintarValor($val);
                }
            } else {
                $val2[0] = array("busqpersona", "", "html");
                $func->PintarValor($val2);
                $cont = '						
					<script type="text/javascript"> var members =' . $datos . '</script>
					<script type="text/javascript">
						$(document).ready(function(){
							var optInit = getOptionsFromForm();
							$("#Pagination").pagination(members.length, optInit);
							$("#setoptions").click(function(){
								var opt = getOptionsFromForm();
								$("#Pagination").pagination(members.length, opt);
							});
						});            
					</script>';
                echo $cont;
            }
        }
    }
 public function imprimirptAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     $urlreport = $this->view->util()->getPathReport();
     $nomreport = $this->_request->getParam('nomreport', '');
     $codcajero = $this->_request->getParam('codcajero', '');
     $fecha = $this->_request->getParam('fecha', '');
     $fechaf = $this->_request->getParam('fechaf', '');
     $tipo = $this->_request->getParam('tipo', '');
     $paramextra = $this->_request->getParam('paramextra', '');
     if ($fechaf == '') {
         $fechaf = $fecha;
     }
     $duserlogin = new Zend_Session_Namespace('userlogin');
     $userlogin = $duserlogin->data;
     $nombrestore = '"public"."pxcobrowww"';
     $arraydatos[0] = '1';
     $arraydatos[1] = '';
     $arraydatos[2] = '';
     $cn = new Model_DataAdapter();
     $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
     //cambiar
     $nombrestore = '"public"."pxcobrowww"';
     $arraydatos[0] = '1';
     $arraydatos[1] = '';
     $arraydatos[2] = '';
     $cn = new Model_DataAdapter();
     $datosfechafull = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
     $url = $urlreport . 'tipo=' . $tipo . '&reporte=' . $nomreport . '&opt=P_NROCAJA^' . $codcajero . '|P_FECHAREPORT^' . $datosfechafull[0][0] . '|P_FECHADESDE^' . $fecha . '|P_FECHAHASTA^' . $fechaf . '|P_HORASERVER^' . $datosfecha[0][0] . '|P_USERIMPR^' . $userlogin . '|' . $paramextra;
     $arraybuscar = array('á', 'é', 'í', 'ó', 'ú', '&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;');
     $arraycambiar = array('a', 'e', 'i', 'o', 'u', 'a', 'e', 'i', 'o', 'u');
     $url = str_replace($arraybuscar, $arraycambiar, $url);
     echo '<script type="javascript">window.open("' . $url . '", "_self")</script>';
 }
 public function guardarrusticoAction()
 {
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $this->_helper->layout->disableLayout();
         $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
         $coduser = $ddatosuserlog->cidpers;
         $vhostnm = $ddatosuserlog->vhostnm;
         /*    cubinor  
           						  cubisur 
         						  cubiest 
         						  cubioes 
         						  cpronor 
         						  cprosur 
         						  cproest 
         						  cprooes 
         						  cpculti 
         						  canagua 
         						  nestado
         					*/
         $row = $_POST['idsigma'] . ',' . $_POST['dpredio'] . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . '' . ',' . $_POST['nestado'] . ',' . $vhostnm . ',' . $coduser . ',' . date("y-m-d");
         $parameters[] = $row;
         $dataAdapter = new Model_DataAdapter();
         $rows = $dataAdapter->executeSelect("pl_function.guardar_mrustic", $parameters);
         $row2 = $_POST['idsigma'] . ',' . $rows[0][0] . ',' . $_POST['cclasif'] . ',' . $_POST['ccatego'] . ',' . $_POST['narance'] . ',' . $_POST['nhectar'] . ',' . $_POST['nvalrus'] . ',' . $_POST['nestado'] . ',' . $vhostnm . ',' . $coduser . ',' . date("y-m-d") . ',' . $_POST['cperiod'];
         $parameters2[] = $row2;
         $dataAdapter2 = new Model_DataAdapter();
         $rows2 = $dataAdapter->executeSelect("pl_function.guardar_drustic", $parameters2);
         if ($rows > 0) {
             $parameters3 = array($_POST['dpredio'], $_POST["cperiod"]);
             $data['error'] = "";
             $data['data'] = $dataAdapter->executeAssocQuery("pl_function.listar_caracteristica_rustico", $parameters3);
         } else {
             $data['error'] = "Error al actualizar";
             $data['data'] = "";
         }
         $this->_helper->json($data);
     }
 }
 public function cajacambiarestadoAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->layout->disableLayout();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $url = $this->view->util()->getPath();
         $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
         $vccajero = $this->_request->getPost('ccajero');
         $vfechapro = $this->_request->getPost('fecha');
         $vidsigmaapert = $this->_request->getPost('idsigmaapert');
         $vestado = $this->_request->getPost('estado');
         $cestado = "";
         $vmsg = "";
         if ($vestado == "2") {
             //cerrado
             $cestado = "3";
             //cerrado para el dia
         }
         if ($vestado == "3") {
             //cerrado para el dia
             $cestado = "2";
             //cerrado
         }
         if ($cestado == "") {
             $vmsg = "La Caja no esta cerrada ,tampoco esta cerrada para el dia";
         } else {
             $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
             $vusernm = $ddatosuserlog->userlogin;
             $vhostnm = $this->view->util()->getHost();
             $cn = new Model_DataAdapter();
             $store = "tesoreria.cambiarestadocaja";
             $parameter[] = $vccajero;
             $parameter[] = $vfechapro;
             $parameter[] = $vidsigmaapert;
             $parameter[] = $cestado;
             $parameter[] = $vusernm;
             //605
             $parameter[] = $vhostnm;
             $datos = $cn->ejec_store_procedura_sql($store, $parameter);
             if ($datos[0][0] == "1") {
                 $vmsg = $datos[0][1];
             } else {
                 $vmsg = "Error";
             }
         }
         echo $vmsg;
     }
 }
Example #15
0
 public static function setDriver($driver)
 {
     self::$driver = $driver;
 }
Example #16
0
 public function getComboContenedorOtro($idsigma, $selected, $procedure)
 {
     $parameters[0] = $idsigma;
     $dataAdapter = new Model_DataAdapter();
     $records = $dataAdapter->ejec_store_procedura_sql($procedure, $parameters);
     $library = new Libreria_Pintar();
     $html = $library->ContenidoComboOtro($records, $selected);
     return $html;
 }
 public function reciboimpAction()
 {
     $this->_helper->layout->disableLayout();
     $func = new Libreria_Pintar();
     $func->PintarLibrerias();
     $recibo = $this->_request->getParam('recibo', '');
     $nombrestore = 'pxda_buscarrecibos';
     $arraydatos[0] = array("@op", '3');
     $arraydatos[1] = array("@numcom", $recibo);
     $arraydatos[2] = array("@cidpers", '');
     $arraydatos[3] = array("@nom", '');
     $arraydatos[4] = array("@fecha1", '');
     $arraydatos[5] = array("@fecha2", '');
     $cn = new Model_DataAdapter();
     $datos = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos);
     //print_r($datos);
     //print_r($datos);
     $total = 0;
     $details = '<table width="100%" border="0" >';
     $details .= '<tr >';
     $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Descript.</span></th>';
     $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Nom Part.</span></th>';
     $details .= '<th width="27%" align="left"><span style="font-size: 9px;">Partida</span></th>';
     $details .= '<th width="8%" align="right"><span style="font-size: 9px;">Total</span></th>';
     $details .= '</tr>';
     for ($i = 0; $i < count($datos); $i++) {
         $total = $total + $datos[$i][6];
         $details .= '<tr>';
         //$details .= '<td width="14%" align="center"><span style="font-size: 9px;">'.$datos[$i][0].'</span></td>';
         //$details .= '<td width="29%"><span style="font-size: 9px;">'.$datos[$i][1].'</span></td>';
         $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][2] . '</span></td>';
         $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][3] . '</span></td>';
         $details .= '<td width="27%"><span style="font-size: 9px;">' . $datos[$i][4] . '</span></td>';
         //$details .= '<td width="12%" align="center"><span style="font-size: 9px;">'.$datos[$i][3].'</span></td>';
         $details .= '<td width="8%" align="right"><span style="font-size: 9px;">' . number_format($datos[$i][6], 2) . '</span></td>';
         $details .= '</tr>';
     }
     $details .= '</table>';
     $val[0] = array("detalle", $details, "html");
     $val[1] = array("tdrecibo", $datos[0][0], "html");
     $val[2] = array("tdcodigo", $datos[0][7], "html");
     $val[3] = array("tdnombre", $datos[0][1], "html");
     $val[4] = array("tdtotal", number_format($total, 2), "html");
     $val[5] = array("tdfecha", "Fecha : " . $datos[0][5], "html");
     $val[6] = array("tdcajer", "Cajera : " . $datos[0][8] . "-" . $datos[0][9], "html");
     $func->PintarValor($val);
 }
 public function grabarfraccAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $this->_helper->getHelper('ajaxContext')->initContext();
     if ($this->getRequest()->isXmlHttpRequest()) {
         $p_idsigma = $this->_request->getPost('p_idsigma');
         $p_cnumfra = $this->_request->getPost('p_cnumfra');
         $p_canofra = $this->_request->getPost('p_canofra');
         $p_cidpers = $this->_request->getPost('p_cidpers');
         $p_ctipdoc_titular = $this->_request->getPost('p_ctipdoc_titular');
         $p_descdoc_titular = $this->_request->getPost('p_descdoc_titular');
         $p_cnombres_titular = $this->_request->getPost('p_cnombres_titular');
         $p_cdomicilio_titular = $this->_request->getPost('p_cdomicilio_titular');
         $p_cdistrito_titular = $this->_request->getPost('p_cdistrito_titular');
         $p_ctelef_fijo_titular = $this->_request->getPost('p_ctelef_fijo_titular');
         $p_ctelef_movil_titular = $this->_request->getPost('p_ctelef_movil_titular');
         $p_ctipdoc_garante = $this->_request->getPost('p_ctipdoc_garante');
         $p_desdoc_garante = $this->_request->getPost('p_desdoc_garante');
         $p_cnombres_garante = $this->_request->getPost('p_cnombres_garante');
         $p_cdomicilio_garante = $this->_request->getPost('p_cdomicilio_garante');
         $p_cdistrito_garante = $this->_request->getPost('p_cdistrito_garante');
         $p_ctelefono_garante = $this->_request->getPost('p_ctelefono_garante');
         $p_tif_mensual = $this->_request->getPost('p_tif_mensual');
         $p_tif_diario = $this->_request->getPost('p_tif_diario');
         $p_monto_deuda_total = $this->_request->getPost('p_monto_deuda_total');
         $p_monto_cuota_inicial = $this->_request->getPost('p_monto_cuota_inicial');
         $p_monto_deuda_regular = $this->_request->getPost('p_monto_deuda_regular');
         $p_numero_cuota = $this->_request->getPost('p_numero_cuota');
         $p_dfecha_emision = $this->_request->getPost('p_dfecha_emision');
         $p_modelo_convenio_id = $this->_request->getPost('p_modelo_convenio_id');
         $p_cf_ampliado = $this->_request->getPost('p_cf_ampliado');
         $p_nestado = $this->_request->getPost('p_nestado');
         $p_vhostnm = $this->_request->getPost('p_vhostnm');
         $p_vusernm = $this->_request->getPost('p_vusernm');
         $ddatosuserlog = new Zend_Session_Namespace('datosuserlog');
         $userlogin = $ddatosuserlog->userlogin;
         $cn = new Model_DataAdapter();
         $nombrestore = '"recaudacion".insertupdate_fr_convenios';
         $parametros[0] = $p_idsigma;
         $parametros[1] = $p_cnumfra;
         $parametros[2] = $p_canofra;
         $parametros[3] = $p_cidpers;
         $parametros[4] = $p_ctipdoc_titular;
         $parametros[5] = $p_descdoc_titular;
         $parametros[6] = $p_cnombres_titular;
         $parametros[7] = $p_cdomicilio_titular;
         $parametros[8] = $p_cdistrito_titular;
         $parametros[9] = $p_ctelef_fijo_titular;
         $parametros[10] = $p_ctelef_movil_titular;
         $parametros[11] = $p_ctipdoc_garante;
         $parametros[12] = $p_desdoc_garante;
         $parametros[13] = $p_cnombres_garante;
         $parametros[14] = $p_cdomicilio_garante;
         $parametros[15] = $p_cdistrito_garante;
         $parametros[16] = $p_ctelefono_garante;
         $parametros[17] = $p_tif_mensual;
         $parametros[18] = $p_tif_diario;
         $parametros[19] = $p_monto_deuda_total;
         $parametros[20] = $p_monto_cuota_inicial;
         $parametros[21] = $p_monto_deuda_regular;
         $parametros[22] = $p_numero_cuota;
         $parametros[23] = $p_dfecha_emision;
         $parametros[24] = $p_modelo_convenio_id;
         $parametros[25] = $p_cf_ampliado;
         $parametros[26] = $p_nestado;
         $parametros[27] = $this->view->util()->getHost();
         $parametros[28] = $userlogin;
         $datos = $cn->ejec_store_procedura_sql($nombrestore, $parametros);
         if ($datos[0][0] == '1') {
         } else {
             header("Status: 400 Error al Guardar intentelo en otro momento o contacte al adminsitrador");
         }
     }
 }
    public function paramfracuotasatrasadasAction()
    {
        $this->view->util()->registerScriptJSControllerAction($this->getRequest());
        $this->_helper->layout->disableLayout();
        $pintar = new Libreria_Pintar();
        $js[] = array('themeTextBox(); themeComboBox();');
        $js[] = array('$( "#txtporimpofracct4" ).autoNumeric();');
        $js[] = array('$( "#txtmontdetert4" ).autoNumeric();');
        $js[] = array('$("#txtporimpofracctipjur4").autoNumeric();');
        $js[] = array('$("#txtmontdeterttipjur4").autoNumeric();');
        $js[] = array('$("#txtporimpofracctipnorm4").autoNumeric();');
        $js[] = array('$("#txtmontdeterttipnorm4").autoNumeric();');
        $valor[] = array(0, 'ORDENANZA');
        $val[] = array('cbocoddoc4', $pintar->ContenidoCombo($valor, '0'), 'html');
        $js[] = array('$("#txtfechdoc4").datepicker({showOn: "button", buttonImage: jQuery.scriptPath + "img/calendar.gif",	buttonImageOnly: true});');
        //$js[] = array('$("#txtfechdoc").datepicker("option", "dateFormat", "yy-mm-dd");');
        //$evt[]=array('opcion41','click','verificaropparam4();');
        //$evt[]=array('opcion42','click','verificaropparam4();');
        //$evt[]=array('opcion3','click','verificaropparam();');
        $cn = new Model_DataAdapter();
        $nombrestore = '"recaudacion".paramrec';
        $parametros[0] = '0000000005';
        $tabla = $datos = $cn->ejec_store_procedura_sql($nombrestore, $parametros);
        //print_r($tabla);
        $val[] = array('txtidsigma4', $tabla[0][0], 'val');
        $val[] = array('txtporimpofracct4', $tabla[0][4], 'val');
        $val[] = array('txtmontdetert4', $tabla[0][3], 'val');
        $val[] = array('txtnrodoc4', $tabla[0][6], 'val');
        $val[] = array('txtfechdoc4', substr($tabla[0][7], 0, 10), 'val');
        $evt[] = array('btngrabar4', 'click', 'var p_idsigma=$("#txtidsigma4").val();
 				var p_ncantidad=$("#txtmontdetert4").val();
 				var p_nporcentaje=0;
 				var p_codigo_doc=$("#cbocoddoc4").val();
 				var p_cresolucion=$("#txtnrodoc4").val();
 				var p_dfec_resol=$("#txtfechdoc4").val();
				$.ajax( {
					dataType : "html",
					type : "POST",
					url : path + "/mantenimientos/paramrecsave/",
					data :  "p_idsigma="+p_idsigma+
							 "&p_ncantidad="+p_ncantidad+
							 "&p_nporcentaje="+p_nporcentaje+
							 "&p_codigo_doc="+p_codigo_doc+
							 "&p_cresolucion="+p_cresolucion+
							 "&p_dfec_resol="+p_dfec_resol,
					beforeSend : function(data) {
						$("#locategrid4").html("Procesando...");
					},
					success : function(requestData) {
						$("#locategrid4").html(requestData);
					},
					error : function(requestData, strError, strTipoError) {
						$("#locategrid4").html("Error " + strTipoError + ": " + strError);
					},
					complete : function(requestData, exito) {
						window.location.reload();
					}
				});	');
        $pintar->PintarValor($val);
        $pintar->PintarEvento($evt);
        $pintar->EjecutarFuncion($js);
    }