Bug 385277

Summary: Wrong budget for split-operations with unaligned dates
Product: [Applications] skrooge Reporter: Bernhard Scheirle <bernhard+kde>
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: normal CC: stephane
Priority: NOR    
Version First Reported In: Trunk from git   
Target Milestone: 25.1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Example skrooge file

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