mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Base invoice posted status on the presence of a posted transaction rather than a posted account
Bills and invoices that are posted and subsequently unposted again still store their posted account internally as a convenience to the user (upon reposting the old account will be offered by default) so it's not a reliable test for the posted state. The posted transaction on the other hand is guaranteed to only exist when the invoice is posted. This should fix a slew of small and perhaps larger side effects, such as a posted bill still appearing as editable, critical warnings when creating new bills/invoices and so on.
This commit is contained in:
parent
6093e5978f
commit
dcfc1280bd
@ -1859,7 +1859,7 @@ gncInvoiceApplyPayment (const GncInvoice *invoice, Transaction *txn,
|
||||
gboolean gncInvoiceIsPosted (const GncInvoice *invoice)
|
||||
{
|
||||
if (!invoice) return FALSE;
|
||||
return GNC_IS_ACCOUNT(gncInvoiceGetPostedAcc(invoice));
|
||||
return GNC_IS_TRANSACTION(gncInvoiceGetPostedTxn(invoice));
|
||||
}
|
||||
|
||||
gboolean gncInvoiceIsPaid (const GncInvoice *invoice)
|
||||
|
Loading…
Reference in New Issue
Block a user