コード例 #1
0
        public static InputInvoiceList GetList(ETipoAcreedor providerType,
                                               long oidProvider,
                                               long oidSerie,
                                               ETipoFacturas invoicesType,
                                               ETipoFactura invoiceType,
                                               DateTime from,
                                               DateTime till,
                                               bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Serie        = (oidSerie != 0) ? Serie.Serie.New().GetInfo() : null,
                TipoFacturas = invoicesType,
                TipoFactura  = invoiceType,
                FechaIni     = from,
                FechaFin     = till,
            };

            if (oidSerie != 0)
            {
                conditions.Serie.Oid = oidSerie;
            }

            return(GetList(InputInvoiceSQL.SELECT(conditions), childs));
        }
コード例 #2
0
        public static PaymentList GetList(ETipoAcreedor providerType,
                                          long oidProvider,
                                          DateTime from,
                                          DateTime till,
                                          EStepGraph step,
                                          CriteriaEx criteria,
                                          bool childs)
        {
            QueryConditions conditions = new QueryConditions()
            {
                PagingInfo   = (criteria != null) ? criteria.PagingInfo : null,
                Filters      = (criteria != null) ? criteria.Filters : null,
                Orders       = (criteria != null) ? criteria.Orders : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Acreedor    = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                PaymentType = providerType == ETipoAcreedor.Empleado ? ETipoPago.Nomina : ETipoPago.Factura,
                FechaIni    = from,
                FechaFin    = till,
                Step        = step,
            };

            string query = SELECT(conditions);

            if (criteria != null)
            {
                criteria.PagingInfo = conditions.PagingInfo;
            }

            return(GetList(query, criteria, childs));
        }
コード例 #3
0
        public static InputDeliveryList GetList(bool childs,
                                                ETipoAcreedor providerType,
                                                long oidProvider,
                                                long oidSerie,
                                                ETipoAlbaranes deliveryType,
                                                ETipoFactura invoiceType,
                                                DateTime from,
                                                DateTime till)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Serie         = (oidSerie != 0) ? Serie.SerieInfo.New(oidSerie) : null,
                TipoAlbaranes = deliveryType,
                TipoFactura   = invoiceType,
                FechaIni      = from,
                FechaFin      = till,
            };

            if (oidSerie != 0)
            {
                conditions.Serie.Oid = oidSerie;
            }

            return(GetList(childs, SELECT(conditions)));
        }
コード例 #4
0
        public static void IsPosibleDelete(long oid, ETipoAcreedor providerType)
        {
            QueryConditions conditions = new QueryConditions
            {
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Acreedor = ProviderBaseInfo.New(oid, providerType),
                Estado   = EEstado.NoAnulado
            };

            InputDeliveryList albaranes = InputDeliveryList.GetList(conditions, false);

            if (albaranes.Count > 0)
            {
                throw new iQException(Resources.Messages.ALBARANES_ASOCIADOS);
            }

            InputInvoiceList facturas = InputInvoiceList.GetList(conditions, false);

            if (facturas.Count > 0)
            {
                throw new iQException(Resources.Messages.FACTURAS_ASOCIADAS);
            }

            conditions.PaymentType = ETipoPago.Factura;

            PaymentList pagos = PaymentList.GetList(conditions, false);

            if (pagos.Count > 0)
            {
                throw new iQException(Resources.Messages.PAGOS_ASOCIADOS);
            }
        }
コード例 #5
0
        public static PayrollList GetPendientesList(long oid_empleado, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor = ProviderBaseInfo.New(oid_empleado, ETipoAcreedor.Empleado)
            };

            return(GetPendientesList(conditions, childs));
        }
コード例 #6
0
        public static PaymentSummary Get(ETipoAcreedor tipo, long oid)
        {
            CriteriaEx criteria = Expedient.GetCriteria(Expedient.OpenSession());
			
            if (nHManager.Instance.UseDirectSQL)
                criteria.Query = SELECT(ProviderBaseInfo.New(oid, tipo));

            Expedient.BeginTransaction(criteria.Session);

            return DataPortal.Fetch<PaymentSummary>(criteria);
        }
