GnuCash
Contact   Instructions
Bug 766052 - Job report payments wrong when payment contains splits
Summary: Job report payments wrong when payment contains splits
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Business (show other bugs)
Version: 4.5
Hardware: Other Linux
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-06 05:21 EDT by Katie
Modified: 2021-06-30 06:54 EDT (History)
7 users (show)

See Also:


Attachments
exported test customer report (22.82 KB, text/html)
2021-06-29 05:50 EDT, Katie
no flags Details
exported test job report (12.09 KB, text/html)
2021-06-29 05:52 EDT, Katie
no flags Details
patch to use job payment splits only (904 bytes, patch)
2021-06-29 10:18 EDT, Christopher Lam
no flags Details

Description Katie 2016-05-06 05:21:22 EDT
If one customer has several jobs, I invoice each one separately.  However, the customer usually pays several invoices at once.  

This is recorded correctly in splits, and if I run a printable invoice report on one of the paid invoices, the correct amount is given for the payment.

If I run a Job Report where an invoice payment was a split, the 'payment' for that invoice is wrongly listed as the total payment rather than the split.

This is possibly because the customer report on which this is based would not have this situation arising, but for the job report results in incorrect totals.

System is Linux Mint 17.3, Gnucash 2.6.9 from getdeb repository.  Discussion of bug on gnucash-user mailing list 6 May 2016.

Thanks,
Katie
Comment 1 tongji 2017-07-17 21:37:46 EDT
confirming that bug. Having exactly the same behavior here
Comment 2 Christopher Lam 2021-06-24 04:28:11 EDT
The aging report has been overhauled recently. Would be keen to know if it still has buggy behaviour.
Comment 3 Katie 2021-06-24 05:18:14 EDT
I can confirm that the buggy behaviour is still there on GnuCash 4.5 FlatPak version (Linux Mint 20.1): the amount for each invoice for the job is correct, but the payments show the full payment rather than the split linked to the relevant invoice, so the payments and balance columns show nonsense figures.

Let me know if you need a sample report output with customer report for comparison, and I'll blank out the confidential parts from one...

regards,
Katie
Comment 4 Katie 2021-06-24 05:23:21 EDT
Further note: the figures in the summary table at the bottom are correct.
regards,
Katie
Comment 5 Christopher Lam 2021-06-24 05:46:03 EDT
Yes a sample report would be useful. Even better, a sample data file. If this is not possible then an explanation of the job details would be useful so that we can replicate the bug.
Comment 6 Katie 2021-06-29 05:50:40 EDT
Created attachment 374095 [details]
exported test customer report

this is the report for the same customer and period as the job report, with the correct figures - the description field differentiates between each job.
Katie
Comment 7 Katie 2021-06-29 05:52:57 EDT
Created attachment 374096 [details]
exported test job report

This is the export of the job report to show the bug:  the way the payments and balance are calculated make these two columns totally wrong when a single payment has only one split relating to that job.
Katie
Comment 8 Katie 2021-06-29 05:58:43 EDT
I've attached a sample job report together with a customer report for the same customer and period (so includes all items in the job report).  

Hopefully this gives you the info you need - I don't know how to produce a sample file from my test file (which is just a copy of my live file) to get something a reasonable file size and anonymised, so if you need this you would have to explain...

Katie
Comment 9 Christopher Lam 2021-06-29 10:18:44 EDT
Created attachment 374097 [details]
patch to use job payment splits only

Thanks Katie, I've now understood this bug.

This fix should work.

Previously the PAYMENT splits would tally all payment amounts from APAR account. Now it will choose from job splits only. If you can apply patch and test, I'll be very grateful.
Comment 10 Christopher Lam 2021-06-30 06:54:18 EDT
fixed in maint.

tomorrow's flatpak build (after 2021-06-30) will have the fix.
https://code.gnucash.org/builds/flatpak/maint/

Note You need to log in before you can comment on or make changes to this bug.