From 719e4e0c9207bc16473c2c1575783becfdef0a6c Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Wed, 19 Oct 2022 14:23:42 +0700 Subject: [PATCH] financial --- src/views/Dashboard/DashboardProject.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index 2e43a7c..cb9b5ac 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -98,10 +98,9 @@ const DashboardProject = () => { useEffect(() => { let deviation = 0; if(plannedCost && totalCost){ - console.log("QQQ", [plannedCost, totalCost]); deviation = plannedCost - totalCost; } - setRemToComplete(deviation) + setRemToComplete(deviation.toString()) }, [plannedCost, totalCost]); @@ -597,10 +596,10 @@ const DashboardProject = () => { Cost Deviation - {/* {isReadyProjectDetail && isReadyIntegrationInvoice ? */} - {/* totalCost > plannedCost ? renderFormatRupiah(totalCost-plannedCost, 'Rp.') : 'Rp. 0' */} - {/* : */} - {/* } */} + {isReadyProjectDetail && isReadyIntegrationInvoice ? + totalCost > plannedCost ? renderFormatRupiah( (totalCost-plannedCost).toString(), 'Rp.') : 'Rp. 0' + : + }