From 9903796b7e1471f6285c9884fadfda9becc890e6 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Mon, 7 Jul 2025 13:47:48 +0700 Subject: bf deadstock data --- calculate_no_sales_stock.ktr | 133 ++++++++++++-------------------------- update_list_deadstock_opening.ktr | 94 +++++++++++++-------------- 2 files changed, 88 insertions(+), 139 deletions(-) diff --git a/calculate_no_sales_stock.ktr b/calculate_no_sales_stock.ktr index 37943d8..17f3076 100644 --- a/calculate_no_sales_stock.ktr +++ b/calculate_no_sales_stock.ktr @@ -725,6 +725,47 @@ Y + + Calculator 2 + Calculator + + Y + + 1 + + none + + + Y + + new_qty + SUBTRACT + qty + qty_outgoing + + None + -1 + -1 + N + + + + + + + + + + + + + + + 736 + 368 + Y + + Filter rows FilterRows @@ -1023,39 +1064,30 @@ product_id - item_code - product_name - brand - qty - date_added - in_deadstock - in_movement - qty_outgoing - N @@ -1087,39 +1119,30 @@ product_id - item_code - product_name - brand - qty - date_added - in_deadstock - in_movement - qty_outgoing - N @@ -1151,51 +1174,39 @@ product_id - item_code - product_name - brand - qty - date_added - in_deadstock - in_movement - product_id_1 - last_in - aging - qty_outgoing - N @@ -1227,51 +1238,39 @@ product_id - item_code - product_name - brand - qty - date_added - in_deadstock - in_movement - product_id_1 - last_in - aging - qty_outgoing - N @@ -1303,19 +1302,15 @@ product_id - item_code - product_name - brand - new_qty @@ -1323,23 +1318,18 @@ date_added - last_in - aging - last_cost - total_cost - N @@ -2259,47 +2249,6 @@ order by sq.product_id Y - - Calculator 2 - Calculator - - Y - - 1 - - none - - - Y - - new_qty - SUBTRACT - qty - qty_outgoing - - None - -1 - -1 - N - - - - - - - - - - - - - - - 736 - 368 - Y - - diff --git a/update_list_deadstock_opening.ktr b/update_list_deadstock_opening.ktr index 55f9883..4c8125f 100644 --- a/update_list_deadstock_opening.ktr +++ b/update_list_deadstock_opening.ktr @@ -593,10 +593,10 @@ Y - new_total_value - MULTIPLY + new_qty_available + SUBTRACT qty - value + qty_outgoing None -1 @@ -608,10 +608,10 @@ - new_qty_available - SUBTRACT - qty - qty_outgoing + new_total_value + MULTIPLY + new_qty_available + value None -1 @@ -694,6 +694,46 @@ Y + + If field value is null 2 + IfNull + + Y + + 1 + + none + + + 0 + + Y + N + N + + + + + new_qty_available + 0 + + N + + + + + + + + + + + + 656 + 304 + Y + + Merge join MergeJoin @@ -1206,46 +1246,6 @@ 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