|
@@ -10,7 +10,8 @@
|
10
|
10
|
A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
|
11
|
11
|
A.sttl_st_cd, FN_CODE_NM('STTL_ST_CD', A.sttl_st_cd) AS sttl_st_nm,
|
12
|
12
|
DATE_FORMAT(A.sttl_req_dt, '%Y.%m.%d') AS sttl_req_dt,
|
13
|
|
- A.sttl_req_amt, A.sttl_amt, C.acct_bal,
|
|
13
|
+ A.sttl_req_amt, A.sttl_amt,
|
|
14
|
+ A.sttl_req_amt - IFNULL(A.sttl_amt, 0) AS acct_bal,
|
14
|
15
|
C.loan_dvsn, FN_CODE_NM('LOAN_DVSN', C.loan_dvsn) AS loan_dvsn_nm /* 정산타입 */
|
15
|
16
|
FROM stl_mgnt_base_info A
|
16
|
17
|
INNER JOIN store_base_info B ON A.brand_id = B.brand_id AND A.store_id = B.store_id
|