|
@@ -502,7 +502,10 @@ func (rg *RegisterController) Add(c *gin.Context) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
opData = string(opDataByte)
|
|
opData = string(opDataByte)
|
|
- opType := fms.ContractRegisterOpTypePreInvoice
|
|
|
|
|
|
+ opType := fms.ContractRegisterOpTypePrePay
|
|
|
|
+ if ppItem.InvoiceType == 3 {
|
|
|
|
+ opType = fms.ContractRegisterOpTypePreInvoice
|
|
|
|
+ }
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
newAmount = newAmount.Add(a)
|
|
newAmount = newAmount.Add(a)
|
|
@@ -579,7 +582,10 @@ func (rg *RegisterController) Add(c *gin.Context) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
opData = string(opDataByte)
|
|
opData = string(opDataByte)
|
|
- opType := fms.ContractRegisterOpTypePreInvoice
|
|
|
|
|
|
+ opType := fms.ContractRegisterOpTypePrePay
|
|
|
|
+ if ppItem.InvoiceType == 3 {
|
|
|
|
+ opType = fms.ContractRegisterOpTypePreInvoice
|
|
|
|
+ }
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
newAmount = newAmount.Add(a)
|
|
newAmount = newAmount.Add(a)
|
|
@@ -741,7 +747,10 @@ func (rg *RegisterController) Add(c *gin.Context) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
opData = string(opDataByte)
|
|
opData = string(opDataByte)
|
|
- opType := fms.ContractRegisterOpTypePreInvoice
|
|
|
|
|
|
+ opType := fms.ContractRegisterOpTypePrePay
|
|
|
|
+ if ppItem.InvoiceType == 3 {
|
|
|
|
+ opType = fms.ContractRegisterOpTypePreInvoice
|
|
|
|
+ }
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
newAmount = newAmount.Add(a)
|
|
newAmount = newAmount.Add(a)
|
|
@@ -3542,7 +3551,10 @@ func (rg *RegisterController) Import(c *gin.Context) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
//opData = string(opDataByte)
|
|
//opData = string(opDataByte)
|
|
- opType := fms.ContractRegisterOpTypePreInvoice
|
|
|
|
|
|
+ opType := fms.ContractRegisterOpTypePrePay
|
|
|
|
+ if ppItem.InvoiceType == 3 {
|
|
|
|
+ opType = fms.ContractRegisterOpTypePreInvoice
|
|
|
|
+ }
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
newAmount := decimal.NewFromFloat(0).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
a := decimal.NewFromFloat(v.Amount).Round(2)
|
|
newAmount = newAmount.Add(a)
|
|
newAmount = newAmount.Add(a)
|