|
@@ -99,11 +99,12 @@ func (ct *InvoicePaymentController) List(c *gin.Context) {
|
|
|
page.SetCurrent(1)
|
|
|
}
|
|
|
|
|
|
- total, list, e := fms.GetInvoicePaymentCensusPageList(page, cond, pars)
|
|
|
+ list, allRegisterIds, e := fms.GetInvoicePaymentCensusPageList(page, cond, pars)
|
|
|
if e != nil {
|
|
|
resp.FailMsg("获取失败", "获取商品到款统计列表失败, Err: "+e.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
+ total := int64(len(allRegisterIds))
|
|
|
registerIds := make([]int, 0)
|
|
|
for i := range list {
|
|
|
registerIds = append(registerIds, list[i].ContractRegisterId)
|
|
@@ -201,8 +202,8 @@ func (ct *InvoicePaymentController) List(c *gin.Context) {
|
|
|
// 开票到款金额合计(换算后)
|
|
|
amountTotalCond := `contract_register_id IN ?`
|
|
|
amountTotalPars := make([]interface{}, 0)
|
|
|
- amountTotalPars = append(amountTotalPars, registerIds)
|
|
|
- amountTotalList, e := fms.GetContractInvoiceAmountTotal(amountTotalCond, amountTotalPars)
|
|
|
+ amountTotalPars = append(amountTotalPars, allRegisterIds)
|
|
|
+ amountTotalList, e := fms.GetContractInvoiceAmountTotal(cond, pars)
|
|
|
if e != nil {
|
|
|
resp.FailMsg("获取失败", "获取开票到款金额合计失败, Err:"+e.Error(), c)
|
|
|
return
|