gaoluyang
14 小时以前 9cd4074a456fd5c422506279191b6015836347e5
src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -33,7 +33,8 @@
        WHEN (IFNULL(t2.qualitity, 0) - IFNULL(t2.locked_quantity, 0)) >0 THEN 1
        ELSE 0
        END as has_sufficient_stock,
        NULL as no_quantity,
        -- 待发货数量 = 订单数量 - 已发货数量 - 审批中/待审核数量,最小为 0
        GREATEST(IFNULL(T1.quantity, 0) - IFNULL(t3.shipped_quantity, 0) - IFNULL(t5.pending_approval_quantity, 0), 0) as no_quantity,
        IFNULL(t3.shipped_quantity, 0) as shipped_quantity,
        IFNULL(t6.return_quantity, 0) as return_quantity,
        IFNULL(t4.approved_stock_in_num, 0) as approved_stock_in_num,