public virtual void Init(ContabilidadConfig config) { _config = config; SetConditions(config.Conditions); _accounting_entry = Convert.ToInt64(_config.AsientoInicial); if (!_config.RutaSalida.EndsWith("\\")) { _config.RutaSalida += "\\"; } if (!Directory.Exists(_config.RutaSalida)) { Directory.CreateDirectory(_config.RutaSalida); } _ayudas = AyudaList.GetList(false); _taxes = ImpuestoList.GetList(false); _families = FamiliaList.GetList(false, true); _bank_accounts = BankAccountList.GetList(false); _expense_types = TipoGastoList.GetList(false); _registry = Registro.New(ETipoRegistro.Contabilidad); _registry.Nombre = Resources.Labels.REGISTRO_CONTABILIDAD; _registry.ETipoExportacion = config.TipoExportacion; _registry.Observaciones = GetConditions(); }
public TipoGastoSelectForm(Form parent, TipoGastoList list) : base(true, parent, list) { InitializeComponent(); _view_mode = molView.Select; _action_result = DialogResult.Cancel; }
public TipoGastoMngForm(bool is_modal, Form parent, TipoGastoList list) : base(is_modal, parent, list) { InitializeComponent(); SetView(); // 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 = TipoGastoList.NewList().GetSortedList(); SortProperty = Nombre.DataPropertyName; }
public override void UpdateList() { switch (_current_action) { case molAction.Add: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { TipoGastoList listA = TipoGastoList.GetList(_filter_results); listA.AddItem(_entity.GetInfo(false)); _filter_results = listA.GetSortedList(); } break; case molAction.Edit: case molAction.Unlock: if (_entity == null) { return; } ActiveItem.CopyFrom(_entity); break; case molAction.Delete: if (ActiveItem == null) { return; } List.RemoveItem(ActiveOID); if (FilterType == IFilterType.Filter) { TipoGastoList listD = TipoGastoList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "TipoGasto"); long oid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = TipoGastoList.GetSelectList(false); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de TipoGastos"); }
public virtual void ExportPayments() { Payments payments2 = null; try { _store_conditions.Orders.Clear(); _store_conditions.Orders.NewOrder("Vencimiento", System.ComponentModel.ListSortDirection.Ascending, typeof(Payment)); PaymentList payments = PaymentList.GetOrderedByFechaList(_store_conditions, true); //if (pagos.Count == 0) return; // throw new iQException(Library.Resources.Messages.NO_RESULTS); //Hacen falta todas porque un pago puede estar asociado a una factura que no este en las condiciones del filtro _input_invoices = InputInvoiceList.GetList(false); _providers = (_providers == null) ? ProviderBaseList.GetList(false) : _providers; _employees = (_employees == null) ? EmployeeList.GetList(false) : _employees; _expense_types = (_expense_types == null) ? TipoGastoList.GetList(false) : _expense_types; _payrolls = (_payrolls == null) ? PayrollList.GetList(false) : _payrolls; foreach (PaymentInfo item in payments) { if (item.EEstado == EEstado.Anulado) { continue; } LineaRegistro lr = _registry.LineaRegistros.NewItem(_registry, item); switch (item.ETipoPago) { case ETipoPago.Factura: { BuildInvoicePaymentAccountingEntry(item, lr); BuildFinancialCashBookPaymentAccountingEntry(item); } break; case ETipoPago.Nomina: { BuildPayrollPaymentAccountingEntry(item, lr); } break; case ETipoPago.Gasto: { BuildExpensePaymentAccountingEntry(item, lr); } break; case ETipoPago.ExtractoTarjeta: { BuildCreditCardStatementPaymentAccountingEntry(item, lr); } break; } _accounting_entry++; } //Cambiamos el estado de los pagos contabilizados payments2 = Payments.GetList(_store_conditions, false); foreach (Payment item in payments2) { if (item.EEstado == EEstado.Anulado) { continue; } if (item.EEstado != EEstado.Exportado) { /*if (item.EEstadoPago == EEstado.Pagado)*/ item.EEstado = EEstado.Exportado; } } payments2.Save(); } catch (iQException ex) { _registry = null; throw ex; } catch (Exception ex) { _registry = null; throw ex; } finally { if (payments2 != null) { payments2.CloseSession(); } } }