public function recibosbusqAction() { $func = new Libreria_Pintar(); // $evt [1] = array("txtnrecibo", "keypress", "if(event.keyCode == 13){alert('presiono enter xD');}else{return validarnumeros(event)}" ); $evt[2] = array("rdnrecibo", "change", "llenar_cajas(this.value);"); $evt[3] = array("rdfiltro", "change", "llenar_cajas(this.value);"); $evt[4] = array("rdccontri", "change", "llenar_cajas(this.value);"); $evt[5] = array("btnbuscar", "click", "recibosbusq();"); $evt[6] = array("btnlimpiar", "click", "\$('input:text').val('');\$('#details').html('');"); $func->PintarEvento($evt); }
public function indexAction() { $url = $this->view->util()->getPath(); $evt[0] = array("txtuser", "keypress", "if(event.keyCode == 13){ValidarLogeo();}"); $evt[1] = array("txtpass", "keypress", "if(event.keyCode == 13){ValidarLogeo();}"); $evt[2] = array("btningreso", "click", "ValidarLogeo();"); $att[0] = array('logo', 'src', $url . 'img/logomuni.png'); $func = new Libreria_Pintar(); $func->IniciaScript(); $func->PintarEvento($evt); $func->AtributoComponente($att); $func->FinScript(); }
public function indexAction() { $ddatosuserlog = new Zend_Session_Namespace('datosuserlog'); $codcajero = $ddatosuserlog->codcajero; $func = new Libreria_Pintar(); if ($codcajero > 0) { $evt[0] = array("btnaceptar", "click", "PagosAnularRecibo();"); $func->PintarEvento($evt); } else { $val[0] = array("showing", "No tienes privilegios de cajero para este modulo.", "html"); $func->PintarValor($val); //echo 'No tienes privilegios de cajero para este modulo.'; } //fin condicion de cajero }
public function fracproyAction() { $this->view->util()->registerScriptJSControllerAction($this->getRequest()); $pintar = new Libreria_Pintar(); $evt[] = array('txtporcuotas', 'blur', 'inicial(1000);'); $evt[] = array('txtcuotainicial', 'blur', 'cuotas();'); $pintar->PintarEvento($evt); }
public function busqconceptopagodiversoAction() { $this->_helper->getHelper('ajaxContext')->initContext(); if ($this->getRequest()->isXmlHttpRequest()) { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); $datoscpd = $this->_request->getPost('datoscpd'); $datoscpd = str_replace("'", "\"", $datoscpd); $datos = json_decode($datoscpd); $cbo = $this->imprimeConceptos($datos); $func = new Libreria_Pintar(); $val[0] = array("cbconceptos", $func->ContenidoCombo($cbo, $cbo[0][0]), "html"); $func->PintarValor($val); $cadtempo1 = "BusqXCriterioConceptoPagosDiversos('1','" . str_replace('"', "\\'", $jsondatoscpd) . '\')'; $cadtempo2 = "BusqXCriterioConceptoPagosDiversos('2','" . str_replace('"', "\\'", $jsondatoscpd) . '\')'; $evt[0] = array("cbconceptos", "change", "MostrarDetalleConceptoPagosDiversos();"); $evt[1] = array("cantidadconcepto", "keypress", "return validarnumeros(event);"); $evt[2] = array("busqxcodconcepto", "change", $cadtempo1); $evt[3] = array("busqxnomconcepto", "change", $cadtempo2); $evt[4] = array("busqxcodconcepto", "keypress", "return validarnumeros(event);"); $evt[5] = array("btnagregarconcepto", "click", "AgregarDetalleConceptoPagosDiversos();"); $func->PintarEvento($evt); $msk[0] = array("montoconcepto"); $func->CampoDinero($msk); } }
public function habsencilleraAction() { $this->_helper->getHelper('ajaxContext')->initContext(); if ($this->getRequest()->isXmlHttpRequest()) { $this->_helper->layout->disableLayout(); $pidaper = $this->_request->getPost('idaper'); $pdtcajeros = $this->_request->getPost('dtcajeros'); $pestado = $this->_request->getPost('estado'); if ($pdtcajeros != "") { $arrcajeros = explode(",", $pdtcajeros); if (count($arrcajeros) == 1) { $datocajero = explode('|', $arrcajeros[0]); $cod_cajero = $datocajero[0]; $st_estado = $datocajero[1]; $nrocajacajero = $datocajero[2]; $cn = new Model_DataAdapter(); $nombrestore = '"public".obt_mconten'; $parametros[0] = ''; $parametros[1] = '1000000140'; $datosmconten = $cn->ejec_store_procedura_sql($nombrestore, $parametros); $nombrestore = '"public"."pxcobrowww"'; $arraydatos[0] = '2'; $arraydatos[1] = ''; $arraydatos[2] = ''; $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos); $dfecha = explode(" ", $datosfecha[0][0]); $date = $dfecha[0]; $bodytbl = ''; $row = 0; for ($i = 0; count($datosmconten) > $i; $i++) { if ($datosmconten[$i][0] != $datosmconten[$i][2]) { $bodytbl .= '<tr>'; $bodytbl .= '<td style="padding-left:10px;"><input type="hidden" name="det[' . $row . '][idmconten]" value="' . $datosmconten[$i][0] . '">'; $bodytbl .= $datosmconten[$i][1] . '</td>'; //descripcion $bodytbl .= '<td align="right"><span id="mt_montorow">' . $datosmconten[$i][5] . '</span></td>'; //montos $bodytbl .= '<td align="right"><input type="text" name="det[' . $row . '][mt_cant]" style="width :50px;text-align: right;" onkeypress="return validarnumeros(event);" class="mt_cant" id="mt_cant" value="0" /></td>'; //cantidad $bodytbl .= '<td align="right"><input type="text" name="det[' . $row . '][mt_totalrow]" style="width :50px;text-align: right;" class="mt_total" id="mt_totalrow" name="mt_totalrow" value="0.00" readonly="readonly" /></td>'; //mt_total $bodytbl .= '</tr>'; $row++; } } $val[] = array("tbl_monedas tbody", $bodytbl, "html"); $val[] = array('txtfech_proc', $date, 'val'); $val[] = array('txtnom_cajero', $nrocajacajero, 'val'); $val[] = array('hdid_apert', $pidaper, 'val'); $val[] = array('hdid_cajero', $cod_cajero, 'val'); $val[] = array('hdid_estado', $st_estado, 'val'); $js[] = array('$("#txtfech_proc").datepicker({showOn: "button", buttonImage: jQuery.scriptPath + "img/calendar.gif", buttonImageOnly: true});'); $js[] = array('$("#txtfech_proc").datepicker("option", "dateFormat", "yy-mm-dd");'); $js[] = array('mouseHover("tbl_monedas");'); $js[] = array('$(".mt_cant").on("keyup",sumary_totals);'); $js[] = array("\$('#btnprocsencillero').button({ icons: {secondary:'ui-icon-disk'} })"); $din[] = array("tbl_monedas .mt_total"); //$din[] = array("tbl_monedas .mt_cant"); $evt[] = array("btnprocsencillero", "click", "guardarsencillero();"); $func = new Libreria_Pintar(); $func->IniciaScript(); $func->PintarValor($val); $func->PintarEvento($evt); //$func->CampoDinero($din); $func->EjecutarFuncion($js, "function"); $func->FinScript(); } } } }
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 indextesoreroAction() { $dcodcajero = new Zend_Session_Namespace('codcajero'); $codcajero = $dcodcajero->data; //if($codcajero>0){ $nombrestore = '"public"."pxcobrowww"'; $arraydatos[0] = '1'; $arraydatos[1] = ''; $arraydatos[2] = ''; $cn = new Model_DataAdapter(); $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos); $func = new Libreria_Pintar(); for ($i = 1; $i < 32; $i++) { if (str_pad($i, 2, "0", STR_PAD_LEFT) == substr($datosfecha[0][0], 8, 2)) { $defd = $i - 1; } $dias[$i - 1] = array(str_pad($i, 2, "0", STR_PAD_LEFT), str_pad($i, 2, "0", STR_PAD_LEFT)); } for ($i = 1; $i < 13; $i++) { if (str_pad($i, 2, "0", STR_PAD_LEFT) == substr($datosfecha[0][0], 5, 2)) { $defm = $i - 1; } $meses[$i - 1] = array(str_pad($i, 2, "0", STR_PAD_LEFT), str_pad($i, 2, "0", STR_PAD_LEFT)); } $ind = 0; for ($i = 2005; $i < 2013; $i++) { if (str_pad($i, 4, "0", STR_PAD_LEFT) == substr($datosfecha[0][0], 0, 4)) { $defa = $ind; } $anios[$ind] = array(str_pad($i, 4, "0", STR_PAD_LEFT), str_pad($i, 4, "0", STR_PAD_LEFT)); $ind++; } // $nombrestore = 'tesoreria.obtener_formaspago'; // $arraydatosfp [0] = ''; // $cn = new Model_DataAdapter (); // $datoscbtipopago = $cn->ejec_store_procedura_sql ( $nombrestore, $arraydatosfp ); $datoscbtipopago[] = array('', 'TODAS'); $val[0] = array("rptdia", $func->ContenidoCombo($dias, $dias[$defd][0]), "html"); $val[1] = array("rptmes", $func->ContenidoCombo($meses, $meses[$defm][0]), "html"); $val[2] = array("rptanio", $func->ContenidoCombo($anios, $anios[$defa][0]), "html"); $val[3] = array("rptdiaf", $func->ContenidoCombo($dias, $dias[$defd][0]), "html"); $val[4] = array("rptmesf", $func->ContenidoCombo($meses, $meses[$defm][0]), "html"); $val[5] = array("rptaniof", $func->ContenidoCombo($anios, $anios[$defa][0]), "html"); $val[6] = array('cbtipopago', $func->ContenidoCombo($datoscbtipopago, ''), 'html'); $func->PintarValor($val); $evt[0] = array("txtcodcajero", "keypress", "return validarnumeros(event);"); $evt[1] = array("genrecibo", "click", "GenerarRepoteCaja();"); $func->PintarEvento($evt); // $hab[0] = array('genrecibo',false); // $func->HabilitarComponente($hab); // }else{ // echo 'No tienes privilegios de cajero para este modulo.'; // } }
public function reaperturarcajaAction() { $this->_helper->layout->disableLayout(); $func = new Libreria_Pintar(); $evt[] = array("btnaperturar", "click", "aperturarcaja('2');"); $evt[] = array("btncerrar", "click", "cerrarsubvent();"); $func->PintarEvento($evt); }
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); }