Browse Source

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

maxianghua 4 years ago
parent
commit
4c97ba6c66

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

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