public function listarpredioAction() { $this->_helper->getHelper('ajaxContext')->initContext(); if ($this->getRequest()->isXmlHttpRequest()) { $this->_helper->layout->disableLayout(); $name = $this->_request->getParam('name'); if (isset($name)) { $dataSet = new Zend_Session_Namespace($name); $rows = $dataSet->data; $this->view->cidpers = $rows[0][0]; $this->view->vnombre = $rows[0][1]; $this->view->vdirecc = $rows[0][2]; $this->_request->setParam('cidpers', $rows[0][0]); } else { $this->view->cidpers = $this->_request->getParam('cidpers'); $this->view->vnombre = $this->_request->getParam('crazsoc'); $this->view->vdirecc = $this->_request->getParam('direccf'); $mhresum = $this->_request->getParam('mhresum'); if (isset($mhresum)) { $this->view->mhresum = $this->_request->getParam('mhresum'); $this->view->vnrodoc = $this->_request->getParam('vnrodoc'); } else { $parameters[] = $this->view->cidpers; $dataAdapter = new Model_DataAdapter(); $rows = $dataAdapter->executeAssocQuery("pl_function.panel_persona", $parameters); if (count($rows) == 1) { $this->view->mhresum = $rows[0]['mhresum']; $this->view->vnrodoc = $rows[0]['vnrodoc']; } } } //$this->view->cidpers; //'%','0','2013-03-08','0','0','%' $parameters[] = $this->view->cidpers; $parameters[] = '%'; $parameters[] = '0'; $parameters[] = date("y-m-d"); $parameters[] = '0'; $parameters[] = '0'; $parameters[] = '%'; $dataAdapter = new Model_DataAdapter(); $rows = $dataAdapter->executeAssocQuery("tesoreria.fx_Estadocuenta", $parameters); // echo count($rows ); // print_r($rows); $pintar = new Libreria_Pintar(); if (count($rows) > 0) { $deudas = '<table width="500" >'; // $deudas.='<tr>'; // $deudas.='<td>Tributo</td>'; // $deudas.='<td>Cod.Predio</td>'; // $deudas.='<td>Año</td>'; // $deudas.='<td>Periodo</td>'; // $deudas.='<td>Insoluto</td>'; // $deudas.='<td>Mora</td>'; // $deudas.='<td>Total</td>'; // $deudas.='<td>Estado</td>'; // $deudas.='<td><input type="checkbox" id="checkfracctodos" onClick="checktodosfracci();" /></td>'; // $deudas.='</tr>'; $montototal = 0; for ($i = 0; $i < count($rows); ++$i) { $montototal += $rows[$i]['ntotals']; $deudas .= '<tr>'; $deudas .= '<td>' . (string) $rows[$i]['ctiprc0'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['ccodpre'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['cejerci'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['cperiod'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['nimpins'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['nimpmor'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['ntotals'] . '</td>'; $deudas .= '<td>' . (string) $rows[$i]['vestad2'] . '</td>'; $deudas .= '<td><input id="' . $rows[$i]['idsigma'] . '" type="checkbox" class="checkfracc" value="' . $rows[$i]['ntotals'] . '" onclick="calculamontofracc(this.id);" /> </td>'; $deudas .= '</tr>'; } $deudas .= '</table>'; $val[] = array('tabladeudas', $deudas, 'html'); $val[] = array('txtdeudatotal', $montototal, 'val'); //$js[]=array('$("#txtnrocuotas").spinner();'); $js[] = array('themeTextBox(); themeComboBox();'); $pintar->PintarValor($val); $pintar->EjecutarFuncion($js); } } }
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 indexAction() { $url = $this->view->util()->getPath(); /* $dcodcajero = new Zend_Session_Namespace('codcajero'); $codcajero = $dcodcajero->data; */ $ddatosuserlog = new Zend_Session_Namespace('datosuserlog'); $codcajero = $ddatosuserlog->codcajero; //echo '<'.$codcajero.'>'; //$codcajero = '99'; $func = new Libreria_Pintar(); if ($codcajero > 0) { $datospers = $this->_request->getParam('datospers', ''); if ($datospers == '') { header('location:' . $url . 'index.php/busqpers/?tit=Pagos Diversos&url=' . $url . 'index.php/pagosdiversos/?datospers=', true); } else { $data = new Zend_Session_Namespace('arrayconceptos'); $data->data = ''; #detalle de pago ventanita $ddetallepago = new Zend_Session_Namespace('detallepago'); $ddetallepago->data = ''; #pagos arbitrios predios $dcadgrabacion = new Zend_Session_Namespace('cadgrabacion'); $dcadgrabacion->data = ''; list($cidpers, $nompers) = explode('|', $datospers); $ddatacontri = new Zend_Session_Namespace('contribuyente'); $ddatacontri->cidcontri = $cidpers; $ddatacontri->nomcontri = $nompers; $cn = new Model_DataAdapter(); $nombrestore0 = '"public"."obt_mconten2"'; $arraydatos0[0] = '1000000492'; $arraydatos0[1] = '1'; $datosAreas = $cn->ejec_store_procedura_sql($nombrestore0, $arraydatos0); $nombrestore = '"tesoreria"."buscar_concepto"'; $arraydatos[0] = ''; $arraydatos[1] = ''; $datoscpd = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos); $jsondatoscpd = json_encode($datoscpd, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP); $datosConceptos = $cn->executeRowsToJSON($nombrestore, $arraydatos); echo '<script type="text/javascript"> var _conceptos =' . $datosConceptos . '</script>'; $content = ''; if ($cidpers == '_________1') { $content .= '<b>Venta Libre</b>'; } $cbo = $this->imprimeConceptos($datoscpd); $val[0] = array("div_title", $content, "html"); $val[1] = array("cidpers", $cidpers, "html"); $val[2] = array("nompers", $nompers, "html"); //$val[3] = array("cbconceptos",$func->ContenidoCombo($cbo, $cbo[0][0]), "html"); //$val[3] = array("cbconceptos",$func->ContenidoCombo($cbo, '9999999999'), "html"); $val[3] = array('cbareas', $func->ContenidoCombo($datosAreas, $datosAreas[0][0], '0'), 'html'); $val[4] = array("cbareas", "", "focus"); $func->PintarValor($val); $cadtempo = "BusqXCriterioConceptoPagosDiversos('1','" . str_replace('"', "\\'", $jsondatoscpd) . '\')'; $cadtempo2 = "BusqXCriterioConceptoPagosDiversos('2','" . str_replace('"', "\\'", $jsondatoscpd) . '\')'; $cadtempxarea = "FiltrarConceptosxAreas('" . str_replace('"', "\\'", $jsondatoscpd) . '\')'; $evt[0] = array("cbconceptos", "change", "MostrarDetalleConceptoPagosDiversos();"); $evt[1] = array("cantidadconcepto", "keypress", "return validarnumeros(event);"); $evt[2] = array("btnagregarconcepto", "click", "AgregarDetalleConceptoPagosDiversos();"); $evt[3] = array("busqxcodconcepto", "keypress", "return validarnumeros(event);"); //$evt[4] = array("cobrar","click", "CobrarConceptoPagosDiversos();"); $evt[4] = array("cobrar", "click", "DetallePagoConceptoPagosDiversos();"); $evt[5] = array("nuevorecibo", "click", "window.open('" . $url . "index.php/pagosdiversos?datospers=','_self');"); $evt[6] = array("busqxcodconcepto", "change", $cadtempo); $evt[7] = array("busqxnomconcepto", "change", $cadtempo2); $evt[8] = array('glosaconcepto', 'keypress', 'if(event.keyCode == 13){return false;}'); $evt[9] = array("cbareas", "change", $cadtempxarea); $fn[] = array($cadtempxarea); $fn[] = array("MostrarDetalleConceptoPagosDiversos();"); $func->PintarEvento($evt); $din[0] = array("montoconcepto"); $func->CampoDinero($din); $func->EjecutarFuncion($fn); } // Fin del else para los datos enviados } else { $val[0] = array("show", "No tienes privilegios de cajero para este modulo", "html"); $func->PintarValor($val); } }
public function borrardetallepagoAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); $this->_helper->getHelper('ajaxContext')->initContext(); if ($this->getRequest()->isXmlHttpRequest()) { $func = new Libreria_Pintar(); //$surl = new Zend_Session_Namespace('url'); $url = $this->view->util()->getPath(); $ddetallepago = new Zend_Session_Namespace('detallepago'); $detallepago = $ddetallepago->data; $montototal = $this->_request->getPost('montototal'); $codtipppago = $this->_request->getPost('codtipppago'); $nrodoc = $this->_request->getPost('nrodoc'); for ($i = 0; $i < count($detallepago); $i++) { if ($detallepago[$i][0] == $codtipppago && $detallepago[$i][1] == $nrodoc) { unset($detallepago[$i]); $detallepago = array_values($detallepago); } } $ddetallepago->data = $detallepago; $sumrestante = 0; $cont = '<table id="pgdv_dtpago" width="365" border="0" cellspacing="0" cellpadding="0"><tbody class="ui-table-body">'; for ($i = 0; $i < count($detallepago); $i++) { $sumrestante = $sumrestante + $detallepago[$i][3]; $cont .= ' <tr> <td width="115" > ' . $detallepago[$i][4] . '</td> <td width="100">' . $detallepago[$i][1] . '</td> <td width="65" >' . $detallepago[$i][2] . '</td> <td width="50" align="right">' . number_format($detallepago[$i][3], 2, '.', ',') . ' </td> <td width="20"><button class="pgborrardetalle" onclick="borrardetallepago(\'' . $detallepago[$i][0] . '\',\'' . $detallepago[$i][1] . '\');"></button></td> </tr>'; } $cont .= '</body></table>'; $val[] = array('hdsubtotal', $montototal - $sumrestante, 'val'); $func->PintarValor($val); /* $funcion[]=array(' $("#cbtipopago").combobox("destroy"); $("#cbtipopago option[value=9999999999]").attr("selected", "selected"); $("#cbtipopago").combobox({ change:function(){ alert($(this).val()); } });'); */ if ($montototal - $sumrestante == 0.0) { $funcion[] = array('$("#btnaceptardetalle").button("option", "disabled", false);'); $funcion[] = array('$("#btnagregar").button("option", "disabled", true);'); /*$hab[] = array('btnaceptardetalle',true); $hab[] = array('btnagregar',false); $func->HabilitarComponente($hab);*/ } else { $funcion[] = array('$("#btnaceptardetalle").button("option", "disabled", true);'); $funcion[] = array('$("#btnagregar").button("option", "disabled", false);'); /*$hab[] = array('btnaceptardetalle',false); $hab[] = array('btnagregar',true); $func->HabilitarComponente($hab);*/ } $funcion[] = array("\$( '.pgborrardetalle' ).button({\r\n \t\ticons: {\r\n \t\tprimary: 'ui-icon-close'\r\n },\r\n \t\ttext: false\r\n })\r\n \t\tmouseHover('pgdv_dtpago');"); $func->EjecutarFuncion($funcion); echo $cont; } }
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 pintarpredioAction() { $this->_helper->getHelper('ajaxContext')->initContext(); $pintar = new Libreria_Pintar(); if ($this->getRequest()->isXmlHttpRequest()) { $this->_helper->layout->disableLayout(); $codpre = $this->_request->getPost('idsigma', ''); $vdirpre = $this->_request->getPost('vdirepre', ''); //if (isset($codpre) && isset($vdirpre)){ $val[] = array('txtMpredio', $codpre, 'val'); $val[] = array('txtDirecpred', $vdirpre, 'val'); //print_r($val); } $pintar->EjecutarFuncion($val); }
public function cajasaperturadasAction() { $nombrestore = '"public"."pxcobrowww"'; $arraydatos[0] = '2'; $arraydatos[1] = ''; $arraydatos[2] = ''; $cn = new Model_DataAdapter(); $datosfecha = $cn->ejec_store_procedura_sql($nombrestore, $arraydatos); $dfecha = explode(" ", $datosfecha[0][0]); $date = $dfecha[0]; $val[] = array('txtdia', $date, 'val'); $js[] = array('$("#txtdia").datepicker({showOn: "button", buttonImage: jQuery.scriptPath + "img/calendar.gif", buttonImageOnly: true});'); $js[] = array('$("#txtdia").datepicker("option", "dateFormat", "yy-mm-dd");'); $func = new Libreria_Pintar(); $func->IniciaScript(); $func->PintarValor($val); $func->EjecutarFuncion($js, "function"); $func->FinScript(); $this->view->util()->registerScriptJSControllerAction($this->getRequest()); echo "<script>pathReport='" . $this->view->util()->getPathReport() . "'</script>"; }
public function paramfracAction() { $pintar = new Libreria_Pintar(); $fun[] = array('$( "#tabs" ).tabs();'); $pintar->EjecutarFuncion($fun); }