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
+6
View File
@@ -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