fix
This commit is contained in:
@@ -161,10 +161,9 @@ function normalizeTransactionListReport(report) {
|
||||
const colIndex = {};
|
||||
columns.forEach((c, i) => {
|
||||
if (c.ColTitle) colIndex[c.ColTitle.toLowerCase()] = i;
|
||||
if (c.ColType) colIndex[c.ColType.toLowerCase()] = i; // Fallback, falls vorhanden
|
||||
if (c.ColType) colIndex[c.ColType.toLowerCase()] = i;
|
||||
});
|
||||
|
||||
// Resolver: probiert mehrere mögliche Titel/Typen
|
||||
const resolve = (...candidates) => {
|
||||
for (const k of candidates) {
|
||||
const idx = colIndex[k.toLowerCase()];
|
||||
@@ -180,6 +179,7 @@ function normalizeTransactionListReport(report) {
|
||||
const idxAccount = resolve('Account', 'account_name');
|
||||
const idxMemo = resolve('Memo/Description', 'Memo', 'memo');
|
||||
const idxSplit = resolve('Split', 'split_acc');
|
||||
const idxAmount = resolve('Amount', 'subt_nat_amount', 'subt_nat_home_amount');
|
||||
const idxCleared = resolve('Cleared', 'cleared_status', 'clr');
|
||||
|
||||
const cellAt = (colData, idx) => {
|
||||
@@ -216,8 +216,6 @@ function normalizeTransactionListReport(report) {
|
||||
(typeCell && typeCell.id) ||
|
||||
null;
|
||||
|
||||
// ── NEU: Cleared-Status normalisieren ──
|
||||
// QBO liefert "R" (reconciled), "C" (cleared) oder leer (uncleared)
|
||||
let clearedStatus = null;
|
||||
if (clrCell && clrCell.value) {
|
||||
const v = String(clrCell.value).trim().toUpperCase();
|
||||
|
||||
Reference in New Issue
Block a user