public void MarcaIngresoReaj(string strcodcli, string strrut, int descinte, string strfechapago, int stfolio) { DateTime fechaerror = new DateTime(); DataSet ds_fechas_ser = new DataSet(); ParamsDates Objfechas = new ParamsDates(); ds_fechas_ser = Objfechas.getFechasServidor(); fechaerror = Convert.ToDateTime(ds_fechas_ser.Tables[0].Rows[0]["fechahoramin"].ToString()); try { CuentaCorrienteNG objBanedCC = new CuentaCorrienteNG(); int nSaldoDisp = 0; int inserta = 0; int actualiza = 0; int saldoFin = 0; string fechapag = strfechapago.Substring(6, 2) + "-" + strfechapago.Substring(4, 2) + "-" + strfechapago.Substring(0, 4); //ctg nSaldoDisp = objBanedCC.SaldoDisponibleReajuste(strrut, strcodcli, "LIQUIDA"); saldoFin = nSaldoDisp - descinte; //ctg string str_tipoTransaccion = "GIRO POR REAJUSTE"; inserta = objBanedCC.InsertaTBSDMDistribucionReajusteTransacciones(strcodcli, strrut, str_tipoTransaccion, 0, 0, descinte, 0, saldoFin, fechapag.ToString(), stfolio.ToString(), ParametrosPagoAutoData.P_str_codigo_moduloServicio); actualiza = objBanedCC.ActualizaTBSDMDistribucionReajInteresAcumulado(strcodcli, strrut, saldoFin); actualiza = objBanedCC.ActualizaTBSDMDistribucionLiquida(strcodcli.ToString(), strrut.ToString(), "CANCELADO POR WS PAGO AUTOMATICO", stfolio.ToString(), fechapag.ToString(), ParametrosPagoAutoData.P_str_codigo_moduloServicio); } catch (Exception ex) { objParam.GrabarErrores(fechaerror, Environment.MachineName, Environment.MachineName, ParametrosPagoAutoData.P_int_codigo_modulo, "Error SqlException : " + ex.ToString(), false, ParametrosPagoAutoData.P_int_codigo_error_Sql_exceptions, ParametrosPagoAutoData.P_str_codigo_moduloServicio + "/Negocio/MDL_funciones/MarcaIngresoReaj"); } }
public Boolean ValidaSaldoCuentaCorriente(string sistema, string rut_deudor, string cod_cliente, decimal monto_tot_deb) { bool valido = true; try { CalcSaldo calcSaldoDeudor = new CalcSaldo(); CuentaCorrienteNG objCC = new CuentaCorrienteNG(); calcSaldoDeudor = objCC.calcSaldosNuevo(sistema, rut_deudor, cod_cliente, "", ""); if (calcSaldoDeudor.SaldoRut < monto_tot_deb) { valido = false; } } catch (Exception ex) { //Program.frmError(ex); } return(valido); }