mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug-797168 Proposed fix.
This commit is contained in:
@@ -760,12 +760,12 @@ gnc_dialog_post_invoice(InvoiceWindow *iw, char *message,
|
||||
*ddue = *postdate;
|
||||
*memo = NULL;
|
||||
{
|
||||
GncGUID *guid = NULL;
|
||||
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
|
||||
qof_instance_get (owner_inst,
|
||||
"invoice-last-posted-account", &guid,
|
||||
NULL);
|
||||
*acc = xaccAccountLookup (guid, iw->book);
|
||||
GncGUID *guid = NULL;
|
||||
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
|
||||
qof_instance_get (owner_inst,
|
||||
"invoice-last-posted-account", &guid,
|
||||
NULL);
|
||||
*acc = xaccAccountLookup (guid, iw->book);
|
||||
}
|
||||
/* Get the default for the accumulate option */
|
||||
*accumulate = gnc_prefs_get_bool(GNC_PREFS_GROUP_INVOICE, GNC_PREF_ACCUM_SPLITS);
|
||||
@@ -957,12 +957,12 @@ gnc_invoice_post(InvoiceWindow *iw, struct post_invoice_params *post_params)
|
||||
*/
|
||||
owner_inst = qofOwnerGetOwner (gncOwnerGetEndOwner (&(iw->owner)));
|
||||
{
|
||||
const GncGUID *guid = qof_instance_get_guid (QOF_INSTANCE (acc));
|
||||
qof_begin_edit (owner_inst);
|
||||
qof_instance_set (owner_inst,
|
||||
"invoice-last-posted-account", guid,
|
||||
NULL);
|
||||
qof_commit_edit (owner_inst);
|
||||
const GncGUID *guid = qof_instance_get_guid (QOF_INSTANCE (acc));
|
||||
qof_begin_edit (owner_inst);
|
||||
qof_instance_set (owner_inst,
|
||||
"invoice-last-posted-account", guid,
|
||||
NULL);
|
||||
qof_commit_edit (owner_inst);
|
||||
}
|
||||
|
||||
/* ... post it ... */
|
||||
@@ -1931,10 +1931,22 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
|
||||
// GtkWidget *hide;
|
||||
|
||||
/* Setup viewer for read-only access */
|
||||
/*
|
||||
gtk_widget_set_sensitive (acct_entry, FALSE);
|
||||
gtk_widget_set_sensitive (iw->id_entry, FALSE);
|
||||
gtk_widget_set_sensitive (iw->terms_menu, FALSE);
|
||||
gtk_widget_set_sensitive (iw->notes_text, FALSE); *//* XXX: should notes remain writable? */
|
||||
gtk_widget_set_sensitive (iw->owner_box, FALSE);
|
||||
gtk_widget_set_sensitive (iw->job_box, FALSE);
|
||||
gtk_widget_set_sensitive (iw->billing_id_entry, FALSE);
|
||||
gtk_widget_set_sensitive (iw->notes_text, FALSE); /* XXX: should notes remain writable?*/
|
||||
}
|
||||
else /* ! posted */
|
||||
{
|
||||
gtk_widget_set_sensitive (acct_entry, TRUE);
|
||||
gtk_widget_set_sensitive (iw->terms_menu, TRUE);
|
||||
gtk_widget_set_sensitive (iw->owner_box, TRUE);
|
||||
gtk_widget_set_sensitive (iw->job_box, TRUE);
|
||||
gtk_widget_set_sensitive (iw->billing_id_entry, TRUE);
|
||||
gtk_widget_set_sensitive (iw->notes_text, TRUE);
|
||||
}
|
||||
|
||||
if (widget)
|
||||
@@ -2351,6 +2363,8 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
|
||||
/* Make the opened and posted dates insensitive in this window */
|
||||
gtk_widget_set_sensitive (iw->opened_date, FALSE);
|
||||
gtk_widget_set_sensitive (iw->posted_date, FALSE);
|
||||
/* Also the invoice ID */
|
||||
gtk_widget_set_sensitive (iw->id_entry, FALSE);
|
||||
|
||||
/* Build the ledger */
|
||||
ledger_type = GNCENTRY_INVOICE_VIEWER;
|
||||
@@ -3344,7 +3358,7 @@ gnc_invoice_show_docs_due (GtkWindow *parent, QofBook *book, double days_in_adva
|
||||
if (param_list == NULL)
|
||||
{
|
||||
/* Translators: This abbreviation is the column heading for
|
||||
the condition "Is this invoice a Credit Note?" */
|
||||
the condition "Is this invoice a Credit Note?" */
|
||||
param_list = gnc_search_param_prepend (param_list, _("CN?"), NULL, type,
|
||||
INVOICE_IS_CN, NULL);
|
||||
param_list = gnc_search_param_prepend (param_list, _("Amount"), NULL, type,
|
||||
|
||||
Reference in New Issue
Block a user