[ADDED] Patch for bug and new feature

37 posts
[ADDED] Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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.
Attachments
trunk_diffs.zip
diffs of sources
(82.42 KiB) Downloaded 243 times
Re: Patch for bug and new feature

madhan
Site Admin

Posts: 247
Joined: Sun Nov 30, 2008 2:06 pm
Thanks Vadim, Patches checked in SVN Version 394.
Re: [ADDED] Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2279
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
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.
Re: [ADDED] Patch for bug and new feature

madhan
Site Admin

Posts: 247
Joined: Sun Nov 30, 2008 2:06 pm
Ouch!

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

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
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.
Last edited by Vadim on Fri Aug 07, 2009 7:43 am, edited 1 time in total.
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2279
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
"View Today" <== new item
I can't translate it into russian :(
No a .po file is used.
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Nikolay wrote:"View Today" <== new item
I can't translate it into russian :(
No a .po file is used.


I have already translated new strings in russian.po :-) If you generate russian.mo, all will be OK.
Re: [ADDED] Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Nikolay 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.


I'll try to analyze what can be wrong in my changes :-(
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2279
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
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.
Attachments
homepagesample1.png
(9.97 KiB) Downloaded 2826 times
new5.zip
(2.58 KiB) Downloaded 226 times
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Nikolay wrote:Sample DB uploaded.

Thank you, I will investigate the problem. But I'm not shure that I fix this issue today.
Who is online

Users browsing this forum: No registered users and 2 guests

cron