|
@@ -8,10 +8,15 @@
|
8
|
8
|
SELECT A.brand_id, FN_BRAND_NM(A.brand_id) AS brand_nm,
|
9
|
9
|
C.store_id, FN_STORE_NM(A.brand_id, C.store_id) AS store_nm,
|
10
|
10
|
A.whs_id, C.whs_nm, A.location, D.location_nm, A.item_id, E.item_nm, E.unit, A.stck_qty,
|
|
11
|
+ /*
|
11
|
12
|
case when #{sStoreId} is null or #{sStoreId} = '' then A.prp_stck_qty else 0 end as prp_stck_qty,
|
12
|
13
|
case when #{sStoreId} is null or #{sStoreId} = '' then A.sft_stck_rt else 0 end as sft_stck_rt,
|
13
|
14
|
case when #{sStoreId} is null or #{sStoreId} = '' then (CASE WHEN A.PRP_STCK_QTY > 0 THEN A.STCK_QTY / A.PRP_STCK_QTY * 100 ELSE 0 END)
|
14
|
15
|
else 0 end AS cur_stck_rt
|
|
16
|
+ */
|
|
17
|
+ A.PRP_STCK_QTY as prp_stck_qty,
|
|
18
|
+ A.SFT_STCK_RT as sft_stck_rt,
|
|
19
|
+ CASE WHEN A.PRP_STCK_QTY > 0 THEN A.STCK_QTY / A.PRP_STCK_QTY * 100 ELSE 0 END AS cur_stck_rt
|
15
|
20
|
/* , A.cur_stck_rt */
|
16
|
21
|
FROM stck_mgnt_base_info A
|
17
|
22
|
INNER JOIN whs_mgnt_base_info C ON A.brand_id = C.brand_id AND A.whs_id = C.whs_id
|