Fix product performance grouped JSON build

This commit is contained in:
M_Kececi
2026-08-18 13:38:32 +03:00
parent 6eaf0e3ed3
commit 474904481f
2 changed files with 20 additions and 9 deletions
+3 -1
View File
@@ -1430,7 +1430,9 @@ func postProductionProductCostingOnMLSaveHandler(w http.ResponseWriter, r *http.
// 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 {
groupName := strings.ToUpper(strings.TrimSpace(r.SAciklama3))
isCMLaborGroup := strings.Contains(groupName, "CM1") || strings.Contains(groupName, "CM2")
if r.MaliyeteDahil != 1 && !isCMLaborGroup {
continue
}
qty := r.LMiktar