コード例 #7
0
        public static InputInvoiceList GetListNoAsignadasByAcreedor(long oid, ETipoAcreedor providerType, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = ProviderBaseInfo.New(oid, providerType),
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
            };

            return(GetList(InputInvoiceSQL.SELECT_SIN_EXPEDIENTE(conditions), childs));
        }
コード例 #8
0
        public static InputInvoiceList GetListByAcreedor(long oid, ETipoAcreedor providerType, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                Acreedor = ProviderBaseInfo.New(oid, providerType)
            };

            return(GetList(InputInvoiceSQL.SELECT(conditions), childs));
        }
コード例 #9
0
        public static PedidoProveedorList GetPendientesList(long oid, ETipoAcreedor providerType, long oidSerie, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oid != 0) ? ProviderBaseInfo.New(oid, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
            };

            return(GetList(PedidoProveedor.SELECT_PENDIENTES(conditions, false), childs));
        }
コード例 #10
0
        public static PedidoProveedorList GetByAcreedorList(long oid, ETipoAcreedor providerType, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oid != 0) ? ProviderBaseInfo.New(oid, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
            };

            return(GetList(conditions, childs));
        }
コード例 #11
0
        public static InputInvoiceList GetPendientesList(long oidProvider, ETipoAcreedor providerType, bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                TipoFacturas = ETipoFacturas.Pendientes,
                Acreedor     = ProviderBaseInfo.New(oidProvider, providerType),
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                }
            };

            return(GetList(InputInvoiceSQL.SELECT(conditions), childs));
        }
コード例 #12
0
        public static PedidoProveedorList GetList(ETipoAcreedor providerType,
                                                  long oidProvider,
                                                  DateTime from,
                                                  DateTime till,
                                                  bool childs)
        {
            QueryConditions conditions = new QueryConditions
            {
                Acreedor     = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                TipoAcreedor = new ETipoAcreedor[1] {
                    providerType
                },
                FechaIni = from,
                FechaFin = till,
            };

            return(GetList(conditions, childs));
        }
コード例 #13
0
        public static BatchList GetByProductStockList(long oidProduct, long oidProvider, ETipoAcreedor providerType, bool childs)
        {
            CriteriaEx criteria = Batch.GetCriteria(Batch.OpenSession());

            criteria.Childs = childs;

            QueryConditions conditions = new QueryConditions
            {
                Acreedor = (oidProvider != 0) ? ProviderBaseInfo.New(oidProvider, providerType) : null,
                Producto = ProductInfo.New(oidProduct)
            };

            criteria.Query = Batch.SELECT_STOCK(conditions, false);

            BatchList list = DataPortal.Fetch <BatchList>(criteria);

            CloseSession(criteria.SessionCode);
            return(list);
        }
コード例 #14
0
        public static WorkReport GetByResource(long oidResource, ETipoEntidad entityType, bool childs = true)
        {
            QueryConditions conditions = new QueryConditions();

            switch (entityType)
            {
            case moleQule.Common.Structs.ETipoEntidad.Empleado:
                conditions.Acreedor = ProviderBaseInfo.New(oidResource, ETipoAcreedor.Empleado);
                break;

            case moleQule.Common.Structs.ETipoEntidad.OutputDelivery:
                conditions.Add(oidResource, ETipoEntidad.OutputDelivery);
                break;

            case moleQule.Common.Structs.ETipoEntidad.Tool:
                conditions.Tool = ToolInfo.New(oidResource);
                break;
            }

            return(Get(SELECT(conditions, true), childs));
        }
コード例 #15
0
 public static PaymentList GetListByAgente(long oid, ETipoAcreedor tipo, bool childs)
 {
     return(GetList(PaymentList.SELECT(ProviderBaseInfo.New(oid, tipo)), childs));
 }