Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -616,7 +616,7 @@ function formatAmount(value, fraction = 2) {
|
||||
|
||||
.detail-subtable :deep(thead th) {
|
||||
position: sticky;
|
||||
top: 108px;
|
||||
top: 72px;
|
||||
z-index: 22;
|
||||
background: #1f3b5b;
|
||||
color: #fff;
|
||||
|
||||
@@ -174,6 +174,26 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
currencyByMaster[key].sort((a, b) => String(a.doc_currency_code).localeCompare(String(b.doc_currency_code), 'en', { sensitivity: 'base' }))
|
||||
}
|
||||
|
||||
for (const key of Object.keys(detailMap)) {
|
||||
detailMap[key].sort((a, b) => {
|
||||
const aOpen = isAcikKalem(a?.aciklama)
|
||||
const bOpen = isAcikKalem(b?.aciklama)
|
||||
if (aOpen !== bOpen) {
|
||||
return aOpen ? -1 : 1
|
||||
}
|
||||
|
||||
const aDate = toSortableDate(a)
|
||||
const bDate = toSortableDate(b)
|
||||
if (aDate !== bDate) {
|
||||
return bDate - aDate
|
||||
}
|
||||
|
||||
const aRef = String(a?.fatura_ref || '')
|
||||
const bRef = String(b?.fatura_ref || '')
|
||||
return aRef.localeCompare(bRef, 'tr', { sensitivity: 'base' })
|
||||
})
|
||||
}
|
||||
|
||||
this.currencyRowsByMaster = currencyByMaster
|
||||
this.detailByCurrency = detailMap
|
||||
},
|
||||
@@ -219,3 +239,13 @@ function normalizeRowKeys(row) {
|
||||
doc_currency_code: row.DocCurrencyCode ?? row.doc_currency_code ?? null
|
||||
}
|
||||
}
|
||||
|
||||
function isAcikKalem(value) {
|
||||
return String(value || '').trim().toUpperCase() === 'ACIKKALEM'
|
||||
}
|
||||
|
||||
function toSortableDate(row) {
|
||||
const raw = row?.odeme_doc_date || row?.odeme_tarihi || row?.fatura_tarihi || ''
|
||||
const t = Date.parse(String(raw || '').trim())
|
||||
return Number.isFinite(t) ? t : 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user