瀏覽代碼

[CODE]: 应收应付总账合计

maxianghua 4 年之前
父節點
當前提交
4c97ba6c66
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

+ 6 - 2
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -385,8 +385,8 @@
             t.f_billtype AS fBilltype,
             t.f_review_date AS fReviewDate,
             w.f_dc AS fSrcdc,
-            w.f_amount AS fAmount,
-            w.f_stlamount AS fStlamount
+            SUM(w.f_amount) AS fAmount,
+            SUM(w.f_stlamount) AS fStlamount
         FROM
             t_warehousebills t
                 LEFT JOIN t_corps c ON c.f_id = t.f_corpid
@@ -452,6 +452,10 @@
                 and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
             </if>
             and  t.f_review_date IS NOT NULL
+            GROUP BY
+            w.f_pid,
+            w.f_dc,
+            w.f_corpid
         </where>
     </select>