protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; if (parameters[1] != null) { _holder = (IAcreedor)parameters[1]; _holder.LoadChilds(typeof(Payment), true); _entity = _holder.Pagos.GetItem(oid); } else { _entity = Payment.Get(oid, tipo); } _entity.BeginEdit(); if (_holder != null) { _payrolls = PayrollList.GetByPagoAndPendientesList(_entity.GetInfo(false), (_holder as Employee).Oid, false); } else { _payrolls = PayrollList.GetByPagoAndPendientesList(_entity.GetInfo(false), false); } }
protected override void GetFormSourceData(long oid, object[] parameters) { try { ETipoPago tipo = ETipoPago.Prestamo; if (parameters[1] != null) { _loan = (Loan)parameters[1]; } if (parameters.Length >= 3) { _entity = (Payment)parameters[2]; } else { _entity = Payment.Get(oid, tipo, true); _entity.BeginEdit(); } _loans = _loan != null? LoanList.NewList(_loan) : LoanList.GetByPagoAndPendientesList(_entity.GetInfo(false)); if (_loans.Count > 0) { PaymentList pagos = PaymentList.GetListByPrestamo(_loans[0], false); TransactionPayment pf = _entity.Operations.GetItemByFactura(_loans[0].Oid); 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; } } catch (Exception ex) { if (_entity != null) { _entity.CloseSession(); } throw ex; } }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; _entity = PaymentInfo.Get(oid, tipo, true); _mf_type = ManagerFormType.MFView; }
public PaymentSelectForm(Form parent, ETipoPago tipo) : base(true, parent, tipo, null) { InitializeComponent(); _view_mode = molView.Select; _action_result = DialogResult.Cancel; }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; _entity = Payment.Get(oid, tipo); _entity.BeginEdit(); _gastos = ExpenseList.GetByPagoAndPendientesList(moleQule.Store.Structs.EnumConvert.ToECategoriaGasto(tipo), _entity.GetInfo(false), false); }
public ExpensePaymentViewForm(long oid, ETipoPago tipo, Form parent) : base(oid, new object[3] { tipo, null, null }, true, parent) { InitializeComponent(); SetFormData(); _mf_type = ManagerFormType.MFView; }
public PagoFraccionadoViewForm(long oid, ETipoPago tipo, Form parent) : base(oid, new object[1] { tipo }, true, parent) { InitializeComponent(); SetFormData(); _mf_type = ManagerFormType.MFView; }
public LoanPaymentEditForm(long oid, ETipoPago tipo, Form parent) : this(oid, tipo, null, parent) { InitializeComponent(); if (_entity != null) { SetFormData(); } _mf_type = ManagerFormType.MFEdit; }
public static ECategoriaGasto ToECategoriaGasto(ETipoPago source) { switch (source) { case ETipoPago.Gasto: return(ECategoriaGasto.Generales); case ETipoPago.Nomina: return(ECategoriaGasto.Nomina); } return(ECategoriaGasto.Todos); }
public TransactionPayment GetItemByITransaction(ITransactionPayment source, ETipoPago tipo) { foreach (TransactionPayment item in this) { if ((item.OidOperation == source.Oid) && (item.ETipoPago == tipo)) { return(item); } } return(null); }
public static Payments GetList(ETipoPago paymentType, DateTime from, DateTime till, bool childs) { QueryConditions conditions = new QueryConditions { PaymentType = paymentType, FechaIni = from, FechaFin = till }; return(GetList(conditions, childs)); }
public CreditCardPaymentEditForm(long oid, ETipoPago tipo, Form parent) : base(oid, new object[3] { tipo, null, null }, true, parent) { InitializeComponent(); if (_entity != null) { SetFormData(); } _mf_type = ManagerFormType.MFEdit; }
public PagoFraccionadoEditForm(long oid, ETipoPago tipo, Form parent) : base(oid, new object[1] { tipo }, true, parent) { InitializeComponent(); if (_entity != null) { SetFormData(); } _mf_type = ManagerFormType.MFEdit; }
public LoanPaymentEditForm(Payment payment, ETipoPago tipo, Loan source, Form parent) : base(-1, new object[3] { tipo, source, payment }, true, parent) { InitializeComponent(); if (_entity != null) { SetFormData(); } _mf_type = ManagerFormType.MFEdit; }
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; }
public static EBankLineType ToETipoMovimientoBanco(ETipoPago source) { switch (source) { case ETipoPago.Factura: return(EBankLineType.PagoFactura); case ETipoPago.Gasto: return(EBankLineType.PagoGasto); case ETipoPago.Nomina: return(EBankLineType.PagoNomina); case ETipoPago.Prestamo: return(EBankLineType.PagoPrestamo); case ETipoPago.ExtractoTarjeta: return(EBankLineType.ExtractoTarjeta); } return(EBankLineType.Todos); }
protected override void SetView(molView view) { base.SetView(view); switch (_view_mode) { case molView.Select: HideAction(molAction.Add); HideAction(molAction.Edit); HideAction(molAction.Delete); HideAction(molAction.Unlock); HideAction(molAction.ChangeStateContabilizado); HideAction(molAction.ChangeStateAnulado); HideAction(molAction.ChangeStateEmitido); ShowAction(molAction.ShowDocuments); HideAction(molAction.PrintListQR); break; case molView.Normal: ETipoPago tipo = ActiveItem == null ? _tipo : ActiveItem.ETipoPago; if (tipo == ETipoPago.Prestamo) { HideAction(molAction.Add); } else { ShowAction(molAction.Add); } ShowAction(molAction.Edit); HideAction(molAction.Delete); ShowAction(molAction.Unlock); ShowAction(molAction.ChangeStateContabilizado); ShowAction(molAction.ChangeStateAnulado); HideAction(molAction.ChangeStateEmitido); ShowAction(molAction.ShowDocuments); ShowAction(molAction.PrintListQR); break; } }
public PaymentMngForm(bool is_modal, Form parent, ETipoPago tipo, PaymentList list) : base(is_modal, parent, list) { InitializeComponent(); SetView(molView.Normal); // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas DatosLocal_BS = Datos; Tabla.DataSource = DatosLocal_BS; SetMainDataGridView(Tabla); Datos.DataSource = PaymentList.NewList().GetSortedList(); OrderByColumn(Vencimiento, ListSortDirection.Descending); _tipo = tipo; this.Text = String.Format(Resources.Labels.PAGOS_TITLE, moleQule.Store.Structs.EnumText <ETipoPago> .GetLabel(_tipo)); }
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 override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; if (parameters[1] != null) { _root = (PaymentInfo)parameters[1]; _entity = (Payment)parameters[2]; PaymentInfo info = _entity.GetInfo(true); info.Oid = -1; _statements = CreditCardStatementList.GetByPaymentAndUnpaidList(info.Oid, info.OidTarjetaCredito, false); } else { _entity = Payment.Get(oid, tipo); _entity.BeginEdit(); _entity.BeginTransaction(); _statements = CreditCardStatementList.GetByPaymentAndUnpaidList(_entity.Oid, _entity.OidTarjetaCredito, false); } }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoPago tipo = (ETipoPago)parameters[0]; if (parameters[1] != null) { _root = (PaymentInfo)parameters[1]; _entity = (Payment)parameters[2]; PaymentInfo info = _entity.GetInfo(true); info.Oid = -1; _expenses = ExpenseList.GetByPagoAndPendientesList(moleQule.Store.Structs.EnumConvert.ToECategoriaGasto(tipo), info, false); } else { _entity = Payment.Get(oid, tipo); _entity.BeginEdit(); _entity.BeginTransaction(); _expenses = ExpenseList.GetByPagoAndPendientesList(moleQule.Store.Structs.EnumConvert.ToECategoriaGasto(tipo), _entity.GetInfo(true), false); } }
public LoanPaymentAddForm(ETipoPago tipo, Loan source, Form parent) : this(new object[3] { null, tipo, source }, parent) { }
public LoanPaymentAddForm(ETipoPago tipo, Form parent) : this(ETipoPago.Prestamo, null, null) { }
public Payment NewItem(PaymentInfo pago, ETipoPago tipo) { this.NewItem(Payment.NewChild(pago, tipo)); return(this[Count - 1]); }
/// <summary> /// Crea y añade un elemento a la lista /// </summary> /// <returns>Nuevo item</returns> public Payment NewItem(IAcreedor parent, ETipoPago tipo) { this.NewItem(Payment.NewChild(parent, tipo)); return(this[Count - 1]); }
public static Payments GetList(ETipoPago paymentType, int year, bool childs) { return(GetList(paymentType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs)); }
public static Payments GetList(ETipoPago paymentType, bool childs) { return(GetList(paymentType, DateTime.MinValue, DateTime.MaxValue, childs)); }
public CreditCardPaymentAddForm(ETipoPago tipo, Form parent) : this(new object[2] { null, tipo }, parent) { }
public static PaymentList GetList(ETipoPago tipo, int year, bool childs) { return(GetList(tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs)); }
public static PaymentList GetList(ETipoPago tipo, bool childs) { return(GetList(tipo, DateTime.MinValue, DateTime.MaxValue, childs)); }