public ActionResult GetReturnItems(string inwardno)
        {
            MainApplication model = new MainApplication();

            model.InwardFromSupplierDetails   = _InwardFromSupplierService.GetDetailsByPINo(inwardno);
            model.InwardItemsFromSupplierList = _InwardItemFromSupplierService.GetItemsByPINo(inwardno);
            List <InwardItemsFromSupplier> InwardItemList = new List <InwardItemsFromSupplier>();

            foreach (var item in model.InwardItemsFromSupplierList)
            {
                if (item.PurchaseReturn == "No")
                {
                    InwardItemList.Add(item);
                }
            }
            model.InwardItemsFromSupplierList = InwardItemList;
            model.PurchaseInventoryTaxList    = _PurchaseInventoryTaxService.GetTaxesByCode(inwardno);
            model.PurchaseReturnItemList      = new List <PurchaseReturnItem>();
            var LastPurchaseReturn = _PurchaseReturnService.GetLastReturnBillOfSupplier(inwardno);

            if (LastPurchaseReturn != null)
            {
                model.PurchaseReturnDetails  = LastPurchaseReturn;
                model.PurchaseReturnItemList = _PurchaseReturnItemService.GetReturnItemsByReturnNo(LastPurchaseReturn.PurchaseReturnNo);
            }
            TempData["InwardItemList"]     = model.InwardItemsFromSupplierList;
            TempData["PurchaseReturnList"] = model.PurchaseReturnItemList;
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult GetDetailsByInwardNo(string InwardNo)
        {
            MainApplication model = new MainApplication();

            model.InwardItemsFromSupplierList = _InwardItemFromSupplierService.GetItemsByPINo(InwardNo);
            return(View(model));
        }