private void UpdateSalesInvoicTotal(List <SalesinvoicesDetials> deletedSalesinvoicesDetials, EntitiesDbContext context)
 {
     foreach (var item in deletedSalesinvoicesDetials)
     {
         var salesinvoiceHeader = _salesinvoicesOperationsRepo.GetById(item.SalesinvoicesHeaderId, context);
         salesinvoiceHeader.Total = salesinvoiceHeader.Total - ((item.Weight * item.Price) + (AppSettings.MashalRate + AppSettings.ByaaRate) * item.Quantity);
         _salesinvoicesOperationsRepo.Update(salesinvoiceHeader, context);
     }
 }
        public JsonResult GetById(long id)
        {
            var salesinvoicesHeader = Helper.SerializeObject(_salesinvoicesOperationsRepo.GetById(id));

            return(Json(salesinvoicesHeader));
        }