public static List <PurchaseOrderDetails> GetOrderDetailsBySupplier() { List <PurchaseOrderDetails> pos = AnalyticsDAO.GetOrderDetailsBySupplier(); List <long> itemIds = new List <long>(); foreach (var po in pos) { itemIds.Add(po.ItemId); } List <PriceList> priceLists = PriceListService.GetPriceListByItemIds(itemIds); //To get the unit price paid for the order, which may not have been provided by main supplier for that item //This is to calculate the total amount paid for the chart for (int i = 0; i < priceLists.Count; i++) { if (pos[i].SupplierId == priceLists[i].Supplier1Id) { pos[i].UnitPricePaid = priceLists[i].Supplier1UnitPrice; } else if (pos[i].SupplierId == priceLists[i].Supplier2Id) { pos[i].UnitPricePaid = priceLists[i].Supplier2UnitPrice; } else if (pos[i].SupplierId == priceLists[i].Supplier3Id) { pos[i].UnitPricePaid = priceLists[i].Supplier3UnitPrice; } } return(pos); }
public static List <RequisitionDetails> GetRequisitionsByStationeryCategory() { return(AnalyticsDAO.GetRequisitionsByStationeryCategory()); }
public static List <RequisitionDetails> GetRequisitionsByDept(string department) { return(AnalyticsDAO.GetRequisitionsByDept(department)); }