|
@@ -3500,6 +3500,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
resp.Fail(fmt.Sprintf("第%d行开票信息必填项不完整", i+1), c)
|
|
|
return
|
|
|
}
|
|
|
+ rowRegister.InvoicedAmount += rowInvoices[l].Amount
|
|
|
rowInvoiceList = append(rowInvoiceList, rowInvoices[l])
|
|
|
}
|
|
|
}
|
|
@@ -3509,6 +3510,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
resp.Fail(fmt.Sprintf("第%d行到款信息必填项不完整", i+1), c)
|
|
|
return
|
|
|
}
|
|
|
+ rowRegister.PaymentAmount += rowPayments[l].Amount
|
|
|
rowInvoiceList = append(rowInvoiceList, rowPayments[l])
|
|
|
}
|
|
|
}
|
|
@@ -3589,6 +3591,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
}
|
|
|
if ppItem.InvoiceType == 3 {
|
|
|
v.InvoiceType = 1
|
|
|
+ rowRegister.InvoicedAmount += ppItem.Amount
|
|
|
} else if ppItem.InvoiceType == 4 {
|
|
|
v.InvoiceType = 2
|
|
|
if sellerItem, ok := sellerItemMap[j]; ok{
|
|
@@ -3601,6 +3604,7 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
|
|
|
j++
|
|
|
}
|
|
|
+ rowRegister.PaymentAmount += ppItem.Amount
|
|
|
}
|
|
|
v.Set()
|
|
|
// 到款登记-付款方式
|
|
@@ -3636,6 +3640,11 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ updateCols := []string{"IsDeleted", "ModifyTime"}
|
|
|
+ if e = rowRegister.Update(updateCols); e != nil {
|
|
|
+ resp.FailMsg("操作失败", "更新合同登记失败, Err:"+e.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
//最后删除预到款记录
|
|
|
e = ppItem.Delete()
|
|
|
if e != nil {
|