mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix two bugs in custom check printing. One swaps the placement of the
amount(number) and amount(words) when printing directly from the custom check page of the print dialog. (No bugzilla.) The other bug is that GnuCash fails to write the guid in newly saved check files. (Bug #434407) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16046 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -510,8 +510,8 @@ pcd_save_custom_data(PrintCheckDialog *pcd, gchar *filename)
|
||||
|
||||
key_file = g_key_file_new();
|
||||
guid_new(&guid);
|
||||
g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_GUID,
|
||||
guid_to_string_buff(&guid, buf));
|
||||
guid_to_string_buff(&guid, buf);
|
||||
g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_GUID, buf);
|
||||
g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_TITLE,
|
||||
_("Custom Check"));
|
||||
g_key_file_set_boolean(key_file, KF_GROUP_TOP, KF_KEY_SHOW_GRID, FALSE);
|
||||
@@ -1887,14 +1887,14 @@ draw_page_custom(GncPrintContext * context, gint page_nr, gpointer user_data)
|
||||
draw_text(context, buf, &item, desc);
|
||||
g_date_free(date);
|
||||
|
||||
item.x = multip * gtk_spin_button_get_value(pcd->words_x);
|
||||
item.y = multip * gtk_spin_button_get_value(pcd->words_y);
|
||||
item.x = multip * gtk_spin_button_get_value(pcd->number_x);
|
||||
item.y = multip * gtk_spin_button_get_value(pcd->number_y);
|
||||
info = gnc_default_print_info(FALSE);
|
||||
amount = gnc_numeric_abs(xaccSplitGetAmount(pcd->split));
|
||||
draw_text(context, xaccPrintAmount(amount, info), &item, desc);
|
||||
|
||||
item.x = multip * gtk_spin_button_get_value(pcd->number_x);
|
||||
item.y = multip * gtk_spin_button_get_value(pcd->number_y);
|
||||
item.x = multip * gtk_spin_button_get_value(pcd->words_x);
|
||||
item.y = multip * gtk_spin_button_get_value(pcd->words_y);
|
||||
text = numeric_to_words(amount);
|
||||
draw_text(context, text, &item, desc);
|
||||
g_free(text);
|
||||
|
||||
Reference in New Issue
Block a user