Closed (fixed)
Project:
Community Accounting
Version:
6.x-2.5
Component:
Display
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 May 2013 at 16:27 UTC
Updated:
15 May 2013 at 17:57 UTC
I wanted to have one balance-ometer to every active currency, since I have more than one. If the player doesn't have any transaction with a currency, it displays nothing.
I just had to add these lines to mc_display.module lines 58 and 258. Perhaps this is also useful for anyone else.
// this foreach displays balance-o-meter for every active currency that the user has more or less than 0
$currencies = currencies_load();
foreach ($currencies as $cid){
$balances = mc_balances($account, $cid->nid);
if ($balances['cleared_balance'] != 0){
$balance_currencies .= show_balance_ometer($account, $cid->nid);
}
}
return array(
'subject' => t("@user's credit", array('@user' => strip_tags(theme('username', $account)))),
//'content' => show_balance_ometer($account, array_pop($edit['cids']))
'content' => $balance_currencies
Comments
Comment #1
matslats commentedthanks, yes multiple currencies isn't very well supported in 6
You are advised to upgrade to d7 now!