GnuCash
Contact   Instructions
Bug 796985 - Import Bills & Invoices: option 'open not yet posted docs in tab' does not open tab if invoice could not be posted
Summary: Import Bills & Invoices: option 'open not yet posted docs in tab' does not op...
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Import - CSV (show other bugs)
Version: git-maint
Hardware: PC Mac OS
: Normal minor
Target Milestone: ---
Assignee: Rob Laan
QA Contact: import
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-19 11:24 EST by Rob Laan
Modified: 2020-01-30 15:58 EST (History)
2 users (show)

See Also:


Attachments

Description Rob Laan 2018-12-19 11:24:23 EST
In the Import Bills & Invoices function:
- the user chooses the option 'Open not yet posted documents in tabs';
- the import file contains invoices that have a value for date_posted, so the system will attempt to post these invoices;
- but the invoices cannot be posted because of an issue with e.g. non existent account_posted;

In this case the system will not open a tab for the invoice, even though it is not yet posted.

In line 839 of dialog-bi-import.c, the code only checks if date_posted has a value, but not if the invoice has actually been posted.

836         // open new bill / invoice in a tab, if requested
837         if (g_ascii_strcasecmp(open_mode, "ALL") == 0
838                 || (g_ascii_strcasecmp(open_mode, "NOT_POSTED") == 0
839                     && strlen(date_posted) == 0))
840         {   
841             iw =  gnc_ui_invoice_edit (parent, invoice);
842             gnc_plugin_page_invoice_new (iw);
843         }
Comment 1 Rob Laan 2020-01-30 15:58:03 EST
Pull request #457 merged into maint, https://github.com/Gnucash/gnucash/pull/457.

Note You need to log in before you can comment on or make changes to this bug.