Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -61,9 +61,11 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
cari8: masterKey,
|
||||
cari_detay: String(row?.cari_detay || '').trim(),
|
||||
satir_sayisi: 0,
|
||||
toplam_tutar: 0,
|
||||
toplam_usd: 0,
|
||||
normal_usd: 0,
|
||||
acik_kalem_usd: 0,
|
||||
kur: 0,
|
||||
weighted_gun_sum: 0,
|
||||
weighted_gun_doc_sum: 0,
|
||||
weighted_base: 0,
|
||||
@@ -84,6 +86,7 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
toplam_usd: 0,
|
||||
normal_tutar: 0,
|
||||
acik_kalem_tutar: 0,
|
||||
kur: 0,
|
||||
weighted_gun_sum: 0,
|
||||
weighted_gun_doc_sum: 0,
|
||||
weighted_base: 0,
|
||||
@@ -96,6 +99,7 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
const c = currencyMap[currencyKey]
|
||||
|
||||
m.satir_sayisi += 1
|
||||
m.toplam_tutar += tutar
|
||||
m.toplam_usd += usd
|
||||
if (aciklama === 'ACIKKALEM') {
|
||||
m.acik_kalem_usd += usd
|
||||
@@ -129,6 +133,7 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
this.masterRows = Object.values(masterMap)
|
||||
.map((m) => ({
|
||||
...m,
|
||||
kur: Math.abs(m.toplam_usd) > 0 ? (m.toplam_tutar / m.toplam_usd) : 0,
|
||||
ortalama_gun: m.weighted_base > 0 ? (m.weighted_gun_sum / m.weighted_base) : 0,
|
||||
ortalama_gun_docdate: m.weighted_base > 0 ? (m.weighted_gun_doc_sum / m.weighted_base) : 0
|
||||
}))
|
||||
@@ -138,6 +143,7 @@ export const useStatementAgingStore = defineStore('statementAging', {
|
||||
for (const c of Object.values(currencyMap)) {
|
||||
const row = {
|
||||
...c,
|
||||
kur: Math.abs(c.toplam_usd) > 0 ? (c.toplam_tutar / c.toplam_usd) : 0,
|
||||
ortalama_gun: c.weighted_base > 0 ? (c.weighted_gun_sum / c.weighted_base) : 0,
|
||||
ortalama_gun_docdate: c.weighted_base > 0 ? (c.weighted_gun_doc_sum / c.weighted_base) : 0
|
||||
}
|
||||
@@ -187,6 +193,7 @@ function normalizeRowKeys(row) {
|
||||
usd_tutar: Number(row.UsdTutar ?? row.usd_tutar ?? 0),
|
||||
gun_sayisi: Number(row.GunSayisi ?? row.gun_sayisi ?? 0),
|
||||
gun_sayisi_docdate: Number(row.GunSayisi_DocDate ?? row.gun_sayisi_docdate ?? 0),
|
||||
currency_try_rate: Number(row.CurrencyTryRate ?? row.currency_try_rate ?? 0),
|
||||
aciklama: row.Aciklama ?? row.aciklama ?? null,
|
||||
doc_currency_code: row.DocCurrencyCode ?? row.doc_currency_code ?? null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user