@@ -227,7 +227,7 @@
sc_clearing_record cr
LEFT JOIN sc_clearing_plan cp ON ( cr.plan_id = cp.id )
WHERE
- cr.`status` = 1
+ cr.`status` = 1 and cp.`status`=1
<if test="custId != null and custId != 0 ">
and cp.clearing_customer = #{custId}
</if>