After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 502066 - The aging in business reports should use the due date instead of the post date
The aging in business reports should use the due date instead of the post date
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Business
2.2.x
Other All
: Normal normal
: ---
Assigned To: Derek Atkins
Derek Atkins
: 637003 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-06 14:42 UTC by ASL4U
Modified: 2018-06-29 21:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample gnucash file for 502066 (6.30 KB, application/x-gnucash)
2011-01-02 17:42 UTC, Don M
  Details
Sample report html file for 502066 (3.33 KB, text/html)
2011-01-02 17:42 UTC, Don M
  Details
Edit (2.2.9) aging file with Current column and using Due date (22.84 KB, text/x-scheme)
2011-01-05 22:52 UTC, Bert
  Details
Example file for 502066 with try on Current column and due date (1.25 KB, application/octet-stream)
2011-01-05 22:53 UTC, Bert
  Details
Patch to aging.scm to include due date and "current" bucket (4.41 KB, patch)
2011-01-07 19:58 UTC, Bert
committed Details | Review
Customer report options dialog ver 2.4.2 (93.05 KB, image/png)
2011-02-12 11:05 UTC, Don M
  Details

Description ASL4U 2007-12-06 14:42:56 UTC
Please describe the problem:
the aging seems to be counting from the day the invoice is posted rather from the day the invoice should be DUE - so there is no way to see what is actually late vs what is simply incoming. 
and - when there is an amount showing as "late" (30-60 days) there is no way to identify which invoice has not been paid.

Steps to reproduce:
create some invoices starting on Nov 1 (due on Dec 1), nov 3 due on dec 1, nov 3 due on Dec 15 nov 14 due on dec 15, dec 20 due on dec 31
1. Reports/business/receivables aging (you will see some amount as aged 31-60 days late)



Actual results:
if you are creating the report on a day that is earlier than Dec 31 - you should have NO invoices reported 31 - 60 days but you will see that any invoices you have created and POSTED are showing at 30, 31-60 + respectively - and there is no way to identify which invoices are those showing past due.

Expected results:
0-30, 31-60, 60-90 is supposed to show you late invoices, not simply Due invoices. If I am seeing due invoices in my past due account - but/and cannot identify which invoice is "late" - the information is useless

Does this happen every time?
so far - on my computer - yes

Other information:
thank you for your consideration
Comment 1 Derek Atkins 2007-12-06 16:55:16 UTC
Can you attach a sample data file that shows the problem?

All posted, unpaid invoices should show in the bottom ranges.  Invoices not yet due should show in the 0-30 day bucket by design.
Comment 2 Don M 2011-01-02 17:42:16 UTC
Created attachment 177359 [details]
Sample gnucash file for 502066
Comment 3 Don M 2011-01-02 17:42:45 UTC
Created attachment 177360 [details]
Sample report html file for 502066
Comment 4 Don M 2011-01-02 17:44:47 UTC
I agree with the original reporter -- I think this design is incorrect. An aging report is concerned with amounts that are past due, and calculations should be relative to the due date, not the invoice date.

I would expect to have a summary box labeled "current", which contains the amount invoiced but that is not due yet (before the due date). Then the box labeled "0-30 days" would be amounts that are between 0 and 30 days past the due date (that is, they are 0 to 30 days *late*). Similar for 31-60 days, etc.

This is what Quickbooks does, for example, and also other accounting systems I have used. This is also what my customers expect when they receive an overdue notice.

This becomes even more confusing if you don't invoice net-30. If you invoice net-15, for example, then with the current design, some of the amount in the 0-30 days box is current, and some is overdue.

This problem occurs on multiple reports: Receivables Aging, Customer Report, Payables Aging, and Vendor report.

I have attached a sample file that demonstrates the problem. To create this test file, I did:
1) In the billing terms editor, I created a new term "net-15", where bills are due 15 days after the invoice date. 

2) I created a new customer and three invoices, all due net-15:
  Invoice Date  Due Date    Amount
  2010-11-20    2010-12-05  1000
  2010-12-10    2010-12-25  2000
  2010-12-20    2011-01-04  4000

3) I ran a customer report and a receivables aging report as of 2010-12-30. These reports show:
  0-30 days: $6000
 31-60 days:  1000

What I would expect to see is:
  Current:    4000
  0-30 days:  3000

