| | |
| | | left join production_product_main ppm on qi.product_main_id = ppm.id |
| | | left join product_work_order pwo on ppm.work_order_id = pwo.id |
| | | left join product_order po on pwo.product_order_id = po.id |
| | | left join sales_ledger_product slp on po.product_model_id = slp.id |
| | | left join sales_ledger_product slp on po.sale_ledger_product_id = slp.id |
| | | where qi.product_main_id = #{productMainId} |
| | | |
| | | |
| | |
| | | AND slp.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.status != null and req.status "> |
| | | AND slp.pending_invoice_total > 0 |
| | | AND slp.pending_tickets_total > 0 |
| | | </if> |
| | | </where> |
| | | order by slp.register_date desc |