|
@@ -52,8 +52,10 @@
|
52
|
52
|
AND stl.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
|
53
|
53
|
AND stl.sttl_st_cd IN ('ST10', 'ST20') /* 정산요청/정산확정 */
|
54
|
54
|
AND IFNULL(stl.rcpt_yn, 'N') = 'N' /* 수납여부(후불사용) */
|
|
55
|
+ AND IFNULL(stl.STTL_AMT, stl.STTL_REQ_AMT) - IFNULL(stl.RCPT_AMT, 0) > 0
|
55
|
56
|
WHERE 1 = 1
|
56
|
|
- AND store.brand_id = #{sBrandId}
|
|
57
|
+ AND store.brand_id = #{sBrandId}
|
|
58
|
+ AND IFNULL(stl.STTL_AMT, stl.STTL_REQ_AMT) - IFNULL(stl.RCPT_AMT, 0) - loan.ACCT_BAL > 0
|
57
|
59
|
<if test="sStoreId != null and sStoreId != ''">
|
58
|
60
|
AND store.store_id = #{sStoreId}
|
59
|
61
|
</if>
|
|
@@ -93,11 +95,13 @@
|
93
|
95
|
AND stl.sttl_req_dt BETWEEN #{fromDt} AND #{toDt}
|
94
|
96
|
AND stl.sttl_st_cd IN ('ST10', 'ST20') /* 정산요청/정산확정 */
|
95
|
97
|
AND IFNULL(stl.rcpt_yn, 'N') = 'N'
|
|
98
|
+ AND IFNULL(stl.STTL_AMT, stl.STTL_REQ_AMT) - IFNULL(stl.RCPT_AMT, 0) > 0
|
96
|
99
|
WHERE 1 = 1
|
97
|
|
- AND store.brand_id = #{sBrandId}
|
|
100
|
+ AND store.brand_id = #{sBrandId}
|
98
|
101
|
<if test="sStoreId != null and sStoreId != ''">
|
99
|
102
|
AND store.store_id = #{sStoreId}
|
100
|
103
|
</if>
|
|
104
|
+ AND IFNULL(stl.STTL_AMT, stl.STTL_REQ_AMT) - IFNULL(stl.RCPT_AMT, 0) - loan.ACCT_BAL > 0
|
101
|
105
|
</select>
|
102
|
106
|
|
103
|
107
|
<select id="selectStlMgntBaseInfo" resultType="com.oqpo.api.entity.settmng.StlMgntBaseInfoEntity">
|