In the function Import Bills & Invoices, the account type of the post to account in the import file should be Accounts Payable for bills, and Accounts Receivable for invoices. But GnuCash does not validate the account type, enabling A/P and A/R postings on any type of account.
Created attachment 373112 [details] Import file to illustrate the bug Using a book with common and business accounts, dd/mm/yyyy date format, vendor 2001. The post to account in the import file is not of account type Accounts Payable (it is Expenses:Charity). The bill is posted anyhow. (When manually posting a bill, it is not possible to use an account of any other type than Accounts Payable).
Pull request #457 merged into maint, https://github.com/Gnucash/gnucash/pull/457.