Bug 385277 - Wrong budget for split-operations with unaligned dates
Summary: Wrong budget for split-operations with unaligned dates
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: Trunk from git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-01 20:49 UTC by Bernhard Scheirle
Modified: 2017-10-02 19:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example skrooge file (376.02 KB, application/x-skgc)
2017-10-01 20:49 UTC, Bernhard Scheirle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Scheirle 2017-10-01 20:49:57 UTC
Created attachment 108122 [details]
Example skrooge file

If the sub-operations of a split-operation are using a different date than the split-operation itself, the budget for these sub-operations gets calculated wrongly:
The sub-operations get treated with the date of the split-operation.

Example (also see attached skrooge file):
* Monthly budget for category "Cat1" is 50€

* Standard-operation:
* * 2017.09.25 - Cat1 - 50€ - [A]

* Split-operation with two sub-operations:
* * 2017.09.29 - 100€
* * * 2017.10.01 - Cat1 - 50€ - [B]
* * * 2017.10.01 - Cat2 - 50€

Actual Result:
The amount for the Cat1 budget is:
2017.09 - 100€ (A + B) (Budget contains operations of September and October)
2017.10 -   0€

Expected Result:
The amount for the Cat1 budget is:
2017.09 - 50€ (A)
2017.10 - 50€ (B)

Note: Reports do use the date of the sub-operations correctly.
Comment 1 Stephane MANKOWSKI 2017-10-02 19:39:28 UTC
Git commit 13f2f072ee92fb5cc93299ae58b48a541f95d43d by Stephane Mankowski.
Committed on 02/10/2017 at 19:39.
Pushed by smankowski into branch 'master'.

Wrong budget for split-operations with unaligned dates

M  +1    -0    CHANGELOG
M  +13   -7    skgbankmodeler/skgdocumentbank.cpp

https://commits.kde.org/skrooge/13f2f072ee92fb5cc93299ae58b48a541f95d43d