[ADDED] Patch for bug and new feature

Money Manager Ex Development related posts for both Android and Desktop

Moderator: Renato

Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

[ADDED] Patch for bug and new feature

Post by Vadim »

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 659 times
madhan
Site Admin
Posts: 99
Joined: Sun Nov 30, 2008 8:06 pm

Re: Patch for bug and new feature

Post by madhan »

Thanks Vadim, Patches checked in SVN Version 394.
Nikolay
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

Post by Nikolay »

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.
madhan
Site Admin
Posts: 99
Joined: Sun Nov 30, 2008 8:06 pm

Re: [ADDED] Patch for bug and new feature

Post by madhan »

Ouch!

Vadim, can you please fix these issues? I will need to pull out the home page patch till this is resolved. Thanks!
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: [ADDED] Patch for bug and new feature

Post by Vadim »

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 1:43 pm, edited 1 time in total.
Nikolay
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

Post by Nikolay »

"View Today" <== new item
I can't translate it into russian :(
No a .po file is used.
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Patch for bug and new feature

Post by Vadim »

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.
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: [ADDED] Patch for bug and new feature

Post by Vadim »

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 :-(
Nikolay
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

Post by Nikolay »

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 612 times
Vadim
Super MMEX User
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Patch for bug and new feature

Post by Vadim »

Nikolay wrote:Sample DB uploaded.
Thank you, I will investigate the problem. But I'm not shure that I fix this issue today.
Post Reply