From e0baab61816dcc3309ebcfb574f01b3dcee65cce Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Sat, 5 Jul 2025 10:05:51 +0700 Subject: update combine deadstock --- update_list_deadstock_opening.ktr | 93 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 5 deletions(-) (limited to 'update_list_deadstock_opening.ktr') diff --git a/update_list_deadstock_opening.ktr b/update_list_deadstock_opening.ktr index 354b1d8..55f9883 100644 --- a/update_list_deadstock_opening.ktr +++ b/update_list_deadstock_opening.ktr @@ -571,6 +571,11 @@ Calculator + If field value is null 2 + Y + + + If field value is null 2 Update Y @@ -602,6 +607,21 @@ + + new_qty_available + SUBTRACT + qty + qty_outgoing + + None + -1 + -1 + N + + + + + @@ -957,7 +977,7 @@ order by product_id qty_available_current - qty + new_qty_available brand @@ -977,7 +997,7 @@ order by product_id - 640 + 816 304 Y @@ -1022,7 +1042,7 @@ order by pp.id product_id 9 0 - Table input 2 + avg hpp product_id ####0;-####0 . @@ -1045,7 +1065,7 @@ order by pp.id last_cost -1 -1 - Table input 2 + avg hpp last_cost ######0.0###################;-######0.0################### . @@ -1089,7 +1109,7 @@ order by pp.id erp indoteknik production (localhost) - select sq.product_id, sum(quantity) as qty + select sq.product_id, sum(quantity) as qty, get_qty_outgoing(sq.product_id) as qty_outgoing from stock_quant sq join stock_location sl on sl.id = sq.location_id where sq.location_id in(select id from stock_location where usage = 'internal' and active = true) @@ -1148,6 +1168,29 @@ order by sq.product_id Asia/Bangkok N + + BigNumber + normal + qty_outgoing + -1 + -1 + current qty + qty_outgoing + ######0.0###################;-######0.0################### + . + + + none + N + Y + 0 + N + N + N + en_US + Asia/Bangkok + N + @@ -1163,6 +1206,46 @@ order by sq.product_id Y + + If field value is null 2 + IfNull + + Y + + 1 + + none + + + 0 + + Y + N + N + + + + + new_qty_available + 0 + + N + + + + + + + + + + + + 656 + 304 + Y + + -- cgit v1.2.3