Ejemplo n.º 1
0
 public PurchaseView()
 {
     PurchaseProductInfo  = new PurchaseProductInfo();
     PurchaseInfos        = new List <PurchaseInfo>();
     PurchaseProductInfos = new List <PurchaseProductInfo>();
     Supplier             = new Supplier();
     Product  = new Product();
     Category = new Category();
     ProductSelectListItems = new List <SelectListItem>();
     ProductName            = new List <string>();
     ProductCode            = new List <string>();
     TotalPrices            = new List <string>();
 }
        private void AddPurchaseProductReport(PurchaseProductInfo purchaseProduct, List <PurchaseReportView> aList, DateTime startDate, DateTime endDate)
        {
            int productAvailable = PurchaseView(purchaseProduct.ProductId, startDate, endDate);

            aList.Add(new PurchaseReportView()
            {
                Product           = purchaseProduct.Product.Name,
                Code              = purchaseProduct.Product.Code,
                Category          = purchaseProduct.Product.Category.Name,
                AvailableQuantity = productAvailable,
                CostPrice         = purchaseProduct.UnitPrice * productAvailable,
                MRP    = purchaseProduct.MRP * productAvailable,
                Profit = ((purchaseProduct.MRP * productAvailable) - (purchaseProduct.UnitPrice * productAvailable))
            });
        }