IO-3001 Null Coalesce for some items for better handling.

This commit is contained in:
Patrick Fic
2024-11-22 09:18:09 -08:00
parent ec5258a431
commit 11ab7cd67e
2 changed files with 10 additions and 10 deletions

View File

@@ -850,7 +850,7 @@ function GenerateCostingData(job) {
});
}
//Push adjustments to bottom line.
if (job.job_totals.totals.ttl_adjustment) {
if (job.job_totals?.totals?.ttl_adjustment) {
//Add to totals.
const Adjustment = Dinero(job.job_totals.totals.ttl_adjustment); //Need to invert, since this is being assigned as a cost.
summaryData.totalAdditionalSales = summaryData.totalAdditionalSales.add(Adjustment);