I have fixed a bug and added new feature to your program.
My changes based on svn revision 393.
1.Fixed bug, file mmhomepagepanel.cpp.
MMEX calculates "double tBalance" and shows "Total of Accounts:" value on its home page.
But this is a bug - you calculates sum of balances with different currencies.
For example, I have first account in US dollar, second in EURO, third in my national currency UAH,
and last in XAU (gold). The total sum of balalces of these accounts has no sense.
So, I have fixed this issue. Instead of double tBalance I use map and sum balances for each currency.
- double tBalance = 0.0;
+
+ typedef std::map<boost::shared_ptr<mmCurrency>, double> balances_t;
+ balances_t tBalances;
2.New feature - added new item in list of viewTrans (changes in mmcheckingpanel.cpp, optionsdialog.cpp).
So, the list will be like a
...
"View Today" <== new item
"View 30 days"
"View 90 days"
"View Last Month"
"View Current Month"
Often I want to see only entered today trunsactions. This changes makes it possible.
[ADDED] Patch for bug and new feature
Moderator: Renato
[ADDED] Patch for bug and new feature
- Attachments
-
- trunk_diffs.zip
- diffs of sources
- (82.42 KiB) Downloaded 659 times
Re: Patch for bug and new feature
Thanks Vadim, Patches checked in SVN Version 394.
-
- MMEX Developer
- Posts: 1535
- Joined: Sat Dec 06, 2008 2:27 pm
- Are you a spam bot?: No
- Location: Sankt-Petersburg, Russia
Re: [ADDED] Patch for bug and new feature
Thanks, Vadim.
But new bugs was added
1. Now in homepage I have 65425,86$
Wow, but really only 2100
(2100*31,16=65425,86)
2. Income vc Expenses: Current month became in $ but amount in Roubles.
And additionally. I have a stock account in $, but on home page it appears in the rubles.
But new bugs was added
1. Now in homepage I have 65425,86$
Wow, but really only 2100
(2100*31,16=65425,86)
2. Income vc Expenses: Current month became in $ but amount in Roubles.
And additionally. I have a stock account in $, but on home page it appears in the rubles.
Re: [ADDED] Patch for bug and new feature
Ouch!
Vadim, can you please fix these issues? I will need to pull out the home page patch till this is resolved. Thanks!
Vadim, can you please fix these issues? I will need to pull out the home page patch till this is resolved. Thanks!
Re: [ADDED] Patch for bug and new feature
I have six accounts and one Assets. My sums for four currencies are right. You can investigate this problem using your database.
P.S. By the way, I did not touch computing "Income vs Expenses: Current Month" values on home page.
P.S. By the way, I did not touch computing "Income vs Expenses: Current Month" values on home page.
Last edited by Vadim on Fri Aug 07, 2009 1:43 pm, edited 1 time in total.
-
- MMEX Developer
- Posts: 1535
- Joined: Sat Dec 06, 2008 2:27 pm
- Are you a spam bot?: No
- Location: Sankt-Petersburg, Russia
Re: Patch for bug and new feature
"View Today" <== new item
I can't translate it into russian
No a .po file is used.
I can't translate it into russian
No a .po file is used.
Re: Patch for bug and new feature
I have already translated new strings in russian.po If you generate russian.mo, all will be OK.Nikolay wrote:"View Today" <== new item
I can't translate it into russian
No a .po file is used.
Re: [ADDED] Patch for bug and new feature
I'll try to analyze what can be wrong in my changesNikolay wrote:Thanks, Vadim.
But new bugs was added
1. Now in homepage I have 65425,86$
Wow, but really only 2100
(2100*31,16=65425,86)
2. Income vc Expenses: Current month became in $ but amount in Roubles.
And additionally. I have a stock account in $, but on home page it appears in the rubles.
-
- MMEX Developer
- Posts: 1535
- Joined: Sat Dec 06, 2008 2:27 pm
- Are you a spam bot?: No
- Location: Sankt-Petersburg, Russia
Re: Patch for bug and new feature
Sample DB uploaded.
And when I switch mmex language to English Income vc Expenses become $.
When interface language is russian - Income vc Expenses back to roubles.
And when I switch mmex language to English Income vc Expenses become $.
When interface language is russian - Income vc Expenses back to roubles.
- Attachments
-
- homepagesample1.png
- (9.97 KiB) Downloaded 2826 times
-
- new5.zip
- (2.58 KiB) Downloaded 612 times
Re: Patch for bug and new feature
Thank you, I will investigate the problem. But I'm not shure that I fix this issue today.Nikolay wrote:Sample DB uploaded.