From c92c06cdd4749eccb70639637c4b90d6aac3589a Mon Sep 17 00:00:00 2001 From: wahyu Date: Fri, 22 Sep 2023 14:04:36 +0700 Subject: [PATCH 1/2] fix finance --- src/views/Dashboard/DashboardProject.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index cabac62..f4bc56c 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -1244,15 +1244,14 @@ const DashboardProject = () => { Est. at Completion - {isReadySCurve ? ( - plannedCost !== null && bcwp !== null ? ( - plannedCost > bcwp ? ( - renderFormatRupiah(plannedCost, "Rp.") - ) : ( - renderFormatRupiah(bcwp, "Rp.") + {isReadyProjectDetail && isReadyGantt ? ( + plannedCost && dataGantt.data.data.cost_to_complete ? ( + renderFormatRupiah( + (parseInt(plannedCost) + dataGantt.data.data.cost_to_complete).toString(), + "Rp." ) ) : ( - "-" + "Rp. 0" ) ) : ( @@ -1292,10 +1291,10 @@ const DashboardProject = () => { Cost Deviation - {isReadyProjectDetail && isReadyIntegrationInvoice ? ( - totalCost > plannedCost ? ( + {isReadyProjectDetail && isReadyGantt ? ( + dataGantt.data.data.cost_to_complete ? ( renderFormatRupiah( - (totalCost - plannedCost).toString(), + (dataGantt.data.data.cost_to_complete).toString(), "Rp." ) ) : ( From 320b0554c7f9545e5c4b84f440a4e5976b96896c Mon Sep 17 00:00:00 2001 From: wahyu Date: Tue, 3 Oct 2023 11:28:54 +0700 Subject: [PATCH 2/2] fix dashboard project --- src/views/Dashboard/DashboardProject.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index f4bc56c..ebc5bfd 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -1245,13 +1245,16 @@ const DashboardProject = () => { {isReadyProjectDetail && isReadyGantt ? ( - plannedCost && dataGantt.data.data.cost_to_complete ? ( + dataGantt.data.data.cost_to_complete ? ( renderFormatRupiah( (parseInt(plannedCost) + dataGantt.data.data.cost_to_complete).toString(), "Rp." ) ) : ( - "Rp. 0" + renderFormatRupiah( + parseInt(plannedCost).toString(), + "Rp." + ) ) ) : (