Ejemplo n.º 1
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "CobroREA");

            _selected_oid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (Library.Common.ModulePrincipal.GetUseActiveYear())
                {
                    List = CobroList.GetListREA(Library.Common.ModulePrincipal.GetActiveYear().Year, false);
                }
                else
                {
                    List = CobroList.GetListREA(false);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de CobroREAs");
        }
        public static ChargeListViewModel Get(CobroList sourceList)
        {
            ChargeListViewModel list = new ChargeListViewModel();

            foreach (CobroInfo item in sourceList)
            {
                list.Add(ChargeViewModel.New(item));
            }

            return(list);
        }
Ejemplo n.º 3
0
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            CobroReportMng reportMng = new CobroReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            CobroREAListRpt report = reportMng.GetCobroREAListReport(CobroList.GetList((IList <CobroInfo>)Datos.List), null);

            PgMng.FillUp();

            ShowReport(report);
        }
Ejemplo n.º 4
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    CobroList listA = CobroList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            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)
                {
                    CobroList listD = CobroList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Ejemplo n.º 5
0
        public CobroREAMngForm(Form parent)
            : base(false, parent, null)
        {
            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 = CobroList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;
        }
Ejemplo n.º 6
0
        protected override void RefreshMainData()
        {
            PgMng.Message = Resources.Messages.RETRIEVING_NOTIFICATIONS;

            if (List == null)
            {
                List = new NotifyEntityList();
            }
            else
            {
                List.Clear();
            }

            List = new NotifyEntityList();
            DateTime fecha;

            FechaApuntes_TI.Text = _fecha_apuntes.ToShortDateString();

            if (Library.Store.ModulePrincipal.GetNotifyFacturasRecibidas())
            {
                fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoFacturasRecibidas());

                FacturaRecibidaList = Library.Store.ModuleController.GetFacturasRecibidasPendientes();
                List.Add(new NotifyEntity(ETipoNotificacion.GastoPendiente
                                          , ETipoEntidad.FacturaRecibida
                                          , FacturaRecibidaList.Count
                                          , FacturaRecibidaList.TotalPendiente()
                                          , String.Format(Store.Resources.Messages.NOFITY_FACTURAS_RECIBIDAS_PENDIENTES, fecha.ToShortDateString())
                                          , FacturaRecibidaList));
            }
            PgMng.Grow();

            if (Library.Store.ModulePrincipal.GetNotifyPagos())
            {
                BankAccountList cuentas = BankAccountList.GetList(EEstado.Active, false);
                PagosBancosList.Clear();

                foreach (BankAccountInfo item in cuentas)
                {
                    fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoPagos());

                    PaymentList pagos_banco = Library.Store.ModuleController.GetPagosPendientesVencimiento(item);
                    PagosBancosList.Add(pagos_banco);

                    List.Add(new NotifyEntity(ETipoNotificacion.PagoBancoPendiente
                                              , ETipoEntidad.Pago
                                              , pagos_banco.Count
                                              , pagos_banco.Total()
                                              , item.Entidad
                                              , pagos_banco));
                }
            }
            PgMng.Grow();

            if (Library.Store.ModulePrincipal.GetNotifyGastos())
            {
                fecha = DateTime.Today.AddDays((double)Library.Store.ModulePrincipal.GetNotifyPlazoGastos());

                GastoList = Library.Store.ModuleController.GetGastosPendientes();
                List.Add(new NotifyEntity(ETipoNotificacion.GastoPendiente
                                          , ETipoEntidad.Gasto
                                          , GastoList.Count
                                          , GastoList.TotalPendiente()
                                          , String.Format(Store.Resources.Messages.NOFITY_GASTOS_PENDIENTES, fecha.ToShortDateString())
                                          , GastoList));
            }
            PgMng.Grow();

            if (Library.Invoice.ModulePrincipal.GetNotifyFacturasEmitidas())
            {
                fecha = DateTime.Today.AddDays((double)Library.Invoice.ModulePrincipal.GetNotifyPlazoFacturasEmitidas());

                FacturaList = Library.Invoice.ModuleController.GetFacturasPendientes();
                List.Add(new NotifyEntity(ETipoNotificacion.IngresoPendiente
                                          , ETipoEntidad.FacturaEmitida
                                          , FacturaList.Count
                                          , FacturaList.TotalPendiente()
                                          , String.Format(Invoice.Resources.Messages.NOFITY_FACTURAS_EMITIDAS_PENDIENTES, fecha.ToShortDateString())
                                          , FacturaList));
            }
            PgMng.Grow();

            if (Library.Invoice.ModulePrincipal.GetNotifyCobros())
            {
                fecha = DateTime.Today.AddDays((double)Library.Invoice.ModulePrincipal.GetNotifyPlazoCobros());

                CobroList = Library.Invoice.ModuleController.GetCobrosPendientes();
                List.Add(new NotifyEntity(ETipoNotificacion.IngresoPendiente
                                          , ETipoEntidad.Cobro
                                          , CobroList.Count
                                          , CobroList.Total()
                                          , String.Format(Invoice.Resources.Messages.NOFITY_COBROS_PENDIENTES, fecha.ToShortDateString())
                                          , CobroList));
            }
            PgMng.Grow();

            PagosVencidosList = Library.Store.ModuleController.GetPagosVencidosSinApunte(_fecha_apuntes);
            List.Add(new NotifyEntity(ETipoNotificacion.PagoVencido
                                      , ETipoEntidad.Pago
                                      , PagosVencidosList.Count
                                      , PagosVencidosList.Total()
                                      , String.Format(Store.Resources.Messages.NOTIFY_PAGOS_VENCIDOS, _fecha_apuntes.ToShortDateString())
                                      , PagosVencidosList));
            PgMng.Grow();


            CreditCardList tarjetas = CreditCardList.GetList(ETipoTarjeta.Credito, false);

            PagosTarjetasList.Clear();

            foreach (CreditCardInfo item in tarjetas)
            {
                PaymentList pagos_tarjetas = Library.Store.ModuleController.GetPagosTarjetaVencidosSinApunte(_fecha_apuntes, item);
                PagosTarjetasList.Add(pagos_tarjetas);

                List.Add(new NotifyEntity(ETipoNotificacion.PagoTarjetaVencido
                                          , ETipoEntidad.Pago
                                          , pagos_tarjetas.Count
                                          , pagos_tarjetas.Total()
                                          , item.Nombre
                                          , pagos_tarjetas));
            }
            PgMng.Grow();

            CobrosVencidosList = Library.Invoice.ModuleController.GetCobrosVencidosSinApunte(_fecha_apuntes);
            List.Add(new NotifyEntity(ETipoNotificacion.CobroVencido
                                      , ETipoEntidad.Cobro
                                      , CobrosVencidosList.Count
                                      , CobrosVencidosList.Total()
                                      , String.Format(Invoice.Resources.Messages.NOTIFY_COBROS_VENCIDOS, _fecha_apuntes.ToShortDateString())
                                      , CobrosVencidosList));
            PgMng.Grow();

            if (Library.Quality.ModulePrincipal.GetNotifyAuditorias())
            {
                //Auditorías con Plazo Máximo de Generación de Informe de Auditorías próximo a vencer
                //AuditoriaList auditorias = Library.Quality.ModuleControler.GetAvisoGeneracionInforme();
                //foreach (AuditoriaInfo item in auditorias)
                //{
                //    List.Add(new NotifyEntity(ETipoNotificacion.InformeNoGenerado
                //                    , ETipoEntidad.Auditoria
                //                    , item.Referencia));
                //}

                //Auditorías con Plazo Máximo de Notificación de Discrepancias próximo a vencer

                //Auditorías con Plazo Máximo de Notificación de Fin de Auditoría próximo a vencer

                //Auditorías con Plazo Máximo de Respuesta de Solicitud de Ampliación próximo a vencer

                //Auditorías con Discrepancias abiertas próximas a cumplir fecha de cierre
                AuditoriaList auditorias = Library.Quality.ModuleController.GetAvisoDiscrepanciasAbiertas();
                foreach (AuditoriaInfo item in auditorias)
                {
                    List.Add(new NotifyEntity(ETipoNotificacion.DiscrepanciaAbierta
                                              , ETipoEntidad.Auditoria
                                              , item.Referencia));
                }
            }
        }