public AlbaranRecibidoListRpt GetListReport(InputDeliveryList list, SerieList series, ProviderBaseList acreedores) { if (list.Count == 0) { return(null); } AlbaranRecibidoListRpt doc = new AlbaranRecibidoListRpt(); List <InputDeliveryPrint> pList = new List <InputDeliveryPrint>(); foreach (InputDeliveryInfo item in list) { pList.Add(InputDeliveryPrint.New(item, acreedores.GetItem(item.OidAcreedor, item.ETipoAcreedor), series.GetItem(item.OidSerie))); } doc.SetDataSource(pList); FormatHeader(doc); return(doc); }
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); } }
protected void CopyValues(ExpedientInfo source, ExpenseList list , InputDeliveryLineList conceptos , InputDeliveryList albaranes) { if (source == null) { return; } Oid = source.Oid; Expediente = source.Codigo; foreach (ExpenseInfo item in list) { if (item.OidExpediente == source.Oid) { CheckGasto(item); } } foreach (InputDeliveryLineInfo item in conceptos) { if (item.OidExpediente == source.Oid) { CheckGasto(list, albaranes.GetItem(item.OidAlbaran)); } } if (Proveedor != null) { Proveedor = Proveedor.Substring(0, Proveedor.Length - 1); } if (Naviera != null) { Naviera = Naviera.Substring(0, Naviera.Length - 1); } if (Despachante != null) { Despachante = Despachante.Substring(0, Despachante.Length - 1); } if (TransportistaOrigen != null) { TransportistaOrigen = TransportistaOrigen.Substring(0, TransportistaOrigen.Length - 1); } if (TransportistaDestino != null) { TransportistaDestino = TransportistaDestino.Substring(0, TransportistaDestino.Length - 1); } }
public ExpensesReportVerticalRpt GetInformeGastoVerticalListReport(ExpenseList list, ExpedienteList expedientes, ReportFilter filter, InputDeliveryLineList conceptos) { if (list == null) { return(null); } ExpensesReportVerticalRpt doc = new ExpensesReportVerticalRpt(); List <ResumenGastoPrint> pList = new List <ResumenGastoPrint>(); InputDeliveryList albaranes = InputDeliveryList.GetList(false); foreach (ExpedientInfo item in expedientes) { if (filter.SoloIncompletos) { if (list.ExpedienteIsComplete(item.Oid)) { continue; } } ResumenGastoPrint registro = ResumenGastoPrint.New(item, list, conceptos, albaranes); if (registro.Proveedor != null || registro.Naviera != null || registro.Despachante != null || registro.TransportistaDestino != null || registro.TransportistaOrigen != null) { pList.Add(registro); } } doc.SetDataSource(pList); FormatHeader(doc); return(doc); }