mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Including the transaction text into the purpose text
Some banks include additional purpose information for a transaction in non-swift-section 17 (aka transaction text). If available, this transaction text is put in front of the other purpose texts to provide full transaction information. While the final solution is still under discussion. This change is a first low-impact implementation backported and distilled from the work discussed in gnucash/gnucash#139.
This commit is contained in:
parent
509ce16add
commit
0ad94ddcc0
@ -364,10 +364,18 @@ gchar *
|
||||
gnc_ab_get_purpose(const AB_TRANSACTION *ab_trans)
|
||||
{
|
||||
const GWEN_STRINGLIST *ab_purpose;
|
||||
const char *ab_transactionText = NULL;
|
||||
gchar *gnc_description = NULL;
|
||||
|
||||
g_return_val_if_fail(ab_trans, g_strdup(""));
|
||||
|
||||
/* According to AqBanking, some of the non-swift lines have a special
|
||||
* meaning. Some banks place valuable text into the transaction text,
|
||||
* hence we put this text in front of the purpose. */
|
||||
ab_transactionText = AB_Transaction_GetTransactionText(ab_trans);
|
||||
if (ab_transactionText)
|
||||
gnc_description = g_strdup(ab_transactionText);
|
||||
|
||||
ab_purpose = AB_Transaction_GetPurpose(ab_trans);
|
||||
if (ab_purpose)
|
||||
GWEN_StringList_ForEach(ab_purpose, join_ab_strings_cb,
|
||||
|
Loading…
Reference in New Issue
Block a user