|
@@ -588,7 +588,8 @@ func (ct *InvoicePaymentController) List(c *gin.Context) {
|
|
|
} else if req.StartDate != "" && req.EndDate != "" {
|
|
|
st := fmt.Sprint(req.StartDate, " 00:00:00")
|
|
|
ed := fmt.Sprint(req.EndDate, " 23:59:59")
|
|
|
- cond += ` AND ((c.invoice_time BETWEEN ? AND ?) or (d.invoice_time BETWEEN ? AND ?))`
|
|
|
+ cond += ` AND ((a.invoice_id <> 0 AND c.invoice_time BETWEEN ? AND ?)`
|
|
|
+ cond += `OR (a.payment_id <> 0 AND a.invoice_id = 0 AND d.invoice_time BETWEEN ? AND ?))`
|
|
|
pars = append(pars, st, ed, st, ed)
|
|
|
}
|
|
|
|