|
|
@@ -175,9 +175,11 @@ type ErmcpModel struct {
|
|
|
PricedQty float64 `json:"pricedqty" xorm:"'PRICEDQTY'"` // 已定价量
|
|
|
UnsureQty float64 `json:"unsureqty" xorm:"'UNSUREQTY'"` // 未确定量
|
|
|
PayAmount float64 `json:"payamount" xorm:"'PAYAMOUNT'"` // 已收付额(收款或付款)
|
|
|
- UnpayAmount float64 `json:"unpayamount"` // 待支收额(支付或收款)
|
|
|
+ UnpayAmount float64 `json:"unpayamount"` // 应收付款额(应支付或应收款)
|
|
|
+ PrePayAmount float64 `json:"prepayamount"` // 预收付额
|
|
|
InvoiceAmount float64 `json:"invoiceamount" xorm:"'INVOICEAMOUNT'"` // 已开票额
|
|
|
- DaikaiAmount float64 `json:"daikaiamount" xorm:"'DAIKAIAMOUNT'"` // 待开票额
|
|
|
+ DaikaiAmount float64 `json:"daikaiamount" xorm:"'DAIKAIAMOUNT'"` // 应收(开)票额
|
|
|
+ PreInvoiceAmount float64 `json:"preinvoiceamount"` // 预收(开)票额
|
|
|
StartDate string `json:"startdate" xorm:"'STARTDATE'"` // 点价开始日
|
|
|
EndDate string `json:"enddate" xorm:"'ENDDATE'"` // 点价结束日
|
|
|
DeliveryStartDate string `json:"deliverystartdate" xorm:"'DELIVERYSTARTDATE'"` // 交割开始日
|
|
|
@@ -201,7 +203,7 @@ type ErmcpModel struct {
|
|
|
LoanAmount float64 `json:"loanamount" xorm:"'LoanAmount'"` // 贷款总额=已定价额+调整金额
|
|
|
Contractno string `json:"contractno" xorm:"'Contractno'"` // 合同编号
|
|
|
TotalAmount float64 `json:"totalamount" xorm:"'-'"` // 合计总额
|
|
|
- ReckonedAmount float64 `json:"reckonedamount" xorm:"'ReckonedAmount'"` // 已收付额(已确定额)
|
|
|
+ ReckonedAmount float64 `json:"reckonedamount" xorm:"'ReckonedAmount'"` // 实际已收付额(已确定额,已收付总额-已退款总额)
|
|
|
BUYUSERID int64 `json:"-" xorm:"'BUYUSERID'"` // 采购方ID
|
|
|
SELLUSERID int64 `json:"-" xorm:"'SELLUSERID'"` // 销售方ID
|
|
|
AUDITTIME string `json:"audittime" xorm:"'AUDITTIME'"` // 审核时间
|
|
|
@@ -219,7 +221,8 @@ func (r *ErmcpModel) calc() {
|
|
|
// #94293 公式调整:合计总额不再加保证金
|
|
|
r.TotalAmount = r.LoanAmount + r.ReckonOtherAmount
|
|
|
r.UnpayAmount = r.TotalAmount - r.ReckonedAmount
|
|
|
-
|
|
|
+ r.PrePayAmount = r.ReckonedAmount - r.TotalAmount
|
|
|
+ r.PreInvoiceAmount = r.InvoiceAmount - r.TotalAmount
|
|
|
if r.Contracttype == 1 {
|
|
|
//采购合同, 取销售方名称
|
|
|
r.AccountName = mtpcache.GetUserNameByUserId(r.SELLUSERID)
|