huminmin
2026-05-07 c1608e8e40d61f0e90d4cf90e11e739b8b37c17c
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -14,7 +14,10 @@
        END as has_sufficient_stock
        FROM
        sales_ledger_product T1
        LEFT JOIN stock_inventory t2 ON T1.product_model_id = t2.product_model_id
        LEFT JOIN (
        select product_model_id,SUM(qualitity) as qualitity,sum(locked_quantity) as locked_quantity from stock_inventory
        group by product_model_id
        )  t2 ON T1.product_model_id = t2.product_model_id
        LEFT JOIN product_model T3 ON T1.product_model_id = T3.id
        <where>
            <if test="salesLedgerProduct.salesLedgerId != null">