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)); }
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)); }
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))); }
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); } }
public static PayrollList GetPendientesList(long oid_empleado, bool childs) { QueryConditions conditions = new QueryConditions { Acreedor = ProviderBaseInfo.New(oid_empleado, ETipoAcreedor.Empleado) }; return(GetPendientesList(conditions, childs)); }
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); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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); }
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)); }
public static PaymentList GetListByAgente(long oid, ETipoAcreedor tipo, bool childs) { return(GetList(PaymentList.SELECT(ProviderBaseInfo.New(oid, tipo)), childs)); }