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:
Geert Janssens
2011-06-25 14:31:26 +00:00
parent 6f87d66b11
commit 063f4f9233
+11 -1
View File
@@ -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);