diff --git a/NX.ERP.U8/AP/APVouch.cs b/NX.ERP.U8/AP/APVouch.cs index e3b8eec..9c0adc1 100644 --- a/NX.ERP.U8/AP/APVouch.cs +++ b/NX.ERP.U8/AP/APVouch.cs @@ -242,6 +242,11 @@ namespace NX.ERP.U8.AP } headXml.setAttribute("cDefine10", id); var supplier = new SupplierDAL().GetModel(ApVouch.supplierCode); + if (supplier==null) + { + throw new Exception($"未知供应商(${ApVouch.supplierCode})"); + + } var per = new NX.ERP.U8.User.UserDal().GetModel(supplier.VenPPerson); headXml.setAttribute("cPerson", supplier.VenPPerson); if (per != null)