| | |
| | | sm.is_white, |
| | | pl.approval_status, |
| | | pl.payment_method, |
| | | pl.remarks |
| | | pl.remarks, |
| | | pl.status |
| | | FROM purchase_ledger pl |
| | | LEFT JOIN ( |
| | | SELECT |
| | |
| | | ) tr_sum ON pl.id = tr_sum.purchase_ledger_id |
| | | LEFT JOIN supplier_manage sm ON pl.supplier_id = sm.id |
| | | <where> |
| | | <if test="c.status != null"> |
| | | and pl.status = #{c.status} |
| | | </if> |
| | | <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''"> |
| | | AND pl.purchase_contract_number LIKE CONCAT('%', #{c.purchaseContractNumber}, '%') |
| | | </if> |
| | |
| | | <if test="c.entryDateEnd != null and c.entryDateEnd != ''"> |
| | | AND pl.entry_date <= #{c.entryDateEnd} |
| | | </if> |
| | | <if test="c.supplierId != null"> |
| | | AND pl.supplier_id = #{c.supplierId} |
| | | </if> |
| | | <if test="c.approvalStatus != null"> |
| | | AND pl.approval_status = #{c.approvalStatus} |
| | | </if> |
| | | </where> |
| | | ORDER BY pl.entry_date DESC |
| | | </select> |