public ActionResult Vendors()
        {
            var vendors = _purchasingService.GetVendors();
            var model   = new Web.Models.ViewModels.Purchases.Vendors();

            if (vendors != null)
            {
                foreach (var vendor in vendors)
                {
                    model.VendorsList.Add(new Models.ViewModels.Purchases.VendorsListLine()
                    {
                        Id      = vendor.Id,
                        Name    = vendor.Party.Name == null ? "Name" : vendor.Party.Name,
                        Balance = vendor.GetBalance()
                    });
                }
            }
            return(View(model));
        }
Exemplo n.º 2
0
 public ActionResult Vendors()
 {
     var vendors = _purchasingService.GetVendors();
     var model = new Web.Models.ViewModels.Purchases.Vendors();
     if (vendors != null)
     {
         foreach (var vendor in vendors)
         {
             model.VendorsList.Add(new Models.ViewModels.Purchases.VendorsListLine()
             {
                 Id = vendor.Id,
                 Name = vendor.Name == null ? "Name" : vendor.Name,
                 Balance = vendor.GetBalance()
             });
         }
     }
     return View(model);
 }