Fix product performance grouped JSON build

This commit is contained in:
M_Kececi
2026-08-18 18:44:26 +03:00
parent 474904481f
commit 89df3d2d3d
2 changed files with 51 additions and 15 deletions
+1 -3
View File
@@ -1430,9 +1430,7 @@ func postProductionProductCostingOnMLSaveHandler(w http.ResponseWriter, r *http.
// The top header in the detail screen only includes rows marked // The top header in the detail screen only includes rows marked
// "Maliyete Dahil". Persist that exact business total to the master // "Maliyete Dahil". Persist that exact business total to the master
// record as well; excluded detail rows must not inflate the cost. // record as well; excluded detail rows must not inflate the cost.
groupName := strings.ToUpper(strings.TrimSpace(r.SAciklama3)) if r.MaliyeteDahil != 1 {
isCMLaborGroup := strings.Contains(groupName, "CM1") || strings.Contains(groupName, "CM2")
if r.MaliyeteDahil != 1 && !isCMLaborGroup {
continue continue
} }
qty := r.LMiktar qty := r.LMiktar
@@ -1558,10 +1558,9 @@ function ensureBeforeUnloadGuard (enabled) {
} }
} }
function shouldIncludeRowInCostingTotal (row) { function shouldIncludeRowInCostingTotal (row) {
// CM1/CM2 are labor-cost groups and always contribute to costing. For all // The explicit "Maliyete Dahil" selection is authoritative for the top
// other groups the explicit "Maliyete Dahil" selection is authoritative. // header and the amount persisted to spUrtOnMLMas, including CM rows.
return isCMGroupName(row?.sAciklama3) || return normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil)
normalizeBooleanFlag(row?.maliyeteDahil ?? row?.maliyete_dahil ?? row?.Maliyete_dahil)
} }
const toolbarSummary = computed(() => flatDetailRows.value.reduce((acc, row) => { const toolbarSummary = computed(() => flatDetailRows.value.reduce((acc, row) => {
@@ -2856,7 +2855,9 @@ function resolveRowUSDTutar (row) {
} }
function shouldIncludeRowInGroupTotal (_grp, 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) { function resolveGroupTRYTutar (grp) {
@@ -5621,20 +5622,48 @@ watch(
} }
.pcd-detail-table :deep(.q-table__middle) { .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) { .pcd-detail-table :deep(.q-table) {
table-layout: fixed; table-layout: fixed !important;
width: 100%; width: 100% !important;
min-width: 0 !important;
} }
.pcd-detail-table :deep(.q-table th), .pcd-detail-table :deep(.q-table th),
.pcd-detail-table :deep(.q-table td) { .pcd-detail-table :deep(.q-table td) {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; 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) { .pcd-detail-table :deep(.q-table tbody td) {
white-space: normal; white-space: normal;
word-break: break-word; word-break: break-word;
@@ -5653,8 +5682,8 @@ watch(
} }
.pcd-detail-table :deep(.q-table thead th) { .pcd-detail-table :deep(.q-table thead th) {
font-size: 11px; font-size: 9px;
padding: 3px 4px; padding: 2px 2px;
white-space: normal; white-space: normal;
line-height: 1.2; line-height: 1.2;
vertical-align: bottom; vertical-align: bottom;
@@ -5662,8 +5691,8 @@ watch(
} }
.pcd-detail-table :deep(.q-table tbody td) { .pcd-detail-table :deep(.q-table tbody td) {
font-size: 11px; font-size: 9.5px;
padding: 2px 4px; padding: 1px 2px;
} }
.pcd-detail-table :deep(.q-table tbody tr) { .pcd-detail-table :deep(.q-table tbody tr) {
@@ -5719,6 +5748,15 @@ watch(
.pcd-detail-table :deep(.pcd-inline-input .q-field__control) { .pcd-detail-table :deep(.pcd-inline-input .q-field__control) {
min-height: 30px; 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), .pcd-detail-table :deep(.pcd-inline-input .q-field__native),