function Common_c8581154ac4e27cb0e122d71341dd7d8($strCmd) { $DPar = explode(STD_LITERAL_DIVISOR, $strCmd); $xTip = new cTipos(); // $socio = $xTip->cInt($DPar[0]); $cuenta = $xTip->cInt($DPar[1]); $deposito = $xTip->cFloat($DPar[2]); $retiro = $xTip->cFloat($DPar[3]); $nota = $xTip->cChar($DPar[4]); $numero = $xTip->cInt($DPar[5]); $limit = $xTip->cInt($DPar[6]); if (isset($_SESSION["recibo_en_proceso"])) { $recibo = $_SESSION["recibo_en_proceso"]; $fecha = fechasys(); $_SESSION["total_recibo_en_proceso"] += $deposito - $retiro; $xRec = new cReciboDeOperacion(200, false, $recibo); $xRec->setNumeroDeRecibo($recibo, true); $DRec = $xRec->getDatosInArray(); $cheque = $DRec["cheque_afectador"]; $tipopago = $DRec["tipo_pago"]; $recibofiscal = $DRec["recibo_fiscal"]; if ($deposito > 0 or $retiro > 0) { $xC = new cCuentaALaVista($cuenta); $grupo = DEFAULT_GRUPO; $xC->setSocioTitular($socio); $xC->setReciboDeOperacion($recibo); if ($deposito > 0) { $xC->setDeposito($deposito, $cheque, $tipopago, $recibofiscal, $nota, $grupo, $fecha, $recibo); } if ($retiro > 0) { $xC->setRetiro($retiro, $cheque, $tipopago, $recibofiscal, $nota, $grupo, $fecha, $recibo); } } if ($numero == $limit) { $xRec->setForceUpdateSaldos(); $xRec->setFinalizarRecibo(true); //$MsgEnd .= "**** proceso terminado ****"; } } //retorna el id del control de origen para neutralizar return "-{$numero}"; }
function Common_c5fe0408555dbf392918c6f77a4d01b2($params) { $stdDiv = STD_LITERAL_DIVISOR; $DPar = explode($stdDiv, $params, 10); //mensajes //grupo $xTip = new cTipos(); // $socio = $xTip->cInt($DPar[0]); $credito = $xTip->cInt($DPar[1]); $letra = $xTip->cInt($DPar[2]); $capital = $xTip->cFloat($DPar[3]); $interes = $xTip->cFloat($DPar[4]); $iva = $xTip->cFloat($DPar[5]); $ahorro = $xTip->cFloat($DPar[6]); $nota = $xTip->cChar($DPar[7]); $numero = $xTip->cInt($DPar[8]); $limit = $xTip->cInt($DPar[9]); $msg = "====================== MOVIMIENTO {$numero} DE {$limit} ====================\r\n"; //Datos del Credito $Cred = new cCredito($credito, $socio); $Cred->initCredito(); $DCred = $Cred->getDatosDeCredito(); $saldo = $DCred["saldo_actual"] - $capital; $contrato_captacion = $DCred["contrato_corriente_relacionado"]; $grupo = $DCred["grupo_asociado"]; $msg .= $Cred->getMessages(); if (isset($_SESSION["recibo_en_proceso"])) { $recibo = $_SESSION["recibo_en_proceso"]; $fecha = fechasys(); $_SESSION["total_recibo_en_proceso"] += $capital + $interes + $ahorro; $xRec = new cReciboDeOperacion(200, false, $recibo); $xRec->setNumeroDeRecibo($recibo, true); $xRec->setNumeroDeRecibo($recibo, true); $DRec = $xRec->getDatosInArray(); $cheque = $DRec["cheque_afectador"]; $tipopago = $DRec["tipo_pago"]; $recibofiscal = $DRec["recibo_fiscal"]; $xRec->setGenerarPoliza(); $msg .= "{$socio}\t{$credito}\tCREDITO\tMovimiento {$i} del Credito {$credito} del Socio {$socio} con Saldo {$saldo}\r\n "; $msg .= "{$socio}\t{$credito}\tMONTOS\tCapital: {$capital} || Interes: {$interes} || Ahorro: {$ahorro} \r\n"; //Agregando Capital if ($capital > 0) { $xRec->setNuevoMvto($fecha, $capital, 120, $letra, $nota . ";SDO:" . $saldo, 1, TM_ABONO, $socio, $credito); $arrCred = array("saldo_actual" => $saldo); $Cred->setUpdate($arrCred); } //Agregando Interes if ($interes > 0) { $xRec->setNuevoMvto($fecha, $interes, 140, $letra, $nota, 1, TM_ABONO, $socio, $credito); } //agregando el IVA if ($interes > 0) { $xRec->setNuevoMvto($fecha, $iva, 151, $letra, $nota, 1, TM_ABONO, $socio, $credito); } //Agregando Ahorro if ($ahorro > 0) { $xC = new cCuentaALaVista($contrato_captacion); if (!isset($contrato_captacion) or $contrato_captacion == CTA_GLOBAL_CORRIENTE or $contrato_captacion == 0) { $contrato_captacion = $xC->setNuevaCuenta(2, 1, $socio, "CUENTA_AUTOMATICA", $credito); $msg .= "{$socio}\t{$credito}\tNuevaCta\tse dio de alta a la cuenta {$contrato_captacion}\r\n"; //2011-nov-30 se agrego la actualizacion del contrato relacionado $arrCred = array("contrato_corriente_relacionado" => $contrato_captacion); $Cred->setUpdate($arrCred); } $xC = new cCuentaALaVista($contrato_captacion); $xC->setSocioTitular($socio); $xC->setReciboDeOperacion($recibo); $xC->setDeposito($ahorro, $cheque, $tipopago, $recibofiscal, $nota, $grupo, $fecha, $recibo); $msg .= $xC->getMessages("txt"); $msg .= "{$socio}\t{$credito}\tAhorro\t El Saldo Quedo en " . $xC->getNuevoSaldo() . "\r\n"; } $msg .= "{$socio}\t{$credito}\tObservacion\t {$nota}\r\n"; $msg .= $xRec->getMessages("txt"); } else { $msg .= "NO_SE_HA_DEFINIDO_UN_RECIBO"; } $xLog = new cFileLog("log_de_recibo_" . $recibo); $xLog->setWrite($msg); $xLog->setClose(); $MsgEnd = ""; if ($numero == $limit) { $xRec->setForceUpdateSaldos(); $xRec->setFinalizarRecibo(true); //$MsgEnd .= "**** proceso terminado ****"; } //retorna el id del control de origen para neutralizar return "-{$numero}"; }
$c = " class='aviso' "; } $td .= "<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td {$c}>" . $rw["socio_afectado"] . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>" . $NSocio . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='mny'>" . $rw["afectacion_real"] . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='mny'>" . $monto_gtia_individual . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>"; if ($solo_simular == 0) { $cuenta = "50" . $rw["socio_afectado"] . "01"; $xCN = new cCuentaALaVista($cuenta); //Contar las cuentas si existen $ctas = $xCN->setContarCuentaBySocio($rw["socio_afectado"], 50); if ($ctas == 0) { //Crear una Cuenta Nueva $xCN->setNuevaCuenta(3, 50, $rw["socio_afectado"], "ALTA_AUTOMATICA_POR_{$iduser}", $credito, "", "", $grupo); } else { $xCN->initCuentaByCodigo(); } //Agregar el Movimiento $xCN->setSocioTitular($rw["socio_afectado"]); $xCN->setDeposito($monto_gtia_individual, "NA", "ninguno", "NA", "ALTA_AUTOMATICA_POR_{$iduser}", $grupo); $messages .= $xCN->getMessages() . "<br />"; } } //Imprimir TABLA echo "<table width='100%' align='center'>\n\t\t\t\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t<th>Numero de <br />Socio</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Nombre del <br />Socio</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>Monto Prestado</th>\n\t\t\t\t\t\t\t\t\t\t\t<th>% de garantia Liquida</th>\n\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t{$td}\n\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t\t\t</table>\t"; if ($sumPlan != $autorizado) { echo "<p class='warn'>El Monto del Credito ({$autorizado}) No coincide con la Division de Montos ({$sumPlan})<br />\n\t\t\t\t\t\t\t\t\t\tSegun recibo {$recibo}</p>"; } else { } //end if suma plan } //end if comp representante } //end if representante invalido