|
|
|
|
@ -510,50 +510,16 @@ ab_ultimate_creditor_debtor_to_gnc (const AB_TRANSACTION *ab_trans,
|
|
|
|
|
gchar *
|
|
|
|
|
gnc_ab_description_to_gnc (const AB_TRANSACTION *ab_trans, gboolean is_ofx)
|
|
|
|
|
{
|
|
|
|
|
/* Description */
|
|
|
|
|
gchar *description = gnc_ab_get_purpose (ab_trans, is_ofx);
|
|
|
|
|
gchar *other_name = gnc_ab_get_remote_name (ab_trans);
|
|
|
|
|
gchar *ultimate = ab_ultimate_creditor_debtor_to_gnc (ab_trans, is_ofx);
|
|
|
|
|
gchar *retval = NULL;
|
|
|
|
|
|
|
|
|
|
if (ultimate)
|
|
|
|
|
retval = ultimate;
|
|
|
|
|
if (description)
|
|
|
|
|
{
|
|
|
|
|
if (retval)
|
|
|
|
|
{
|
|
|
|
|
char *tmp = g_strdup_printf ("%s; %s", retval, description);
|
|
|
|
|
g_free (retval);
|
|
|
|
|
g_free (description);
|
|
|
|
|
retval = tmp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
retval = description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (other_name)
|
|
|
|
|
{
|
|
|
|
|
if (retval)
|
|
|
|
|
{
|
|
|
|
|
char *tmp = g_strdup_printf ("%s; %s", retval, other_name);
|
|
|
|
|
g_free (retval);
|
|
|
|
|
g_free (other_name);
|
|
|
|
|
retval = tmp;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
retval = other_name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
GList *acc = NULL;
|
|
|
|
|
gchar *retval;
|
|
|
|
|
|
|
|
|
|
if (!retval)
|
|
|
|
|
{
|
|
|
|
|
retval = g_strdup (_("Unspecified"));
|
|
|
|
|
}
|
|
|
|
|
acc = g_list_prepend (acc, gnc_ab_get_remote_name (ab_trans));
|
|
|
|
|
acc = g_list_prepend (acc, gnc_ab_get_purpose (ab_trans, is_ofx));
|
|
|
|
|
acc = g_list_prepend (acc, ab_ultimate_creditor_debtor_to_gnc (ab_trans, is_ofx));
|
|
|
|
|
retval = gnc_g_list_stringjoin (acc, "; ");
|
|
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
|
g_list_free_full (acc, g_free);
|
|
|
|
|
return retval ? retval : g_strdup (_("Unspecified"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gchar *
|
|
|
|
|
|