Bug 728103 - Invoice opened does not contain the Job under circumstances

corrected the saving of the page, so that it mentions the Job as
the owner if there is a job, instead of the customer or the vendor.

	modified:   src/business/business-gnome/dialog-invoice.c
This commit is contained in:
Michalis Kamprianis 2014-05-04 21:25:37 +02:00 committed by Geert Janssens
parent e1a5889b45
commit 1992e5fb1f

View File

@ -2181,10 +2181,20 @@ gnc_invoice_save_page (InvoiceWindow *iw,
g_key_file_set_string(key_file, group_name, KEY_INVOICE_GUID,
guid_to_string(&iw->invoice_guid));
g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
if (gncOwnerGetJob (&(iw->job)))
{
g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
qofOwnerGetType(&iw->job));
g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
guid_to_string(gncOwnerGetGUID(&iw->job)));
}
else
{
g_key_file_set_string(key_file, group_name, KEY_OWNER_TYPE,
qofOwnerGetType(&iw->owner));
g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
g_key_file_set_string(key_file, group_name, KEY_OWNER_GUID,
guid_to_string(gncOwnerGetGUID(&iw->owner)));
}
}
GtkWidget *