function setCreditoPagado($fecha = false) { $fecha = $fecha == false ? fechasys() : $fecha; //efectuar las operaciones de cierre de credito if ($this->getPeriocidadDePago() == CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) { $idPlan = $this->getNumeroDePlanDePagos(); if (isset($idPlan) and $idPlan > 1) { $xPlan = new cPlanDePagos($idPlan); $xPlan->setEliminar(); $this->mMessages .= $xPlan->getMessages(); } } $this->setUpdate(array("saldo_conciliado" => 0, "saldo_actual" => 0, "saldo_vencido" => 0, "fecha_conciliada" => $fecha, "fecha_revision" => $fecha, "ultimo_periodo_afectado" => $this->getPagosAutorizados(), "sdo_int_ant" => 0, "fecha_ultimo_mvto" => $fecha)); }
echo $xFRM->get(); } else { $doc1 = isset($_FILES["f1"]) ? $_FILES["f1"] : false; $observaciones = isset($DDATA["idobservaciones"]) ? $DDATA["idobservaciones"] : ""; $xFil = new cFileImporter(); //var_dump($_FILES["f1"]); if ($xFil->processFile($doc1) == true) { $data = $xFil->getData(); $xPlan = new cPlanDePagos(); //eliminar credito $xCred = new cCredito($credito); $xCred->init(); $fecha_operacion = $xCred->getFechaDeMinistracion(); if ($xCred->getNumeroDePlanDePagos() != false) { $xPlan->init($xCred->getNumeroDePlanDePagos()); $xPlan->setEliminar(); } $xPlan->initByCredito($credito); $xPlan->setClaveDeCredito($credito); $xPlan->setClaveDePersona($xCred->getClaveDePersona()); $idrecibo = $xPlan->add($observaciones, $fecha_operacion); $xPlan->init($idrecibo); foreach ($data as $valores => $cont) { //periodo fecha saldo_inicial intereses impuesto capital pago_total saldo_final //0 1 2 3 4 5 6 7 //Periodo,Fecha de Pago,Saldo inicial,Intereses,Impuesto,Pago a Capital,Pago Total,Saldo final if ($xT->cInt($cont[0]) > 0) { $interes = $xT->cFloat($cont[3], 2); $fecha = $xF->getFechaISO($cont[1]); $periodo = $xT->cInt($cont[0]); $capital = $xT->cFloat($cont[5], 2);