@@ -330,6 +330,10 @@ func (rg *PreRegisterController) Add(c *gin.Context) {
}
// 新增开票到款记录
+ if pp.ContractRegisterId == 0{
+ resp.FailMsg("操作失败", "新增预登记失败,合同ID为0, Err: "+e.Error(), c)
+ return
+ }
if e = pp.Create(); e != nil {
resp.FailMsg("操作失败", "新增预登记失败, Err: "+e.Error(), c)
return