Example #1
0
        internal static DateTime GetStatementTillDate(CreditCardBase objBase, DateTime baseDate)
        {
            if (objBase.ETipoTarjeta != ETipoTarjeta.Credito)
            {
                return(DateTime.MinValue);
            }

            switch (objBase.EFormaPago)
            {
            case EFormaPago.MesVencido:

                int statement_limit_day = objBase.StatementLimitDay(baseDate);
                return((baseDate.Day <= statement_limit_day)
                                ? new DateTime(baseDate.Year, baseDate.Month, statement_limit_day)
                                : new DateTime(baseDate.AddMonths(1).Year, baseDate.AddMonths(1).Month, statement_limit_day));

            case EFormaPago.XDiasMes:

                return(new DateTime(baseDate.Year, baseDate.Month, DateAndTime.LastDay(baseDate.Month, baseDate.Year).Day));

            //Caso imposible
            default:
                return(DateTime.MinValue);
            }
        }
        public static WorkReportResourceList GetByEmployeeList(List <long> oidEmployees, int year, int month, bool clustered, bool childs = true)
        {
            QueryConditions conditions = new QueryConditions
            {
                OidList  = oidEmployees,
                Orders   = new OrderList(),
                FechaIni = (year == 0)
                            ? DateTime.MinValue
                            : (month == 0) ? DateAndTime.FirstDay(year) : DateAndTime.FirstDay(month, year),
                FechaFin = (year == 0)
                            ? DateTime.MaxValue
                            : (month == 0) ? DateAndTime.LastDay(year) : DateAndTime.LastDay(month, year),
            };

            if (clustered)
            {
                conditions.Groups = new GroupList();
                conditions.Groups.NewGroup("OidResource", typeof(WorkReportResource));
                conditions.Groups.NewGroup("Year", typeof(WorkReportResource));
                conditions.Groups.NewGroup("Month", typeof(WorkReportResource));

                conditions.Orders.NewOrder("Year", ListSortDirection.Descending, typeof(WorkReportResource));
                conditions.Orders.NewOrder("Month", ListSortDirection.Descending, typeof(WorkReportResource));
            }
            else
            {
                conditions.Orders.NewOrder("From", ListSortDirection.Descending, typeof(WorkReportResource));
                conditions.Orders.NewOrder("WorkReportID", ListSortDirection.Descending, typeof(WorkReportResource));
            }

            return(GetList(WorkReportResource.SELECT_BY_EMPLOYEES(conditions, false), childs));
        }
        protected void UpdateFechas()
        {
            switch (_periodo)
            {
            case EPeriodo.Anual:

                FInicial_DTP.Value = DateAndTime.FirstDay(AnoActivo_DTP.Value.Year);
                FFinal_DTP.Value   = DateAndTime.LastDay(AnoActivo_DTP.Value.Year);
                break;

            case EPeriodo.Periodo1T:

                FInicial_DTP.Value = DateAndTime.FirstDay(1, AnoActivo_DTP.Value.Year);
                FFinal_DTP.Value   = DateAndTime.LastDay(3, AnoActivo_DTP.Value.Year);
                break;

            case EPeriodo.Periodo2T:

                FInicial_DTP.Value = DateAndTime.FirstDay(4, AnoActivo_DTP.Value.Year);
                FFinal_DTP.Value   = DateAndTime.LastDay(6, AnoActivo_DTP.Value.Year);
                break;

            case EPeriodo.Periodo3T:

                FInicial_DTP.Value = DateAndTime.FirstDay(7, AnoActivo_DTP.Value.Year);
                FFinal_DTP.Value   = DateAndTime.LastDay(9, AnoActivo_DTP.Value.Year);
                break;

            case EPeriodo.Periodo4T:

                FInicial_DTP.Value = DateAndTime.FirstDay(10, AnoActivo_DTP.Value.Year);
                FFinal_DTP.Value   = DateAndTime.LastDay(12, AnoActivo_DTP.Value.Year);
                break;
            }
        }
Example #4
0
        public static ChargeSummaryList GetDudosoCobroList(int year)
        {
            QueryConditions conditions = new QueryConditions
            {
                FechaIni = DateAndTime.FirstDay(year),
                FechaFin = DateAndTime.LastDay(year),
            };

            return(GetList(SELECT_DUDOSO_COBRO(conditions)));
        }
Example #5
0
        public static ChargeSummaryList GetPendientesList(int year)
        {
            QueryConditions conditions = new QueryConditions
            {
                FechaIni = DateAndTime.FirstDay(year),
                FechaFin = DateAndTime.LastDay(year),
            };

            return(GetList(SELECT_PENDIENTES(new QueryConditions())));
        }
Example #6
0
        public static BankLineList GetList(int year, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                FechaIni = DateAndTime.FirstDay(year),
                FechaFin = DateAndTime.LastDay(year)
            };

            return(GetList(conditions, childs));
        }
Example #7
0
        public static OutputDeliveryList GetListBySerie(bool childs, long oidSerie, int year, ETipoAlbaranes tipo, ETipoFactura invoiceType)
        {
            QueryConditions conditions = new QueryConditions
            {
                Serie         = SerieInfo.New(oidSerie),
                TipoAlbaranes = tipo,
                TipoFactura   = invoiceType,
                FechaIni      = DateAndTime.FirstDay(year),
                FechaFin      = DateAndTime.LastDay(year)
            };

            return(GetList(childs, SELECT(conditions)));
        }
