//[OutputCache(Duration = 3600, VaryByParam = "code,v")]
        public ActionResult GetPrice(int?code, string v)
        {
            Tax_Rate t = new Tax_Rate {
                id = 1, rate = 10, type = 2
            };
            //var product = ProductsList.FirstOrDefault(x => x.Id == code);

            var allPosItems = _posItemService.GetAllInclude("StockItem").ToList();

            var availableItemsId = allPosItems.Where(x => x.Remaining > 0 && x.DistributionPointId == DistributionPointId).Select(x => x.ItemId).ToList();

            var product = ProductsList.FirstOrDefault(x => x.Id == code && availableItemsId.Contains((int)x.Id));

            if (product == null)
            {
                product = new POSService.Entities.StockItem();
                product.TotalQuantity = 0;
            }
            else
            {
                var posItem = allPosItems.FirstOrDefault(x => x.ItemId == code.Value);
                product.TotalQuantity = posItem.Remaining;
            }



            return(Json(new
            {
                price = decimal.Zero,
                name = product.StockItemName,
                code = product.Id.ToString(),
                tax_rate = t,
                available = product.TotalQuantity
            }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult GetItemByBarCode(string csrf_sma, string code)
        {
            Tax_Rate t = new Tax_Rate {
                id = 1, rate = 10, type = 2
            };
            var product = ProductsList.FirstOrDefault(x => x.Barcode == code);

            return(Json(new
            {
                item_price = product.UnitPrice,
                product_name = product.StockItemName,
                product_code = product.Id.ToString(),
                tax_rate = t
            }, JsonRequestBehavior.AllowGet));
        }