Fix product performance grouped JSON build
This commit is contained in:
Generated
+1
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="GoModuleSettings" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
||||
@@ -1427,6 +1427,12 @@ func postProductionProductCostingOnMLSaveHandler(w http.ResponseWriter, r *http.
|
||||
totalUSD := 0.0
|
||||
totalEUR := 0.0
|
||||
for _, r := range req.Detail.Upserts {
|
||||
// The top header in the detail screen only includes rows marked
|
||||
// "Maliyete Dahil". Persist that exact business total to the master
|
||||
// record as well; excluded detail rows must not inflate the cost.
|
||||
if r.MaliyeteDahil != 1 {
|
||||
continue
|
||||
}
|
||||
qty := r.LMiktar
|
||||
if qty < 0 {
|
||||
qty = 0
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user