From c92c06cdd4749eccb70639637c4b90d6aac3589a Mon Sep 17 00:00:00 2001 From: wahyu Date: Fri, 22 Sep 2023 14:04:36 +0700 Subject: [PATCH] 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." ) ) : (