protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; _entity = PaymentInfo.Get(oid, tipo, true); _mf_type = ManagerFormType.MFView; }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; if (parameters[1] != null) { _entity = (PaymentInfo)parameters[2]; } else { _entity = PaymentInfo.Get(oid, tipo, true); } _mf_type = ManagerFormType.MFView; }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = ETipoPago.Prestamo; if (parameters[1] != null) { _loan = (LoanInfo)parameters[1]; } _entity = PaymentInfo.Get(oid, tipo, true); _mf_type = ManagerFormType.MFView; _loans = _loan != null? LoanList.NewList(_loan) : LoanList.GetByPagoAndPendientesList(_entity); //if (_prestamo != null) { PaymentList pagos = PaymentList.GetListByPrestamo(_loans[0], false); TransactionPaymentInfo pf = _entity.Operations != null?_entity.Operations.GetItemByFactura(_loans[0].Oid) : null; if (pf != null) { _loans[0].Asignado = pf.Cantidad; _loans[0].TotalPagado = 0; foreach (PaymentInfo pago in pagos) { if (pago.EEstado == moleQule.Base.EEstado.Anulado) { continue; } _loans[0].TotalPagado += pago.Importe; } } _loans[0].Pendiente = _loans[0].Importe - _loans[0].TotalPagado + _loans[0].Asignado; _loans[0].PendienteAsignar = _loans[0].Pendiente - _loans[0].Asignado; } }
protected virtual void AsociaPagoFacturaAction() { BankAccountInfo cuenta = BankAccountInfo.Get(_entity.OidCuenta, false); if (cuenta.ETipoCuenta == moleQule.Common.Structs.ETipoCuenta.CuentaCorriente) { PgMng.ShowInfoException("No se puede asociar un pago de factura a una cuenta corriente. Debe seleccionar una cuenta de comercio exterior"); return; } PaymentInfo pago = PaymentInfo.Get(_entity.OidPago, ETipoPago.Factura, false); if (pago.EMedioPago == moleQule.Common.Structs.EMedioPago.ComercioExterior) { PgMng.ShowInfoException("El pago asociado al préstamo actual ha sido generado automáticamente por la aplicación y no es posible modificarlo"); return; } else { if (_entity.Payments.Count > 0) { PgMng.ShowInfoException("El préstamo actual tiene pagos y no es posible modificar el pago de factura asociado"); return; } else { PaymentSelectForm form = new PaymentSelectForm(this, ETipoPago.Factura); if (form.ShowDialog(this) == DialogResult.OK) { PaymentInfo info = form.Selected as PaymentInfo; _entity.OidPago = info.Oid; _entity.Pago = _entity.Nombre; _entity.Importe = info.Importe; _entity.FechaFirma = info.Fecha; _entity.FechaIngreso = info.Fecha; _entity.FechaVencimiento = info.Vencimiento; } } } }