Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-05-07 12:27:10 +03:00
parent 0eef44697b
commit a21e38f56f
5 changed files with 88 additions and 0 deletions

View File

@@ -456,6 +456,30 @@ const columns = [
{ name: 'OldDesc', label: 'Eski Aciklama', field: 'OldDesc', align: 'left', sortable: false, style: 'min-width:130px;', headerStyle: 'min-width:130px;', headerClasses: 'col-old col-desc', classes: 'col-old col-desc' },
{ name: 'OldSizes', label: 'Bedenler', field: 'OldSizesLabel', align: 'left', sortable: false, style: 'min-width:90px;', headerStyle: 'min-width:90px;', headerClasses: 'col-old col-wrap', classes: 'col-old col-wrap' },
{ name: 'OldTotalQty', label: 'Siparis Adedi', field: 'OldTotalQtyLabel', align: 'right', sortable: false, style: 'min-width:90px;', headerStyle: 'min-width:90px;', headerClasses: 'col-old', classes: 'col-old' },
{
name: 'OldTotalAmount',
label: 'Tutar',
field: 'OldTotalAmount',
align: 'right',
sortable: true,
style: 'min-width:110px;white-space:nowrap',
headerStyle: 'min-width:110px;white-space:nowrap',
headerClasses: 'col-old',
classes: 'col-old',
format: (val, row) => `${Number(val || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} ${row?.OldDocCurrencyCode || ''}`.trim()
},
{
name: 'OldTotalAmountUSD',
label: 'Tutar (USD)',
field: 'OldTotalAmountUSD',
align: 'right',
sortable: true,
style: 'min-width:110px;white-space:nowrap',
headerStyle: 'min-width:110px;white-space:nowrap',
headerClasses: 'col-old',
classes: 'col-old',
format: val => `${Number(val || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2, maximumFractionDigits: 2 })} USD`
},
{ name: 'OldDueDate', label: 'Eski Termin', field: 'OldDueDate', align: 'left', sortable: true, style: 'min-width:100px;', headerStyle: 'min-width:100px;', headerClasses: 'col-old', classes: 'col-old' },
{ name: 'NewItemCode', label: 'Yeni Urun Kodu', field: 'NewItemCode', align: 'left', sortable: false, style: 'min-width:130px;', headerStyle: 'min-width:130px;', headerClasses: 'col-new col-new-first', classes: 'col-new col-new-first' },
{ name: 'NewColor', label: 'Yeni Urun Rengi', field: 'NewColor', align: 'left', sortable: false, style: 'min-width:100px;', headerStyle: 'min-width:100px;', headerClasses: 'col-new', classes: 'col-new' },
@@ -1735,6 +1759,9 @@ function groupItems (items, prevRows = []) {
OldSizesLabel: '',
OldTotalQty: 0,
OldTotalQtyLabel: '0',
OldDocCurrencyCode: String(it?.OldDocCurrencyCode || '').trim() || 'TRY',
OldTotalAmount: 0,
OldTotalAmountUSD: 0,
NewItemCode: prev.NewItemCode || '',
NewColor: prev.NewColor || '',
NewDim2: prev.NewDim2 || '',
@@ -1770,6 +1797,8 @@ function groupItems (items, prevRows = []) {
g.__sizeMap[size] = (g.__sizeMap[size] || 0) + 1
}
g.__oldQtyTotal = Number(g.__oldQtyTotal || 0) + Number(it?.OldQty || 0)
g.__oldAmountTotal = Number(g.__oldAmountTotal || 0) + Number(it?.OldNetAmount || 0)
g.__oldAmountUsdTotal = Number(g.__oldAmountUsdTotal || 0) + Number(it?.OldNetAmountUSD || 0)
if (it?.IsVariantMissing) g.IsVariantMissing = true
}
@@ -1780,6 +1809,8 @@ function groupItems (items, prevRows = []) {
g.OldSizesLabel = sizes.label
g.OldTotalQty = Number(g.__oldQtyTotal || 0)
g.OldTotalQtyLabel = formatQtyLabel(g.OldTotalQty)
g.OldTotalAmount = Number(g.__oldAmountTotal || 0)
g.OldTotalAmountUSD = Number(g.__oldAmountUsdTotal || 0)
const info = store.classifyItemCode(g.NewItemCode)
g.NewItemCode = info.normalized
g.NewItemMode = info.mode
@@ -1789,6 +1820,8 @@ function groupItems (items, prevRows = []) {
}
delete g.__sizeMap
delete g.__oldQtyTotal
delete g.__oldAmountTotal
delete g.__oldAmountUsdTotal
out.push(g)
}

View File

@@ -686,6 +686,8 @@ async function saveKeys (keys) {
clearDirty()
// after saving, clear save selection to avoid accidental re-save
saveSelectedKeyMap.value = {}
// after saving, also clear the search input so the sheet reloads unfiltered
filters.value.search = ''
await refreshAll()
} catch (e) {
const detail = await extractApiErrorDetail(e)