|
@@ -567,13 +567,13 @@ func (this *SellerController) InvoiceListV2(c *gin.Context) {
|
|
|
|
|
|
if req.SellerIds != "" {
|
|
|
sellerIds := strings.Split(req.SellerIds, ",")
|
|
|
- amountCond += ` AND (( b.seller_id IN ? AND a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|
|
|
- amountCond += `OR ( d.seller_id IN ? AND a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?)) `
|
|
|
- amountPars = append(amountPars, sellerIds, st, ed, sellerIds, st, ed)
|
|
|
+ amountCond += ` AND (( b.seller_id IN ? AND a.invoice_id <> 0 )`
|
|
|
+ amountCond += `OR ( d.seller_id IN ? AND a.payment_id <> 0 AND a.invoice_id = 0 )) `
|
|
|
+ amountPars = append(amountPars, sellerIds, sellerIds)
|
|
|
} else {
|
|
|
- amountCond += ` AND ((a.invoice_id <> 0 AND b.invoice_time BETWEEN ? AND ?)`
|
|
|
- amountCond += `OR (a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?))`
|
|
|
- amountPars = append(amountPars, st, ed, st, ed)
|
|
|
+ amountCond += ` AND ((a.invoice_id <> 0 )`
|
|
|
+ amountCond += `OR (a.payment_id <> 0 AND a.invoice_id = 0 ))`
|
|
|
+ amountPars = append(amountPars)
|
|
|
}
|
|
|
results, e := fms.GetContractSummaryIncomeAmount(amountCond, amountPars)
|
|
|
if e != nil {
|