|
|
@@ -143,7 +143,7 @@ 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" xorm:"'UNPAYAMOUNT'"` // 待支收额(支付或收款)
|
|
|
+ UnpayAmount float64 `json:"unpayamount"` // 待支收额(支付或收款)
|
|
|
InvoiceAmount float64 `json:"invoiceamount" xorm:"'INVOICEAMOUNT'"` // 已开票额
|
|
|
DaikaiAmount float64 `json:"daikaiamount" xorm:"'DAIKAIAMOUNT'"` // 待开票额
|
|
|
StartDate string `json:"startdate" xorm:"'STARTDATE'"` // 点价开始日
|
|
|
@@ -175,7 +175,8 @@ type ErmcpModel struct {
|
|
|
}
|
|
|
|
|
|
func (r *ErmcpModel) calc() {
|
|
|
- r.TotalAmount = r.LoanAmount + r.ReckonOtherAmount - r.ReckonedAmount
|
|
|
+ r.TotalAmount = r.LoanAmount + r.ReckonOtherAmount + r.Margin
|
|
|
+ r.UnpayAmount = r.TotalAmount - r.ReckonedAmount
|
|
|
if r.Contracttype == 1 {
|
|
|
//采购合同, 取销售方名称
|
|
|
r.AccountName = mtpcache.GetUserNameByUserId(r.SELLUSERID)
|
|
|
@@ -206,7 +207,6 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
|
|
|
" t.pricedqty - t.ReckonRealQty" +
|
|
|
" end) unsureqty," +
|
|
|
" t.reckonedamount PayAmount," +
|
|
|
- " t.pricedamount + t.reckonadjustamount - t.RECKONEDAMOUNT unpayAmount," +
|
|
|
" t.invoiceamount," +
|
|
|
" (t.pricedamount + t.RECKONADJUSTAMOUNT + t.RECKONOTHERAMOUNT -" +
|
|
|
" t.invoiceamount) as daikaiAmount," +
|