liyong
4 天以前 b19637f4579b91085e46712931275f4bacde8a6e
src/main/resources/mapper/purchase/InvoicePurchaseMapper.xml
@@ -115,10 +115,11 @@
        <!--                and a.month = #{month}-->
        <!--            </if>-->
        <!--        </where>-->
        select * from (
        SELECT
        month,
        SUM(sales_tax_amount) AS sales_tax_amount,
        SUM(purchase_tax_amount) AS purchase_tax_amount
        SUM(sales_tax_amount) AS j_tax_amount,
        SUM(purchase_tax_amount) AS x_tax_amount
        FROM (
        SELECT
        DATE_FORMAT(entry_date, '%Y-%m') AS month,
@@ -135,17 +136,18 @@
        0 AS sales_tax_amount,
        ROUND(SUM(contract_amount * 0.26), 2) AS purchase_tax_amount
        FROM purchase_ledger
        <where>
            a.month is not null
            <if test="month != null">
                and a.month = #{month}
            </if>
        </where>
        WHERE entry_date IS NOT NULL
        GROUP BY DATE_FORMAT(entry_date, '%Y-%m')
        ) t
        GROUP BY month
        ORDER BY month;
        ORDER BY month
        ) a
        <where>
            a.month is not null
            <if test="month != null and month != ''">
                and a.month = #{month}
            </if>
        </where>
    </select>
    <select id="listVat1" resultType="com.ruoyi.purchase.dto.VatDto">