* src/business/business-core/gncInvoice.c: set the date-entered on

invoice transactions to "now" instead of the post date.  This
	  lets us know when an invoice was actually posted, or a payment
	  was actually made.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8980 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/cashutil
Derek Atkins 23 years ago
parent 500c652314
commit fe64f5aeee

@ -4,6 +4,11 @@
to the various columns displayed in the report currency.
Partial fix for #118695.
* src/business/business-core/gncInvoice.c: set the date-entered on
invoice transactions to "now" instead of the post date. This
lets us know when an invoice was actually posted, or a payment
was actually made.
Support "gain/loss" balancing splits on stocks:
* src/engine/Transaction.c: fix xaccSplitGetPrice() to return '0'
if 'amount' is zero but 'value' is non-zero

@ -756,8 +756,8 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
xaccTransSetCurrency (txn, invoice->currency);
/* Entered and Posted at date */
xaccTransSetDateEnteredSecs (txn, time(NULL));
if (post_date) {
xaccTransSetDateEnteredTS (txn, post_date);
xaccTransSetDatePostedTS (txn, post_date);
gncInvoiceSetDatePosted (invoice, *post_date);
}
@ -941,10 +941,9 @@ Transaction * gncInvoicePostToAccount (GncInvoice *invoice, Account *acc,
xaccTransSetCurrency (t2, invoice->currency);
/* Entered and Posted at date */
if (post_date) {
xaccTransSetDateEnteredTS (t2, post_date);
xaccTransSetDateEnteredSecs (t2, time(NULL));
if (post_date)
xaccTransSetDatePostedTS (t2, post_date);
}
/* Balance out this lot */
split = xaccMallocSplit (invoice->book);
@ -1110,7 +1109,7 @@ gncOwnerApplyPayment (GncOwner *owner, Account *posted_acc, Account *xfer_acc,
xaccTransSetDescription (txn, name ? name : "");
xaccTransSetNum (txn, num);
xaccTransSetCurrency (txn, commodity);
xaccTransSetDateEnteredTS (txn, &date);
xaccTransSetDateEnteredSecs (txn, time(NULL));
xaccTransSetDatePostedTS (txn, &date);
xaccTransSetTxnType (txn, TXN_TYPE_PAYMENT);

Loading…
Cancel
Save