function save_mvto($keymvto, $cuenta, $cargo, $abono, $referencia, $concepto, $mfecha, $form) { if (isset($cuenta) and ($cargo > 0 or $abono > 0)) { $dkeys = explode("@", $keymvto); $nejercicio = $dkeys[1]; $nperiodo = $dkeys[2]; $npoliza = $dkeys[3]; $ntipo = $dkeys[4]; $nmvto = $dkeys[5]; //Valores de los proximos Movimientos $ProxMCargo = 0; $ProxMAbono = 0; $tmvto = 1; $monto = 0; $fecha = getFechaUS($mfecha); //Conservar $diario = 999; $cuenta = getCuentaCompleta($cuenta); /** * verificar la Fecha */ $valFecha = validarFechaUS($fecha); if ($valFecha = false) { $fecha = $mfecha; $valFecha = validarFechaUS($mfecha); } if ($valFecha = false) { $fecha = fechasys(); } /** * Agrega el Movimiento * */ if ($cargo > 0) { $tmvto = TM_CARGO; $monto = $cargo; } else { $tmvto = TM_ABONO; $monto = $abono; } $ProxMAbono = $cargo; $ProxMCargo = $abono; //------------------------------------------------------------------------------------------------------- $sqldcta = "SELECT\n\t\t`contable_catalogo`.`numero`,\n\t\t(`contable_catalogotipos`.`naturaleza` * `contable_catalogotipos`.`naturaleza_del_sector`) AS 'factor'\n\tFROM\n\t\t`contable_catalogotipos` `contable_catalogotipos`\n\t\t\tINNER JOIN `contable_catalogo` `contable_catalogo`\n\t\t\tON `contable_catalogotipos`.\n\t\t\t`idcontable_catalogotipos` = `contable_catalogo`.\n\t\t\t`tipo`\n\tWHERE `contable_catalogo`.`numero`= {$cuenta} LIMIT 0,1"; $dcuenta = getFilas($sqldcta); //var_dump($dcuenta); $naturaleza = $dcuenta["factor"]; //variables de mensajes $afect1 = ""; $afect2 = ""; //1=CARGO //2=ABONO //3=SALDO setAfectarSaldo($cuenta, $nperiodo, $nejercicio, $naturaleza, $tmvto, $monto); $referencia = trim($referencia); $concepto = trim($concepto); //------------------------------------------------------------------------------------------------------- $sqli_mvto = "INSERT INTO contable_movimientos(ejercicio, periodo, tipopoliza, numeropoliza, numeromovimiento,\n\tnumerocuenta, tipomovimiento, referencia, importe, diario, moneda, concepto, fecha, cargo, abono)\n\t VALUES({$nejercicio}, {$nperiodo},\n\t {$ntipo}, {$npoliza},\n\t {$nmvto}, {$cuenta},\n\t '{$tmvto}', '{$referencia}',\n\t {$monto}, {$diario}, 1,\n\t '{$concepto}', '{$fecha}',\n\t {$cargo}, {$abono})"; my_query($sqli_mvto); $notes = ""; $nmvto = $nmvto + 1; $nk_mvto = "i@{$nejercicio}@{$nperiodo}@{$npoliza}@{$ntipo}@{$nmvto}"; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idkeymvto', $nk_mvto)); $tab->add(TabSetValue::getBehavior('idfecha', $fecha)); $tab->add(TabSetValue::getBehavior('idd_concepto', $concepto)); $tab->add(TabSetValue::getBehavior('idcuenta', $cuenta)); if (PREDICT_MOVIMIENTO == true) { $tab->add(TabSetValue::getBehavior('idcargo', $ProxMCargo)); $tab->add(TabSetValue::getBehavior('idabono', $ProxMAbono)); } if ($referencia != "") { $tab->add(TabSetValue::getBehavior('idreferencia', $referencia)); } if ($concepto != "") { $tab->add(TabSetValue::getBehavior('idconcepto', $concepto)); } $tab->add(TabSetValue::getBehavior('icontarrows', $nmvto)); return $tab->getString(); } // en if }
function fu_76e369257240ded4b1c059cf20e8d9a4($low, $form) { $funid2 = ROTTER_KEY; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("t{$funid2}", md5($low))); return $tab->getString(); }
function deleteRecordingByID($id, $rerecord) { // prep ob_start(); $tab = new TinyAjaxBehavior(); //create output $hdhr = new DVRUI_HDHRjson(); $hdhrRecordings = new DVRUI_Recordings($hdhr); $hdhrRecordings->deleteRecording($id, $rerecord); $numRecordings = $hdhrRecordings->getRecordingCount(); $htmlStr = processRecordingData($hdhrRecordings, $numRecordings); //get data $result = ob_get_contents(); ob_end_clean(); // get latest status $statusmsg = getLatestHDHRStatus(); //display $tab->add(TabInnerHtml::getBehavior("recordings_box", $htmlStr)); if ($result != '' && $result != NULL) { $tab->add(TabInnerHtml::getBehavior("statusMessage", $result)); } else { $tab->add(TabInnerHtml::getBehavior("statusMessage", $statusmsg)); } return $tab->getString(); }
function jsaSetPago($Recibo, $cheque1, $Cuenta1, $monto1, $cheque2, $Cuenta2, $monto2) { $sucess = true; $tab = new TinyAjaxBehavior(); $xCtaBanc = new cCuentaBancaria($Cuenta1); $xCaja = new cCaja(); //$recibo, $MontoRecibido, $banco, $cheque if (floatval($monto1) > 0) { $s1 = $xCtaBanc->getVerificarCheque($cheque1, $monto1); $sucess = $s1; if ($s1 == false) { $tab->add(TabSetValue::getBehavior("iNumeroCheque1", "0")); } } if (floatval($monto2) > 0) { $xCtaBanc->set($Cuenta2); $s2 = $xCtaBanc->getVerificarCheque($cheque2, $monto2); $sucess = $s2; if ($s1 == false) { $tab->add(TabSetValue::getBehavior("iNumeroCheque2", "0")); } } if ($sucess == true) { if (floatval($monto1) > 0) { $xCaja->setCobroChequeInterno($Recibo, $monto1, $Cuenta1, $cheque1); } if (floatval($monto2) > 0) { $xCaja->setCobroChequeInterno($Recibo, $monto2, $Cuenta2, $cheque2); } } if ($sucess == false) { $tab->add(TabSetValue::getBehavior("avisos", $xCtaBanc->getMessages("txt"))); } return $tab->getString(); }
function calcula_tasa($monto = 0, $tipo = 10, $form) { /** @deprecated */ $tasa = obtentasa($monto, $tipo); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("itasa", $tasa)); return $tab->getString(); }
function saveDescripcion($descripcion, $id_orden) { $query = "UPDATE Orden SET descripcion = '{$descripcion}' WHERE id_orden = {$id_orden}"; $result = mysql_query($query); $tab = new TinyAjaxBehavior(); $tab->add(TabEval::getBehavior("showFeedback()")); return $tab->getString(); }
function jsaGetSumas($com1, $com2, $com3) { $suma = $com1 + $com2 + $com3; $iva = round($suma * TASA_IVA, 2); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idsuma", $suma + $iva)); $tab->add(TabSetValue::getBehavior("idiva", $iva)); return $tab->getString(); }
function jsaGetIDE($socio, $monto, $tipo_de_pago) { $xSoc = new cSocio($socio); $xSoc->init(); $x = $xSoc->getIDExPagarByPeriodo(false, $monto, $tipo_de_pago); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idide", $x)); return $tab->getString(); }
function jsGetSaldoCuenta($cuenta, $socio) { $xCta = new cCuentaDeCaptacion($cuenta, $socio); $DC = $xCta->getDatosInArray(); $montoRet = $DC["saldo_cuenta"]; //$xCta->getMaximoRetirable(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idMonto", $montoRet)); $tab->add(TabSetValue::getBehavior("idLetras", convertirletras($montoRet))); return $tab->getString(); }
function jsaGetDatosDelCredito($credito, $socio) { $cred = new cCredito($credito, $socio); $cred->initCredito(); $DC = $cred->getDatosDeCredito(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idMonto', $DC["saldo_actual"])); $tab->add(TabSetValue::getBehavior('idIntereses', $DC["interes_normal_devengado"])); $tab->add(TabSetValue::getBehavior('idTasa', $DC["tasa_interes"])); return $tab->getString(); }
function getReciboDesc($numero) { if (isset($numero) and $numero != 0) { $cRec = new cReciboDeOperacion(false, false, $numero); $cRec->setNumeroDeRecibo($numero, true); $d = $cRec->getDatosInArray(); $desRec = $cRec->getDescripcion(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("txtDescRecibo", $desRec)); return $tab->getString(); } }
function jsaGetDatosCuenta($cuenta, $socio, $dias) { $xInv = new cCuentaInversionPlazoFijo($cuenta, $socio); $tasa = $xInv->getTasaAplicable($dias) * 100; $xSoc = new cSocio($socio); $xSoc->init(); $cuentainteres = $xSoc->getCuentaDeCaptacionPrimaria(CAPTACION_TIPO_VISTA, CAPTACION_PRODUCTO_INTERESES); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idtasa", $tasa)); $tab->add(TabSetValue::getBehavior("idcuentainteres", $cuentainteres)); return $tab->getString(); }
function jsaGetCalculos($socio, $acciones, $tipo_de_pago) { $xSoc = new cSocio($socio); $coste = COSTE_POR_ACCION * $acciones; $monto = $tipo_de_pago == "efectivo" ? $coste : 0; $ide = $tipo_de_pago == "efectivo" ? $xSoc->getIDExPagarByPeriodo(false, $monto) : 0; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idCoste", getFMoney($coste))); $tab->add(TabSetValue::getBehavior("idide", getFMoney($ide))); //$tab -> add( TabSetValue::getBehavior("idObservaciones", $xSoc->getMessages("txt") ) ); return $tab->getString(); }
function jsaSetUltimoCheque($persona, $credito, $cuenta_bancaria) { $xBanc = new cCuentaBancaria($cuenta_bancaria); $cheque = $xBanc->getUltimoCheque(); $xCred = new cCredito($credito); $xCred->init(); $montocheque = $xCred->getMontoAutorizado(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idnumerocheque", $cheque)); $tab->add(TabSetValue::getBehavior("idmontocheque", $montocheque)); $tab->add(TabSetValue::getBehavior("idmontooriginal", $montocheque)); return $tab->getString(); }
function jsaGetDatosCuenta($cuenta, $socio) { $xCta = new cCuentaALaVista($cuenta, $socio); $xCta->init(); $DC = $xCta->getDatosInArray(); $MaxRet = $xCta->getMaximoRetirable(); $sdo = $DC["saldo_cuenta"]; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idMaxRet", $MaxRet)); $tab->add(TabSetValue::getBehavior("idSaldoAnterior", $sdo)); //$tab -> add(TabSetValue::getBehavior("idmonto", $sdo )); //$tab -> add(TabSetValue::getBehavior("imsg", $xCta->getMessages("txt") )); return $tab->getString(); }
function JSsetDomicilioMismo($socio, $HDomicilio, $form) { if ($HDomicilio == "mismo") { $domicilio = domicilio($socio); $DDom = getDatosDomicilio($socio); $telefono = $DDom["telefono_residencial"]; $telefonomovil = $DDom["telefono_movil"]; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idTFijo', $telefono)); $tab->add(TabSetValue::getBehavior('idTMovil', $telefonomovil)); $tab->add(TabSetValue::getBehavior('idDomicilio', $domicilio)); return $tab->getString(); } }
function jsaGetCuotasDeDefuncion($socio) { $cuota_pagada = 0; $fecha_a_tolerar = restardias(fechasys(), DIAS_A_ROTAR_FONDO_DE_DEFUNCION); $cuota_a_pagar = 100; $sql = "SELECT SUM(afectacion_real) AS 'monto',\n\t\t\tMAX(fecha_operacion) AS 'fecha_pago'\n\t\t\tFROM operaciones_mvtos\n\t\t\tWHERE tipo_operacion=902\n\t\t\tAND socio_afectado={$socio}\n\t\t\tAND fecha_operacion>='{$fecha_a_tolerar}'\n\t\t"; $cuota_pagada = mifila($sql, "monto"); if ($cuota_pagada < 0) { $cuota_pagada = 0; } $cuota_a_pagar = $cuota_a_pagar - $cuota_pagada; //TODO: Terminar $tab = new TinyAjaxBehavior(); $tab->add(TabSetvalue::getBehavior('idmonto', $cuota_a_pagar)); return $tab->getString(); }
function updateGroupFields($id_grupo) { $query = "SELECT grupo, agrupacion_contable FROM Grupo WHERE id_grupo = {$id_grupo}"; $result = mysql_query($query); $row = mysql_fetch_array($result); $grupo = $row[0]; $agrupacion_contable = $row[1]; $grupo_input = "<input type='text' value='{$grupo}' size='50' name='grupo' id='grupo' class='obligatorio'> *"; $tab = new TinyAjaxBehavior(); // $tab->add( TabInnerHtml::getBehavior("g_cont", $grupo_input)); $tab->add(TabEval::getBehavior("cambiarComboAgrupacion({$agrupacion_contable})")); $tab->add(TabEval::getBehavior("cambiarFieldGrupo('{$grupo}')")); // $tab->add( TabAlert::getBehavior("Hola")); // $tab->add( TabSetValue::getBehaviour("grupo", $grupo)); return $tab->getString(); }
function jsaGetDatosDelEnvio($idEmpresa, $periocidad, $variacion, $periodo) { $xEmp = new cEmpresas($idEmpresa); $xEmp->init(); $tab = new TinyAjaxBehavior(); $periodo = $periodo + $variacion; //agregar observaciones $monto = $xEmp->getMontoDelPeriodo($periodo, $periocidad); $ops = $xEmp->getOperacionesDePeriodo(); //$monto = ($monto < 0 ) ? $monto * -1: $monto; if ($monto > 0) { //$tab -> add(TabSetvalue::getBehavior("idobservaciones", "PERIODO: $periodo | MONTO $ $monto " )); } else { //$tab -> add(TabSetvalue::getBehavior("idobservaciones", "PERIODO $periodo POR ENVIAR" )); } return $tab->getString(); }
function getPermisosByID($iMenu) { $sql = "SELECT menu_rules\tFROM `general_menu`\n\t\t\tWHERE idgeneral_menu='{$iMenu}' LIMIT 0,1"; $Itbl = obten_filas($sql); $sPerms = $Itbl["menu_rules"]; $aPerms = explode(",", $sPerms); $tab = new TinyAjaxBehavior(); foreach ($aPerms as $key => $value) { $DItem = explode(STD_LITERAL_DIVISOR, $value); $nivel = $DItem[0]; $perm = $DItem[1]; if ($nivel != 99) { $tab->add(TabSetValue::getBehavior($nivel . "@false", "false")); $tab->add(TabSetValue::getBehavior($nivel . "@" . $perm, "on")); $tab->add(TabSetValue::getBehavior("idNiv" . $nivel, $value)); } } return $tab->getString(); }
function jsSetCuotas($socio, $form) { //selecciona el tipo de ingreso $SQLSP = "SELECT\n\t`socios_general`.`codigo`,\n\t`socios_tipoingreso`.`parte_social`,\n\t`socios_tipoingreso`.`parte_permanente`\nFROM\n\t`socios_general` `socios_general`\n\t\tINNER JOIN `socios_tipoingreso` `socios_tipoingreso`\n\t\tON `socios_general`.`tipoingreso` =\n\t\t`socios_tipoingreso`.`idsocios_tipoingreso`\nWHERE\n\t(`socios_general`.`codigo` ={$socio})"; $dSocio = obten_filas($SQLSP); $social = $dSocio["parte_social"]; if (!$social) { $social = 0; } $permanente = $dSocio["parte_permanente"]; if (!$permanente) { $permanente = 0; } $total = $social + $permanente; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idpartesocial", $social)); $tab->add(TabSetValue::getBehavior("idpartepermanente", $permanente)); $tab->add(TabSetValue::getBehavior("idtotalcuotas", $total)); return $tab->getString(); }
function jsaGetPerfilDeProducto($producto, $persona) { $OConv = new cProductoDeCredito($producto); $OConv->init(); $tab = new TinyAjaxBehavior(); $xSoc = new cSocio($persona); $pagos = $OConv->getNumeroPagosPreferente(); $periocidad = $OConv->getPeriocidadPrefente(); if ($xSoc->init() == true) { if ($xSoc->getClaveDeEmpresa() != FALLBACK_CLAVE_EMPRESA) { $xEmp = new cEmpresas($xSoc->getClaveDeEmpresa()); $xEmp->init(); $tab->add(TabSetValue::getBehavior('idproducto', $xEmp->getProductoPref())); $periocidad = $xEmp->getPeriocidadPref(); } } $tab->add(TabSetValue::getBehavior('idnumerodepagos', $pagos)); $tab->add(TabSetValue::getBehavior('idperiocidad', $periocidad)); return $tab->getString(); }
function openHDHRPage() { // prep ob_start(); $tab = new TinyAjaxBehavior(); //create output $htmlStr = getHDHRData(); //get data $result = ob_get_contents(); ob_end_clean(); // get latest status $statusmsg = getLatestHDHRStatus(); //display $tab->add(TabInnerHtml::getBehavior("hdhr_box", $htmlStr)); if ($result != '' && $result != NULL) { $tab->add(TabInnerHtml::getBehavior("statusMessage", $result)); } else { $tab->add(TabInnerHtml::getBehavior("statusMessage", $statusmsg)); } return $tab->getString(); }
function mostrar_precio_correcto($proveedor, $precio_fob, $precio_ref) { $query = "insert into auxiliar (precio) values (3.5)"; $result = mysql_query($query); $query = "SELECT proveedor, pais FROM proveedor, pais WHERE id_proveedor = {$proveedor} AND proveedor.id_pais = pais.id_pais"; $result = mysql_query($query); $row = mysql_fetch_array($result); $nom_proveedor = $row[0]; $pais = $row[1]; if ($pais == "ARGENTINA") { $p_fob = "<input type='hidden' value='{$precio_fob}' size='10' name='precio_fob' id='precio_fob' class='opcional' disabled>{$precio_fob}"; $p_ref = "<input type='text' value='{$precio_ref}' size='10' name='precio_ref' id='precio_ref' class='opcional'>"; } else { $p_fob = "<input type='text' value='{$precio_fob}' size='10' name='precio_fob' id='precio_fob' class='opcional'>"; $p_ref = "<input type='hidden' value='{$precio_ref}' size='10' name='precio_ref' id='precio_ref' class='opcional' disabled>{$precio_ref}"; } $tab = new TinyAjaxBehavior(); $tab->add(TabInnerHtml::getBehavior("p_fob", $p_fob)); $tab->add(TabInnerHtml::getBehavior("p_ref", $p_ref)); return $tab->getString(); }
function jsinfo_util($id, $frm) { $sqlInfo = "SELECT * FROM general_utilerias WHERE idgeneral_utilerias ={$id}"; $rw = obten_filas($sqlInfo); $tab = new TinyAjaxBehavior(); //$tab -> add(TabSetValue::getBehavior("i_3193c", $rw["nombre_utilerias"])); $tab->add(TabSetValue::getBehavior("imsg", $rw["descripcion_utileria"])); $tab->add(TabSetValue::getBehavior("iID1", $rw["describe_param_1"])); $tab->add(TabSetValue::getBehavior("iID2", $rw["describe_param_2"])); $tab->add(TabSetValue::getBehavior("iID3", $rw["describe_param_3"])); $tab->add(TabSetValue::getBehavior("id_de", $rw["describe_init"])); $tab->add(TabSetValue::getBehavior("id_a", $rw["describe_end"])); return $tab->getString(); }
function jsaGetDatosEmpresa($dependencia) { //verificar si existe en la BD $Emp = new cEmpresas($dependencia); $idpersona = $Emp->getClaveDePersona(); $Emp->init(); $telefono = $Emp->getTelefono(); $domicilio = $Emp->getDomicilio(); $razon = $Emp->getNombre(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idtelefono', $telefono)); //$tab->add(TabSetValue::getBehavior('iddomiciliodeactividad', $domicilio)); $tab->add(TabSetValue::getBehavior('idrazonsocialtrabajo', $razon)); $xSoc = $Emp->getOPersona(); //$xSoc = new cSocio(); if ($xSoc == null) { } else { $xOBA = $xSoc->getOActividadEconomica(); if ($xOBA != null) { $idactividad = $xOBA->getClaveDeActividad(); $idsector = $xOBA->getClaveDeSector(); $idlocalidad = $xOBA->getClaveDeLocalidad(); $idmunicipio = $xOBA->getClaveDeMunicipio(); $identidadfederativa = $xOBA->getClaveDeEstado(); // idlocalidad idmunicipio identidadfederativa $tab->add(TabSetValue::getBehavior('idactividad', $idactividad)); //$tab->add(TabSetValue::getBehavior('idsectoreconomico', $idsector)); $tab->add(TabSetValue::getBehavior('idlocalidad', $idlocalidad)); $tab->add(TabSetValue::getBehavior('identidadfederativa', $identidadfederativa)); $tab->add(TabSetValue::getBehavior('idmunicipio', $idmunicipio)); $tab->add(TabSetValue::getBehavior('idnombreacceso', $xOBA->getCalle())); $tab->add(TabSetValue::getBehavior('idcodigopostal', $xOBA->getCodigoPostal())); } } //TODO: cargar estado y municiopios return $tab->getString(); }
function calcula_ica($solicitud, $form) { $sql = "SELECT * FROM creditos_solicitud WHERE numero_solicitud={$solicitud}"; $mysolicitud = obten_filas($sql); $socio = $mysolicitud["numero_socio"]; // Numero de Socio $diasaut = $mysolicitud["dias_autorizados"]; // Dias Autorizados $montoMin = $mysolicitud["monto_autorizado"]; // Monto Autorizado $tasaInt = $mysolicitud["tasa_interes"]; // Monto Autorizado $tipoConv = $mysolicitud["tipo_convenio"]; // Interes Diario */ $ICA_pagado = $mysolicitud["sdo_int_ant"]; // saldo ICA */ $infoConv = get_convenio($tipoConv); $tasaICA = $infoConv["porcentaje_ica"]; $intneto = 0; $inttotal = 0; $intpagado = 0; $intdiario = $montoMin * $tasaInt / EACP_DIAS_INTERES; /** * Consulta todos los creditos que aplican Interes Anticipado */ $totaliva = 0; $nota = ""; $intneto = $intdiario * $diasaut * $tasaICA; //Resta el Interes pagado $intneto -= $ICA_pagado; /** * @see Parche: Solo se Incluye la afectacion del Credito */ $nota .= "Tasa ICA {$tasaICA}; Dias {$diasaut}, Int. Diario" . getFMoney($intdiario) . ", ICA Pag. {$ICA_pagado}"; //Valor IVA, obtenido del tipo de solicitud $tasaiva = $infoConv["tasa_iva"]; $iva_inc = $infoConv["iva_incluido"]; if ($iva_inc == 1) { $intneto = $intneto * (1 / (1 + $tasaiva)); $totaliva = $intneto * $tasaiva; } else { $totaliva = $intneto * $tasaiva; } $intneto = number_format($intneto, 2, '.', ''); //getFMoney($intneto); $totaliva = number_format($totaliva, 2, '.', ''); //getFMoney($totaliva); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("valorinteres", $intneto)); $tab->add(TabSetValue::getBehavior("valoriva", $totaliva)); $tab->add(TabSetValue::getBehavior("idobservaciones", $nota)); $tab->add(TabSetValue::getBehavior("idTasaIva", $tasaiva)); return $tab->getString(); }
function jsaGetUInfo($user) { $xUsr = new cSystemUser($user, false); $xUsr->init(); $VD = $xUsr->getDatosInArray(); //getSAFEUserInfoByName($user); $tab = new TinyAjaxBehavior(); if (isset($VD["idusuarios"])) { //$tab -> add(TabSetValue::getBehavior('idNombreCompleto', $VD["nombres"] )); //$tab -> add(TabSetValue::getBehavior('idApellidoPaterno', $VD["apellidopaterno"] )); //$tab -> add(TabSetValue::getBehavior('idApellidoMaterno', $VD["apellidomaterno"] )); $tab->add(TabSetValue::getBehavior('idNivelAcceso', $VD["niveldeacceso"])); $tab->add(TabSetValue::getBehavior('idSucursal', $VD["sucursal"])); $tab->add(TabSetValue::getBehavior('idUsuario', $VD["idusuarios"])); $tab->add(TabSetValue::getBehavior('idPuesto', $VD["puesto"])); $tab->add(TabSetValue::getBehavior('idsocio', $xUsr->getClaveDePersona())); } else { $tab->add(TabSetValue::getBehavior('idUsuario', 0)); } return $tab->getString(); }
function jsaCargarDatosDeConvenio($convenio) { $OConv = new cProductoDeCredito($convenio); $OConv->init(); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idnumpagos', $OConv->getNumeroPagosPreferente())); if ($OConv->getEsProductoDeNomina() == false) { //false por que lo determina la empresa $tab->add(TabSetValue::getBehavior('idperiocidadpagos', $OConv->getPeriocidadPrefente())); } //$tab -> add(TabSetValue::getBehavior('idnumpagos', $OConv->obj()->pagos_maximo()->v())); return $tab->getString(); }
function jsaHeredarDatos($idcuenta) { $tab = new TinyAjaxBehavior(); $xLog = new cCoreLog(); $xCta = new cCuentaContable($idcuenta); $cuenta = ""; $nombre = ""; $superior = ""; $nombresupe = ""; $tipo = ""; $nivel = ""; $centro = ""; $superiorf = ""; $operar = 0; $equivale = ""; if ($xCta->init() == true) { $cuenta = $xCta->get(); $nombre = $xCta->getNombre(); $superior = $xCta->getInmediatoSuperior(); $nivel = $xCta->getDigitoAgrupador(); $centro = $xCta->getCentroDeCosto(); $tipo = $xCta->getTipoDeCuenta(); $operar = 1; $xLog->add("OK\tModificar la cuenta {$idcuenta} - {$operar} - {$superior}\r\n"); $equivale = $xCta->getEquivalencia(); } else { $xEsq = new cCuentaContableEsquema($idcuenta); $cuenta = $xEsq->CUENTA; $superior = $xEsq->CUENTA_SUPERIOR; $nivel = $xEsq->NIVEL_ACTUAL; $xLog->add("OK\tAgregar Nueva cuenta {$idcuenta} ({$cuenta}) - {$superior}\r\n"); } $xLog->add($xCta->getMessages(), $xLog->DEVELOPER); //inicializar superior if ($nivel > 1) { $xSup = new cCuentaContable($superior); if ($xSup->init() == true) { $tipo = $tipo == "" ? $xSup->getTipoDeCuenta() : $tipo; $centro = $centro == "" ? $xSup->getCentroDeCosto() : $centro; $superiorf = $xSup->getCuentaCompleta($superior, true); $nombresupe = $xSup->getNombre(); if ($operar == 0) { $equivale = $xSup->getEquivalencia(); } } $xLog->add($xSup->getMessages(), $xLog->DEVELOPER); } $tab->add(TabSetvalue::getBehavior('idcuenta', $cuenta)); $tab->add(TabSetvalue::getBehavior('idnombrecuenta', $nombre)); $tab->add(TabSetvalue::getBehavior('idtipodecuentacontable', $tipo)); $tab->add(TabSetvalue::getBehavior('idcentrodecosto', $centro)); $tab->add(TabSetvalue::getBehavior('idcuentasuperior', $superiorf)); $tab->add(TabSetvalue::getBehavior('idnombresuperior', $nombresupe)); $tab->add(TabSetvalue::getBehavior('idoperacion', $operar)); $tab->add(TabSetvalue::getBehavior('idequivalencia', $equivale)); $tab->add(TabSetvalue::getBehavior('idmsg3', $xLog->getMessages())); return $tab->getString(); }