|
@@ -966,17 +966,17 @@ func (rg *PreRegisterController) Save(c *gin.Context) {
|
|
|
v.SellerGroupName = sellerItem.GroupName
|
|
|
v.SellerTeamId = sellerItem.TeamId
|
|
|
v.SellerTeamName = sellerItem.TeamName
|
|
|
- invoiceUpdateCols = append(invoiceUpdateCols,"SellerId","SellerName","SellerGroupId",
|
|
|
- "SellerGroupName","SellerTeamId","SellerTeamName")
|
|
|
+ invoiceUpdateCols = append(invoiceUpdateCols, "SellerId", "SellerName", "SellerGroupId",
|
|
|
+ "SellerGroupName", "SellerTeamId", "SellerTeamName")
|
|
|
}
|
|
|
|
|
|
// 新增开票到款记录
|
|
|
if v.ContractInvoiceId != 0 {
|
|
|
//更新
|
|
|
invoiceHandleType = 1
|
|
|
- invoiceUpdateCols = append(invoiceUpdateCols, "OriginAmount","CurrencyUnit",
|
|
|
- "InvoiceDate","Remark","ServiceProductId","StartDate","EndDate","ModifyTime")
|
|
|
- }else {
|
|
|
+ invoiceUpdateCols = append(invoiceUpdateCols, "OriginAmount", "CurrencyUnit",
|
|
|
+ "InvoiceDate", "Remark", "ServiceProductId", "StartDate", "EndDate", "ModifyTime")
|
|
|
+ } else {
|
|
|
//新增
|
|
|
invoiceHandleType = 2
|
|
|
}
|
|
@@ -984,6 +984,7 @@ func (rg *PreRegisterController) Save(c *gin.Context) {
|
|
|
|
|
|
//预登记列表
|
|
|
pp := &fms.ContractPreRegister{
|
|
|
+ PreRegisterId: req.PreRegisterId,
|
|
|
ContractRegisterId: ob.ContractRegisterId,
|
|
|
CompanyName: req.CompanyName,
|
|
|
InvoiceType: req.RegisterType,
|
|
@@ -1029,13 +1030,13 @@ func (rg *PreRegisterController) Save(c *gin.Context) {
|
|
|
pp.ArriveAmount = a
|
|
|
}
|
|
|
|
|
|
- // 新增开票到款记录
|
|
|
- if e = pp.Create(); e != nil {
|
|
|
- resp.FailMsg("操作失败", "新增预登记失败, Err: "+e.Error(), c)
|
|
|
- return
|
|
|
- }
|
|
|
+ // 更新预登记列表
|
|
|
+ //if e = pp.Create(); e != nil {
|
|
|
+ // resp.FailMsg("操作失败", "新增预登记失败, Err: "+e.Error(), c)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
}
|
|
|
- if e = fms.UpdateContractRegisterPre(ob, updateCols, serviceList,invoiceList, invoiceUpdateCols, invoiceHandleType); e != nil {
|
|
|
+ if e = fms.UpdateContractRegisterPre(ob, updateCols, serviceList, invoiceList, invoiceUpdateCols, invoiceHandleType); e != nil {
|
|
|
resp.FailMsg("操作失败", "新增合同及套餐失败, Err: "+e.Error(), c)
|
|
|
return
|
|
|
}
|