See the report in the gnucash file, and/or the sample exported customer report file attached.

The attached gnucash file also shows a sample payables aging report and vendor report with the same issue.
Comment 5 Frank H. Ellenberger 2011-01-04 03:47:21 UTC
*** Bug 637003 has been marked as a duplicate of this bug. ***
Comment 6 Frank H. Ellenberger 2011-01-04 04:19:27 UTC
This issue "post date vs. due date" affects all reports in Reports->Business with exception of the different invoice forms.

From Bug 637003:
I think both dates are important, depending on the question you has. 
a) How much money is outstanding for invoices and bills vice versa.
b) How much is over the due date.

So I think we should implement an option to switch between posted/incurred and
due date.

Because b) will be asked more often, it should become the default setting despite it is not the old behavior.

@Don M: Eventually the 30 days should also be editable.
More comfort one could get by extending the billing terms by days and prizes for the 1.+ 2. overdue note. But that would be more work ...
Comment 7 Don M 2011-01-04 10:56:23 UTC
Thanks for your response.

Making it an option would of course be fine. However, when using due dates (case b), we should also show the amount that is not due yet. In other accounting systems I have used, this field is marked "Current". When you do this, your aging reports show the total amount outstanding (as the Total Due), even when using due dates (case b). 

I don't think you need to worry about making the 30 days editable. The 30, 60, and 90 day periods are pretty standard. Making this more flexible is not worth the effort in my opinion.

>More comfort one could get by extending the billing terms by days and prizes
>for the 1.+ 2. overdue note.

Sorry, I don't understand that sentence.
Comment 8 Derek Atkins 2011-01-04 13:37:06 UTC
I do not believe it is important to change the 30-day buckets.  I see no value in making that an option.

I can see the value in an option to choose between due date and post date (with 'due date' being the default)
Comment 9 IronSmith 2011-01-04 20:15:27 UTC
I think there is value in making the periods editable down the road, however I would be more than satisfied for now with just adding the options to show the amounts in there due periods rather than their incurred periods.
Comment 10 Bert 2011-01-05 22:52:20 UTC
Created attachment 177621 [details]
Edit (2.2.9) aging file with Current column and using Due date

I had a try at hacking at the aging file to:

*Use the due date instead of the posted date (hard coded)
*Implement the current column, for invoices not yet past or on their due date

I had to make some changes to the test file, given that we are past the 4th of January, but as next attachment will illustrate, I think I got it working. Please confirm if this indeed intended functionality.

