https://bugs.kde.org/show_bug.cgi?id=523929
Bug ID: 523929
Summary: Feature Request: Fallback to Purpose if Payee
(remoteName) is Empty or Contains Only Whitespace
Classification: Applications
Product: kmymoney
Version First 5.2.2
Reported In:
Platform: Microsoft Windows
OS: Microsoft Windows
Status: REPORTED
Severity: normal
Priority: NOR
Component: importer
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Summary
When importing transactions via AqBanking, KMyMoney currently uses the
remoteName field as the payee.
Some banks (e.g. TARGOBANK Germany for credit card transactions) do not provide
a real payee. Instead, they return a remoteName consisting only of two
non-breaking spaces (U+00A0, encoded as %C2%A0%C2%A0 in the AqBanking context
file).
As a result, KMyMoney considers the payee to be non-empty and does not fall
back to the transaction purpose. The imported transaction therefore has an
apparently empty payee and automatic payee matching cannot be used.
Example
AqBanking context data:
remoteName="%C2%A0%C2%A0"
purpose="PAYPAL *GAMEDUELLGM49018050"
purpose1="02860DE"
Current result in KMyMoney:
Payee: empty (actually contains two NBSP characters)
Memo/Purpose: PAYPAL *GAMEDUELLGM49018050
Expected result:
Payee: PAYPAL *GAMEDUELLGM49018050
Memo/Purpose remains unchanged
Suggested solution
Before evaluating remoteName, normalize it by replacing non-breaking spaces
with ordinary spaces and trimming Unicode whitespace.
Pseudo code:
QString payee = remoteName;
payee.replace(QChar(0x00A0), ' ');
payee = payee.trimmed();
if (payee.isEmpty()) {
payee = purpose;
}
Optionally, the importer could use the first non-empty purpose field (purpose,
purpose1, …) if remoteName contains no visible characters.
Benefits
No behaviour change for banks providing a valid payee.
Improves compatibility with banks returning whitespace-only payee fields.
Restores automatic payee matching and transaction assignment.
General solution, not specific to TARGOBANK.
--
You are receiving this mail because:
You are watching all bug changes.