From 89df3d2d3d7142fa957aed7a2c4cbb855d795d93 Mon Sep 17 00:00:00 2001 From: M_Kececi Date: Tue, 18 Aug 2026 18:44:07 +0300 Subject: [PATCH] Fix product performance grouped JSON build --- svc/routes/production_product_costing.go | 4 +- .../ProductionProductCostingHasCostDetail.vue | 62 +++++++++++++++---- 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/svc/routes/production_product_costing.go b/svc/routes/production_product_costing.go index 349d682..1626b87 100644 --- a/svc/routes/production_product_costing.go +++ b/svc/routes/production_product_costing.go @@ -1430,9 +1430,7 @@ 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. - groupName := strings.ToUpper(strings.TrimSpace(r.SAciklama3)) - isCMLaborGroup := strings.Contains(groupName, "CM1") || strings.Contains(groupName, "CM2") - if r.MaliyeteDahil != 1 && !isCMLaborGroup { + if r.MaliyeteDahil != 1 { continue } qty := r.LMiktar diff --git a/ui/src/pages/ProductionProductCostingHasCostDetail.vue b/ui/src/pages/ProductionProductCostingHasCostDetail.vue index 9a94b23..9ce3d1d 100644 --- a/ui/src/pages/ProductionProductCostingHasCostDetail.vue +++ b/ui/src/pages/ProductionProductCostingHasCostDetail.vue @@ -1558,10 +1558,9 @@ function ensureBeforeUnloadGuard (enabled) { } } function shouldIncludeRowInCostingTotal (row) { - // CM1/CM2 are labor-cost groups and always contribute to costing. For all - // other groups the explicit "Maliyete Dahil" selection is authoritative. - return isCMGroupName(row?.sAciklama3) || - normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil) + // The explicit "Maliyete Dahil" selection is authoritative for the top + // header and the amount persisted to spUrtOnMLMas, including CM rows. + return normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil) } const toolbarSummary = computed(() => flatDetailRows.value.reduce((acc, row) => { @@ -2856,7 +2855,9 @@ function resolveRowUSDTutar (row) { } function shouldIncludeRowInGroupTotal (_grp, row) { - return shouldIncludeRowInCostingTotal(row) + // Sub-headers show the gross amount entered in that group. Inclusion in the + // actual costing is shown separately by the page header and checkbox. + return Boolean(row) } function resolveGroupTRYTutar (grp) { @@ -5621,20 +5622,48 @@ watch( } .pcd-detail-table :deep(.q-table__middle) { - overflow: visible !important; + overflow-x: hidden !important; + width: 100% !important; + max-width: 100% !important; } .pcd-detail-table :deep(.q-table) { - table-layout: fixed; - width: 100%; + table-layout: fixed !important; + width: 100% !important; + min-width: 0 !important; } .pcd-detail-table :deep(.q-table th), .pcd-detail-table :deep(.q-table td) { overflow: hidden; text-overflow: ellipsis; + min-width: 0 !important; } +/* Fit every detail column into one desktop viewport. These percentages also + override the old pixel widths carried by a few editable columns. */ +.pcd-detail-table :deep(.q-table th:nth-child(1)), .pcd-detail-table :deep(.q-table td:nth-child(1)) { width: 3.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(2)), .pcd-detail-table :deep(.q-table td:nth-child(2)) { width: 3% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(3)), .pcd-detail-table :deep(.q-table td:nth-child(3)) { width: 5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(4)), .pcd-detail-table :deep(.q-table td:nth-child(4)) { width: 7% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(5)), .pcd-detail-table :deep(.q-table td:nth-child(5)) { width: 6% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(6)), .pcd-detail-table :deep(.q-table td:nth-child(6)) { width: 8% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(7)), .pcd-detail-table :deep(.q-table td:nth-child(7)) { width: 4.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(8)), .pcd-detail-table :deep(.q-table td:nth-child(8)) { width: 4.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(9)), .pcd-detail-table :deep(.q-table td:nth-child(9)) { width: 5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(10)), .pcd-detail-table :deep(.q-table td:nth-child(10)) { width: 4% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(11)), .pcd-detail-table :deep(.q-table td:nth-child(11)) { width: 3.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(12)), .pcd-detail-table :deep(.q-table td:nth-child(12)) { width: 3% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(13)), .pcd-detail-table :deep(.q-table td:nth-child(13)) { width: 5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(14)), .pcd-detail-table :deep(.q-table td:nth-child(14)) { width: 5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(15)), .pcd-detail-table :deep(.q-table td:nth-child(15)) { width: 4% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(16)), .pcd-detail-table :deep(.q-table td:nth-child(16)) { width: 3.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(17)), .pcd-detail-table :deep(.q-table td:nth-child(17)) { width: 4.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(18)), .pcd-detail-table :deep(.q-table td:nth-child(18)) { width: 5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(19)), .pcd-detail-table :deep(.q-table td:nth-child(19)) { width: 4.5% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(20)), .pcd-detail-table :deep(.q-table td:nth-child(20)) { width: 6% !important; } +.pcd-detail-table :deep(.q-table th:nth-child(21)), .pcd-detail-table :deep(.q-table td:nth-child(21)) { width: 3% !important; } + .pcd-detail-table :deep(.q-table tbody td) { white-space: normal; word-break: break-word; @@ -5653,8 +5682,8 @@ watch( } .pcd-detail-table :deep(.q-table thead th) { - font-size: 11px; - padding: 3px 4px; + font-size: 9px; + padding: 2px 2px; white-space: normal; line-height: 1.2; vertical-align: bottom; @@ -5662,8 +5691,8 @@ watch( } .pcd-detail-table :deep(.q-table tbody td) { - font-size: 11px; - padding: 2px 4px; + font-size: 9.5px; + padding: 1px 2px; } .pcd-detail-table :deep(.q-table tbody tr) { @@ -5719,6 +5748,15 @@ watch( .pcd-detail-table :deep(.pcd-inline-input .q-field__control) { min-height: 30px; + min-width: 0 !important; + width: 100% !important; +} + +.pcd-detail-table :deep(.pcd-inline-input), +.pcd-detail-table :deep(.pcd-inline-input .q-field__inner), +.pcd-detail-table :deep(.pcd-inline-input .q-field__control-container) { + min-width: 0 !important; + width: 100% !important; } .pcd-detail-table :deep(.pcd-inline-input .q-field__native),