Fix product performance grouped JSON build

This commit is contained in:
M_Kececi
2026-08-18 12:45:11 +03:00
parent 7a7008cc1b
commit 9edc806345
3 changed files with 12 additions and 7 deletions
@@ -1558,7 +1558,7 @@ function ensureBeforeUnloadGuard (enabled) {
}
}
const toolbarSummary = computed(() => flatDetailRows.value.reduce((acc, row) => {
if (!row?.maliyeteDahil) return acc
if (!normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil)) return acc
acc.tryTotal += resolveRowTRYTutar(row)
acc.usdTotal += resolveRowUSDTutar(row)
acc.eurTotal += resolveRowEURTutar(row)
@@ -2848,12 +2848,10 @@ function resolveRowUSDTutar (row) {
return Number.isFinite(calc) ? calc : 0
}
function shouldIgnoreGroupMaliyeteDahil (grp) {
return isCMGroupName(grp?.sAciklama3)
}
function shouldIncludeRowInGroupTotal (grp, row) {
return shouldIgnoreGroupMaliyeteDahil(grp) || normalizeBooleanFlag(row?.maliyeteDahil)
function shouldIncludeRowInGroupTotal (_grp, row) {
// Keep sub-header totals aligned with the top header and the value persisted
// to spUrtOnMLMas: only rows explicitly included in costing contribute.
return normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil)
}
function resolveGroupTRYTutar (grp) {