This is directly hacked at the aging file on a 2.2.9 version, so I just replaced what I had with this (I'm really new to this).

---
Don't know if this is the right way to go about it, I'm new to Scheme, GnuCash and submitting decent patches, but with some feedback I'd be happy to form this into a set of patches (one to make the Date field pickable, one to update the fields to current).
Comment 11 Bert 2011-01-05 22:53:53 UTC
Created attachment 177622 [details]
Example file for 502066 with try on Current column and due date
Comment 12 Don M 2011-01-06 02:35:41 UTC
(In reply to comment #10)
> I had to make some changes to the test file, given that we are past the 4th of
> January

You should not have had to. I believe I created the reports over a fixed period, ending 2010-12-30 (not ending on "today"). The report should show the overdue status as of the report date, not the current date.
Comment 13 Bert 2011-01-07 19:58:50 UTC
Created attachment 177777 [details] [review]
Patch to aging.scm to include due date and "current" bucket

Patch file for aging.scm to include:
*Option to select due date or date posted
*Added column of "Current" for invoices not yet due

Against revision 20036 of trunk.

Tested against test file presented above and confirmed it to work on my machine (linux).

It may need some further changes/refactoring:
*"Current" column applies to both options (so also date posted, which makes little sense?)
*I am not sure if I got the strings right for translation
*I am not sure if I got the "coding style" or "level" right > introduced some passing around parameter in two functions and introduced a wrapper function iso changing the original function.


Furthermore, I am also not sure whether the functionality above should be two patches or just one (depending on what you think of the patch itself of course). If approved, next step would probably be aiming for customer after my holiday.
Comment 14 Christian Stimming 2011-01-10 09:37:49 UTC
Comment on attachment 177777 [details] [review]
Patch to aging.scm to include due date and "current" bucket

Thanks for the patch. The function is very nice and it can be committed right away.

However, the wording of the GUI elements still need some changing so that they are translatable as well: You must not use the option name as part of a sentence that continues with the value of the option, because the translators cannot translate this into other languages. Instead, the option label needs to stand alone on its own, like "Start date of buckets" or so.
Comment 15 Christian Stimming 2011-01-11 20:59:59 UTC
Comment on attachment 177777 [details] [review]
Patch to aging.scm to include due date and "current" bucket

r20069, thanks a lot! I decided for "Due or Post Date" as option name, but feel free to propose yet another name there.
Comment 16 Don M 2011-02-11 19:59:50 UTC
I just installed version 2.4.2, and this fix does not seem to be there. It is listed as included in the release notes on the main gnucash page, so I expected it. When I make a customer report, the report does not show a "current" column, and there is no option for "Due or post date". What happened? Thanks.
Comment 17 Christian Stimming 2011-02-12 09:08:34 UTC
There should be a new option in the report for this, but its wording might be somewhat awkward. Can you look again? If the wording needs to be improved, feel free to suggest a better sentence.
Comment 18 Christian Stimming 2011-02-12 09:09:09 UTC
There should be the option "Due or Post Date". Can you see that one?
Comment 19 Don M 2011-02-12 11:03:28 UTC
No I do not. I see the attached screenshot.
Comment 20 Don M 2011-02-12 11:05:48 UTC
Created attachment 180715 [details]
Customer report options dialog ver 2.4.2
Comment 21 Don M 2011-02-28 12:00:35 UTC
This remains unfixed in 2.4.3.
Comment 22 Geert Janssens 2011-02-28 13:07:51 UTC
This is very strange. When I test this on my Windows XP installation with the default GnuCash 2.4.2 install, the option is there.

Could you try to completely uninstall GnuCash, (run the uninstaller program and then remove c:\Program Files\gnucash if that directory still exists) and install again ? Is the option then still missing ?

Note: uninstalling won't touch your data or preferences, unless you explicitly saved your data file somewhere in c:\Program Files\gnucash.
Comment 23 Don M 2011-02-28 23:46:12 UTC
I uninstalled then re-installed 2.4.3 again. Same problem, the option is not there. 

I then tried creating a new gnucash file (new set of accounts). I created billing terms, a customer, and an invoice. Run the customer report, the option is still not there. 

It finally occurred to me to try other reports. Yes, this option is there on the receivables aging report. Also on payables aging, but not on Customers, Vendors, or Jobs. This needs to be added to these other reports.

The customer report is important (to me anyway) because this is something you can send to a customer, telling them how much overdue they are.

Thanks,
Comment 24 Derek Atkins 2011-02-28 23:59:09 UTC
Thank you for your update.  Based on comment #23 this bug as reported has been fixed.  You should file a new bug against the Owner Reports to get the aging portions of those updated.
Comment 25 Don M 2011-03-01 00:15:33 UTC
I disagree.

1) I specifically described in comment #4 that "This problem occurs on multiple reports: Receivables Aging, Customer Report, Payables Aging, and Vendor report." 

2) The test case I submitted showed a customer report, not an aging report.

3) It makes no sense to have due dates displayed on the aging report and not have this on customer reports. Now your customer reports don't match up with your aging report. You have a "current" column on the aging report, but no such thing on the customer report. The amounts in the two reports don't match.

If you really want a new bug report, I'll do one, but that doesn't seem right to me. I would classify this as only partially fixed.
Comment 26 Geert Janssens 2011-03-01 16:39:43 UTC
I agree with Don here. It was early on analysed that several business reports required fixing (like Don's comment 4 and Frank's comment 6), not only the aging reports. Only two reports have been fixed so far. I see no reason to open a new bug for the others if the problem to be solved is the same one.
Comment 27 Bert 2011-05-11 20:20:44 UTC
Please have a look at:

https://bugzilla.gnome.org/show_bug.cgi?id=649992

which is a new report and accompanying patch (which probably needs to be tested).
Comment 28 Don M 2011-06-06 13:31:03 UTC
I tested this in ver 2.4.6, and the Receivables Aging, Customer Report,
Payables Aging, and Vendor reports have been fixed. I believe this issue can be changed to fixed.

Thanks!
Comment 29 John Ralls 2018-06-29 21:55:51 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=502066. Please update any external references or bookmarks.