gongchunyi
2026-06-28 7d6b1cb01d8340c6d86fbf98fd34fe4ca822f57d
src/main/resources/mapper/sales/ReceiptPaymentMapper.xml
@@ -445,8 +445,8 @@
        LEFT JOIN (
            SELECT
                sales_ledger_id,
                SUM(IFNULL(shipped_quantity, 0) * IFNULL(tax_inclusive_unit_price, 0)) AS receipt_payment_amount,
                SUM((IFNULL(stocked_quantity, 0) - IFNULL(shipped_quantity, 0)) * IFNULL(tax_inclusive_unit_price, 0)) AS unReceipt_payment_amount
                SUM(IFNULL(shipped_quantity, 0) * IF(IFNULL(quantity, 0) > 0, tax_inclusive_total_price / quantity, 0)) AS receipt_payment_amount,
                SUM((IFNULL(stocked_quantity, 0) - IFNULL(shipped_quantity, 0)) * IF(IFNULL(quantity, 0) > 0, tax_inclusive_total_price / quantity, 0)) AS unReceipt_payment_amount
            FROM sales_ledger_product
            WHERE type = 1
            GROUP BY sales_ledger_id