public ActionResult ConfirmReturnEntry(FormCollection collection)
        {
            try
            {
                var         products   = GetProductFromXmlFile(GetTempReturnProductsXmlFilePath());
                var         deliveryId = products.FirstOrDefault().DeliveryId;
                var         clientId   = _iDeliveryManager.GetChalanByDeliveryId(Convert.ToInt32(deliveryId)).ViewClient.ClientId;
                var         user       = (ViewUser)Session["user"];
                var         branchId   = Convert.ToInt32(Session["BranchId"]);
                var         companyId  = Convert.ToInt32(Session["CompanyId"]);
                ReturnModel model      = new ReturnModel
                {
                    ReturnIssueByUserId   = user.UserId,
                    Products              = products.ToList(),
                    BranchId              = branchId,
                    CompanyId             = companyId,
                    ClientId              = clientId,
                    Remarks               = collection["Remarks"],
                    CurrentApprovalLevel  = 1,
                    CurrentApproverRoleId = Convert.ToInt32(RoleEnum.SalesManager)
                };

                var result = _iProductReturnManager.SaveReturnProduct(model);
                if (result)
                {
                    RemoveAll();
                    return(RedirectToAction("Entry"));
                }
                ViewBag.Result = "Failed to save";
                return(View());
            }
            catch (Exception exception)
            {
                Log.WriteErrorLog(exception);
                return(PartialView("_ErrorPartial", exception));
            }
        }
        public ActionResult Chalan(int id)
        {
            var chalan = _iDeliveryManager.GetChalanByDeliveryId(id);

            return(View(chalan));
        }