Bug 320242 - Transaction confirmation pop-up doesn't use defined unit value for transaction date for suggested value
Summary: Transaction confirmation pop-up doesn't use defined unit value for transactio...
Status: VERIFIED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords: reproducible, testcase
Depends on:
Blocks:
 
Reported: 2013-05-25 00:25 UTC by slodki
Modified: 2013-05-27 00:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slodki 2013-05-25 00:25:30 UTC
When the following pop-up is raised: "The operation unit is not compatible with the target account. Click Cancel if you want to continue anyway; otherwise, enter the value int the target account's unit:" skrooge uses last defined (current?) unit value for amount suggestion, even there is exact value defined at units page.
User have to correct suggested value using external calc and unit price for given date (already defined in skrooge).
Acceptance of value suggested by skrooge yields to wrong account balance after transfer - if there is unit price defined with date after transaction date.
It's important for shares to enter exact value - now it's impossible at this pop-up.

Reproducible: Always

Steps to Reproduce:
1. Define 2 units (primary currency and secondary currency)
2. define value =1 at jan 1st for secondary currency
3. define value =2 at current date for secondary current
4. create 2 account - with different units
3. create transfer between acounts for jan 1st
4. Confirmation pop-up is raised
Actual Results:  
skrooge suggest transaction value using unit price =2, but transfer date is jan 1st

Expected Results:  
skrooge should suggest transaction value using unit price =1, as defined for jan 1st
Comment 1 Stephane MANKOWSKI 2013-05-25 08:46:32 UTC
Git commit 3c9043f0f57fd9439deca96d7de8a430c050a7a6 by Stephane MANKOWSKI.
Committed on 25/05/2013 at 10:46.
Pushed by smankowski into branch 'master'.
Transaction confirmation pop-up doesn't use defined unit value for transaction date for suggested value

M  +1    -0    CHANGELOG
M  +3    -3    skgbankmodeler/skgunitobject.cpp
M  +2    -1    skgbankmodeler/skgunitobject.h

http://commits.kde.org/skrooge/3c9043f0f57fd9439deca96d7de8a430c050a7a6
Comment 2 slodki 2013-05-25 09:56:11 UTC
Nothing changed. You should set iDate somewhere to transaction's date. Now it always uses default form (skgunitobject.h) =QDate::currentDate().

Defined USD=1PLN for 2013-05-01
Defined USD=4PLN for today
Entering transaction for 2013-05-01 to transfer 100PLN to USD account, pop-up suggest 25$, usign today unit price (not one defined for 2013-05-01)
Comment 3 Stephane MANKOWSKI 2013-05-25 10:17:59 UTC
Git commit b8fc943592a4e350c9775d287f27e4300df40fd9 by Stephane MANKOWSKI.
Committed on 25/05/2013 at 12:15.
Pushed by smankowski into branch 'master'.
Transaction confirmation pop-up doesn't use defined unit value for transaction date for suggested value

M  +1    -0    CHANGELOG
M  +2    -2    plugins/skrooge/skrooge_operation/skgoperationpluginwidget.cpp
M  +3    -3    skgbankmodeler/skgunitobject.cpp
M  +2    -1    skgbankmodeler/skgunitobject.h

http://commits.kde.org/skrooge/b8fc943592a4e350c9775d287f27e4300df40fd9