|
@@ -358,7 +358,7 @@ func GetInvoiceCensusList(condition string, pars []interface{}) (results []*Invo
|
|
|
Where(condition, pars...).Group("contract_register_id")
|
|
|
|
|
|
nq := global.DEFAULT_MYSQL.Table("(?) AS e", query).
|
|
|
- Select("*").Where(" e.invoiced_amount_count <> e.contract_amount ")
|
|
|
+ Select("*").Where(" (e.invoiced_amount_count <> e.contract_amount AND e.contract_amount <> 0) OR (e.contract_amount = 0 AND e.invoiced_amount_count <> e.payment_amount_count) ")
|
|
|
|
|
|
err = nq.Find(&results).Error
|
|
|
if err != nil {
|