[ADDED] Patch for bug and new feature

37 posts
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
I have found what is wrong. Your database has for US DOLLAR conversion to base rate = 31.653549 (Tools\Organize Currencies).
So, my changes are valid. But I think for all reports and " Income vs Expenses: Current Month" on home page we must calculate sums per each currency (or for database currency if we don't want to waste space on home page).
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2250
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
But it's nothing wrong!
I have Tools - Options - Others - Enable online currency update (Get data from European Central Bank)=Yes
Then "Tools - Online Update Currency Rate" has been done.
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Ok, I need more time to resolve this situation.
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
I have fixed this issue.

1.The program has default database currency. You can change one in Tools\Options\Generas Settings\Base currency.

2.Before my changes the program calculated "Total of Accounts:" as sum per every account
account.initialBalance + account.Balanse * account_currency."Conversion to base rate".

Thus, "Total of Accounts:" value always measured in default database currency.

In your case,
RUR -1p.
US_DOLLAR $ -1*31.65 (conversion to base rate of USD currency)

Expenses = 32.65p (1p + 31.65p)

Now I don't use conversion to base rate when calculates total sum per every currency.

3."Income vs Expenses: Current Month" values before my changes and now also use units of default currency.
When your default currency is RUR, these values will be XXX RUR.
When you switch default currency to USD, these values will be $XXX.
Attachments
trunk_diffs2.zip
(5.56 KiB) Downloaded 205 times
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2250
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Hi,

It's more better.
(1 EUR= 45.45 EUR; 1 USD=31.65 RUB)
45.45+31.65+1=78.1

I have added one stock investment account. It has been created in USD but it has been recalculated to RUB.

And now lacks the Total in base currency (as was before).

Samples attached.
Attachments
new6.zip
(2.68 KiB) Downloaded 198 times
1112009-08-08_211946.png
(9.87 KiB) Downloaded 2144 times
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2250
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Sample how it was before:
Attachments
homepagesample0.png
(13.38 KiB) Downloaded 2142 times
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Hi,
I reverted "Total". Now "Total" and "Total of Accounts" will be shown always.
Table "Currency - Summary" will be shown only when you have the same currency
in more than one account\asset\stock and balance for this account != 0.
Attachments
trunk_diff.zip
(6.85 KiB) Downloaded 363 times
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2250
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Hi,

Now this is an excellent and even better than I could wish for. Thank you very much.

A sample for the database in which the base currency is USD, and three accounts in RUB, EUR and USD.
Attachments
homepagesample2.png
(12.27 KiB) Downloaded 2133 times
Re: Patch for bug and new feature

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
And thanks to you! :-)
Re: Patch for bug and new feature

Nikolay
MMEX Developer

Posts: 2250
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Hi,

It seems that when there are no Assets the Table "Currency - Summary" does not appears.
Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron