From b79570d01a156b05b91e6564adb8f6dc0730eabe Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Sat, 2 Aug 2025 11:45:40 +0700 Subject: update aging info for 365 days before now --- update_aging_info.ktr | 302 +++++++++++++++++++++++++------------------------- 1 file changed, 149 insertions(+), 153 deletions(-) diff --git a/update_aging_info.ktr b/update_aging_info.ktr index a83a169..46a8336 100644 --- a/update_aging_info.ktr +++ b/update_aging_info.ktr @@ -436,14 +436,14 @@ - dw bi indoteknik + dw bi indoteknik (localhost) localhost POSTGRESQL Native dw_bi_indoteknik - 5703 - metabase - Encrypted 2be98dfba28d7bf86853c9f58cfc4f889 + 5432 + odoo + Encrypted 2be98afc82bdfd8dd9a2ca45acc83f6c3 @@ -462,7 +462,7 @@ PORT_NUMBER - 5703 + 5432 PRESERVE_RESERVED_WORD_CASE @@ -478,7 +478,7 @@ SUPPORTS_TIMESTAMP_DATA_TYPE - Y + N USE_POOLING @@ -487,14 +487,14 @@ - erp indoteknik production - localhost + erp indoteknik production (localhost) + 10.148.0.3 POSTGRESQL Native erp_indoteknik - 5901 - odoo - Encrypted 2be98afc82bdfd8dd9a2ca45acc83f6c3 + 5432 + pdi + Encrypted 2be989bb20084ca95810197629d9ea18e @@ -513,7 +513,7 @@ PORT_NUMBER - 5901 + 5432 PRESERVE_RESERVED_WORD_CASE @@ -529,7 +529,7 @@ SUPPORTS_TIMESTAMP_DATA_TYPE - Y + N USE_POOLING @@ -559,6 +559,140 @@ Y + + If field value is null + IfNull + + Y + + 1 + + none + + + + + Y + N + N + + + + + aging + 0 + + N + + + + + + + + + + + + 304 + 112 + Y + + + + Modified JavaScript value + ScriptValueMod + + Y + + 1 + + none + + + N + 9 + + + 0 + Script 1 + var result = ''; + +if (aging <= 5) { + result = 'normal'; +} else if (aging > 5 && aging <= 10) { + result = 'agak_sulit'; +} else if (aging > 10 && aging <= 20) { + result = 'sulit'; +} else { + result = 'bermasalah'; +} + + + + + result + result + String + -1 + -1 + N + + + + + + + + + + + + 496 + 112 + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + + partner_id + + + aging + + + url_bi + + + result + + N + + + + + + + + + + + 496 + 224 + Y + + Table input TableInput @@ -570,7 +704,7 @@ none - dw bi indoteknik + dw bi indoteknik (localhost) select partner_id, round(avg(aging::numeric),2) as aging, 'https://analytic.indoteknik.com/dashboard/140-customer-aging?date=past12months&partner_id='||partner_id as url_bi from mv_aging_customer @@ -678,7 +812,7 @@ group by partner_id none - erp indoteknik production + erp indoteknik production (localhost) N 100 N @@ -720,144 +854,6 @@ group by partner_id Y - - Modified JavaScript value - ScriptValueMod - - Y - - 1 - - none - - - N - 9 - - - 0 - Script 1 - var result = ''; - -if (aging <= 5) { - result = 'normal'; -} else if (aging > 5 && aging <= 10) { - result = 'agak_sulit'; -} else if (aging > 10 && aging <= 20) { - result = 'sulit'; -} else { - result = 'bermasalah'; -} - - - - - result - result - String - -1 - -1 - N - - - - - - - - - - - - 496 - 112 - Y - - - - If field value is null - IfNull - - Y - - 1 - - none - - - - - Y - N - N - - - - - aging - 0 - - N - - - - - - - - - - - - 304 - 112 - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - - partner_id - - - - aging - - - - url_bi - - - - result - - - N - - - - - - - - - - - 496 - 224 - Y - - -- cgit v1.2.3