Fix product performance grouped JSON build
This commit is contained in:
@@ -2891,8 +2891,9 @@ function syncGroupTotals () {
|
|||||||
groupTotals.value = detailGroups.value.map(group => (
|
groupTotals.value = detailGroups.value.map(group => (
|
||||||
(Array.isArray(group?.items) ? group.items : []).reduce((acc, row) => {
|
(Array.isArray(group?.items) ? group.items : []).reduce((acc, row) => {
|
||||||
if (!shouldIncludeRowInGroupTotal(group, row)) return acc
|
if (!shouldIncludeRowInGroupTotal(group, row)) return acc
|
||||||
acc.tryTotal += resolveRowTRYTutar(row)
|
// Sub-header must mirror the amounts already rendered in the row.
|
||||||
acc.usdTotal += resolveRowUSDTutar(row)
|
acc.tryTotal += parseMoneyInput(row?.lTutar)
|
||||||
|
acc.usdTotal += parseMoneyInput(row?.usdTutar ?? row?.lTutarUSD)
|
||||||
acc.quantity += resolveNumericRowQuantity(row)
|
acc.quantity += resolveNumericRowQuantity(row)
|
||||||
return acc
|
return acc
|
||||||
}, { tryTotal: 0, usdTotal: 0, quantity: 0 })
|
}, { tryTotal: 0, usdTotal: 0, quantity: 0 })
|
||||||
@@ -3278,6 +3279,9 @@ function onRowQuantityInput (row, value) {
|
|||||||
|
|
||||||
function triggerUIUpdate () {
|
function triggerUIUpdate () {
|
||||||
syncGroupTotals()
|
syncGroupTotals()
|
||||||
|
nextTick(() => {
|
||||||
|
syncGroupTotals()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function normalizeRowQuantityDisplay (row) {
|
function normalizeRowQuantityDisplay (row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user