mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Bug #646541 - new invoice line items default to invoice open date
instead of current date This commit partially reverts the changes in r19134 so that customer invoices and employee vouchers default to the current date. Vendor bills still default to the invoice open date. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20800 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -523,7 +523,17 @@ void gnc_entry_ledger_set_default_invoice (GncEntryLedger *ledger,
|
||||
{
|
||||
if (!ledger) return;
|
||||
ledger->invoice = invoice;
|
||||
ledger->last_date_entered = gncInvoiceGetDateOpened (invoice);
|
||||
|
||||
/* For bills only, set the default date for new entries
|
||||
* to the bill's opened date. This saves a lot of typing when
|
||||
* adding bills on a day different from the bill's own date.
|
||||
* Note this is for bills only, because for (customer's) invoices
|
||||
* it makes more sense to use the current date.
|
||||
* Consult https://bugzilla.gnome.org/show_bug.cgi?id=646541
|
||||
* to understand why.
|
||||
*/
|
||||
if (gncInvoiceGetOwnerType (invoice) == GNC_OWNER_VENDOR)
|
||||
ledger->last_date_entered = gncInvoiceGetDateOpened (invoice);
|
||||
|
||||
if (!ledger->query && invoice)
|
||||
create_invoice_query (ledger);
|
||||
|
||||
Reference in New Issue
Block a user