Example #8
0
        public static BankLineList GetByCuentaList(BankAccountInfo cuenta, int year, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                FechaIni       = DateAndTime.FirstDay(year),
                FechaFin       = DateAndTime.LastDay(year),
                CuentaBancaria = cuenta
            };

            BankLineList list          = GetByCuentaList(cuenta, childs);
            BankLineList filtered_list = GetList(conditions, childs);

            filtered_list.UpdateSaldos(list);

            return(filtered_list);
        }
        public static TicketList GetBySerieAndYearList(long oid_serie, int year, ETipoFactura tipo)
        {
            CriteriaEx criteria = Ticket.GetCriteria(Ticket.OpenSession());

            criteria.Childs = false;

            QueryConditions conditions = new QueryConditions
            {
                Serie       = Serie.New().GetInfo(false),
                TipoFactura = tipo,
                FechaIni    = DateAndTime.FirstDay(year),
                FechaFin    = DateAndTime.LastDay(year),
            };

            conditions.Serie.Oid = oid_serie;

            return(GetList(TicketList.SELECT(conditions), false));
        }
        public static void RellenaAlbaranesEnFacturas()
        {
            Library.Store.QueryConditions conditions = new Library.Store.QueryConditions
            {
                FechaIni = DateAndTime.FirstDay(2010),
                FechaFin = DateAndTime.LastDay(2010)
            };

            InputInvoices list_p = InputInvoices.GetList(conditions, false);

            foreach (InputInvoice item in list_p)
            {
                item.LoadChilds(typeof(AlbaranFacturaProveedor), false);
                item.SetAlbaranes();
            }

            list_p.Save();
            list_p.CloseSession();
        }
        public override void RefreshSecondaryData()
        {
            EModelo[] list = { EModelo.Modelo347, EModelo.Modelo420, EModelo.Modelo111 };
            Datos_Modelos.DataSource = Library.Common.EnumText <EModelo> .GetList(list);

            Modelo_CB.SelectedValue = (long)EModelo.Modelo347;
            _modelo = (EModelo)((long)Modelo_CB.SelectedValue);
            PgMng.Grow();

            Datos_Periodo.DataSource = Library.Common.EnumText <EPeriodo> .GetList(false);

            Periodo_CB.SelectedValue = (long)EPeriodo.Anual;

            FInicial_DTP.Checked = true;
            FFinal_DTP.Checked   = true;

            FInicial_DTP.Value = DateAndTime.FirstDay(DateTime.Today.Year);
            FFinal_DTP.Value   = DateAndTime.LastDay(DateTime.Today.Year);

            AnoActivo_DTP.Value = DateTime.Today;
        }
Example #12
0
 public static BudgetList GetList(bool childs, int year)
 {
     return(GetList(childs, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
 public static InputInvoiceList GetPagadasList(ETipoAcreedor tipo, int year, bool childs)
 {
     return(GetPagadasList(tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static InputInvoiceList GetPendientesList(ETipoAcreedor providerType, int year, bool childs)
 {
     return(GetPendientesList(providerType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
Example #15
0
 public static LoanList GetList(ELoanType loanType, int year, bool childs)
 {
     return(GetList(loanType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
Example #16
0
 public static PedidoProveedorList GetList(ETipoAcreedor tipo, int year, bool childs)
 {
     return(GetList(tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static TicketList GetList(int year, EEstado estado, bool childs)
 {
     return(GetList(DateAndTime.FirstDay(year), DateAndTime.LastDay(year), estado, childs));
 }
Example #18
0
 public static PaymentList GetList(ETipoPago tipo, int year, bool childs)
 {
     return(GetList(tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static OutputInvoiceLineList GetList(int year, bool childs)
 {
     return(GetList(DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static InputDeliveryList GetFacturados(bool childs, ETipoAcreedor tipo, int year)
 {
     return(GetFacturados(childs, tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #21
0
 public static OutputDeliveryList GetList(bool childs, ETipoEntidad holderType, int year)
 {
     return(GetList(childs, holderType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #22
0
 public static OutputDeliveryList GetAgrupados(bool childs, int year)
 {
     return(GetList(childs, 0, ETipoEntidad.Cliente, 0, ETipoAlbaranes.Agrupados, ETipoFactura.Todas, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #23
0
 public static OutputDeliveryList GetWorkList(bool childs, int year)
 {
     return(GetWorkList(childs, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #24
0
 public static OutputDeliveryList GetNoFacturados(bool childs, long oidClient, long oidSerie, int year)
 {
     return(GetNoFacturados(childs, oidClient, oidSerie, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #25
0
 public static PaymentList GetList(int year, bool childs)
 {
     return(GetList(DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static InputDeliveryList GetNoFacturados(bool childs, ETipoAcreedor tipo, long oid_acreedor, long oid_serie, int year)
 {
     return(GetList(childs, tipo, oid_acreedor, oid_serie, ETipoAlbaranes.NoFacturados, ETipoFactura.Todas, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }
Example #27
0
 public static Payments GetList(ETipoPago paymentType, int year, bool childs)
 {
     return(GetList(paymentType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static FinancialCashList GetList(int year, bool childs)
 {
     return(GetList(DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
 public static LineaRegistroList GetList(ETipoRegistro tipo, int year, bool childs)
 {
     return(GetList(tipo, DateAndTime.FirstDay(year), DateAndTime.LastDay(year), childs));
 }
Example #30
0
 public static OutputDeliveryList GetList(bool childs, long oidHolder, ETipoEntidad holderType, long oidSerie, ETipoAlbaranes deliveryType, ETipoFactura invoiceType, int year)
 {
     return(GetList(childs, oidHolder, holderType, oidSerie, deliveryType, invoiceType, DateAndTime.FirstDay(year), DateAndTime.LastDay(year)));
 }