Fix product performance grouped JSON build
This commit is contained in:
@@ -2701,7 +2701,7 @@ function normalizeDetailRows (items, groupName = '') {
|
|||||||
// Use fiyat_girilen which is the unit price in original currency.
|
// Use fiyat_girilen which is the unit price in original currency.
|
||||||
inputPrice: x?.inputPrice ?? normalizeInputPrice(x?.fiyat_girilen),
|
inputPrice: x?.inputPrice ?? normalizeInputPrice(x?.fiyat_girilen),
|
||||||
inputPricePrBr: originalCurrency,
|
inputPricePrBr: originalCurrency,
|
||||||
maliyeteDahil: x?.maliyeteDahil ?? normalizeBooleanFlag(x?.maliyete_dahil ?? x?.Maliyete_dahil),
|
maliyeteDahil: normalizeBooleanFlag(x?.maliyeteDahil ?? x?.maliyete_dahil ?? x?.Maliyete_dahil),
|
||||||
cmPriceTypeId: normalizeCMPriceTypeId(x?.cmPriceTypeId ?? x?.cm_price_type_id, groupName || x?.sAciklama3),
|
cmPriceTypeId: normalizeCMPriceTypeId(x?.cmPriceTypeId ?? x?.cm_price_type_id, groupName || x?.sAciklama3),
|
||||||
draftChanged: Boolean(x?.draftChanged),
|
draftChanged: Boolean(x?.draftChanged),
|
||||||
priceUpdateState: String(x?.priceUpdateState || '').trim()
|
priceUpdateState: String(x?.priceUpdateState || '').trim()
|
||||||
@@ -2884,8 +2884,7 @@ function shouldIncludeRowInGroupTotal (grp, row) {
|
|||||||
// CM1/CM2 sub-headers always show their full group value. For every other
|
// CM1/CM2 sub-headers always show their full group value. For every other
|
||||||
// group, the explicit "Maliyete Dahil" selection controls the subtotal.
|
// group, the explicit "Maliyete Dahil" selection controls the subtotal.
|
||||||
if (isCMGroupName(grp?.sAciklama3 || row?.sAciklama3)) return true
|
if (isCMGroupName(grp?.sAciklama3 || row?.sAciklama3)) return true
|
||||||
if (typeof row?.maliyeteDahil === 'boolean') return row.maliyeteDahil
|
return normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil)
|
||||||
return normalizeBooleanFlag(row?.maliyete_dahil ?? row?.Maliyete_dahil)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveGroupTRYTutar (grp, _revision) {
|
function resolveGroupTRYTutar (grp, _revision) {
|
||||||
|
|||||||
Reference in New Issue
Block a user