diff --git a/Tanshu.Accounts.PointOfSale/Controllers/BillController.cs b/Tanshu.Accounts.PointOfSale/Controllers/BillController.cs index 530cf66..6078ab3 100644 --- a/Tanshu.Accounts.PointOfSale/Controllers/BillController.cs +++ b/Tanshu.Accounts.PointOfSale/Controllers/BillController.cs @@ -192,7 +192,9 @@ namespace Tanshu.Accounts.PointOfSale ClearBill(); if (_editVoucherID.HasValue) { - FoodTable ft = new FoodTableBI().Get(x => x.VoucherID == _editVoucherID.Value); + FoodTable ft; + using (var bi = new FoodTableBI()) + ft = bi.Get(x => x.VoucherID == _editVoucherID.Value); if (ft == null) { _editVoucherID = null; diff --git a/Tanshu.Accounts.Repository/VoucherBI.cs b/Tanshu.Accounts.Repository/VoucherBI.cs index 616f511..480d274 100644 --- a/Tanshu.Accounts.Repository/VoucherBI.cs +++ b/Tanshu.Accounts.Repository/VoucherBI.cs @@ -95,6 +95,8 @@ namespace Tanshu.Accounts.Repository NHibernateUtil.Initialize(item.Product.ProductGroup); foreach (var inmod in item.InventoryModifier) NHibernateUtil.Initialize(inmod.Modifier); + NHibernateUtil.Initialize(item.Vat); + NHibernateUtil.Initialize(item.ServiceTax); } } foreach (var item in voucher.Settlements)