Comments

jeremy’s picture

Status: Active » Postponed (maintainer needs more info)

What are you trying to switch? Are you simply trying to replace the "$" with another symbol? Per-client, or globally?

bavarian’s picture

basically ... changing the "$" with "SEK" ....

adiatis’s picture

I want to change it globally to euro symbol. How?

tisbris’s picture

search and replace '$' with 'xxx' inside support_timer.module

Homotechsual’s picture

Category: support » feature
Status: Postponed (maintainer needs more info) » Active

As this is obviously not a feature of the module I'd like to suggest that it be made into one.

Editing the module files will complicate updates.

Homotechsual’s picture

StatusFileSize
new10.39 KB

Attached patch adds a currency selector to the billing rate page. Currently this is performed with a select list however I'd not be opposed to turning it into a type field if that's deemed appropriate.

Current values are USD, GBP and EUR.

This patch patches three files in your module installation and is designed to be run against the current 7.x-1.x-dev or the 7.x-1.x branch in Git.

Homotechsual’s picture

StatusFileSize
new11.09 KB

Revised patch attached (I missed a line from the dev version it seems)

jeremy’s picture

Status: Active » Needs work

Please follow https://drupal.org/coding-standards -- consistently use spaces instead of tabs.

It would be better if the supported currencies were configurable, and if the default currency were configurable. Even if there's no admin interface for it.

Looking at your patch, it seems this could be accomplished rather trivially, by modifying this:

+		'#options' => array('$' => '$', '£' => '£', '€' => '€'),

Making it instead be a variable_get -- so someone could override this array in their settings.php. In this way, they could also change the default currency. Ideally we'd then also add a README.txt explaining how to configure this.

Sorry, I just merged in some code so your patch no longer applies -- please re-base.

jeremy’s picture

Title: billing currency in dollars » make currency configurable
Homotechsual’s picture

Title: make currency configurable » billing currency in dollars

I'm not sure about the settings.php route personally. For now I'll rebase this - but I'll look at opening this up so that it's configurable, maybe allow people to add to the list on the settings page or similar, or even make it an input box for a html currency symbol.

Homotechsual’s picture

Title: billing currency in dollars » Make currency configurable

Sorry bout the title change

Homotechsual’s picture

As far as I can see the most recent changes are only to the 6.x branch whereas this is a patch for the 7.x branch - I don't use D6 anywhere so I can't develop patches for it atm.

Edit: NVM - I can use git, honest!

Homotechsual’s picture

StatusFileSize
new9.31 KB

New patch against latest in 7.x-1.x :-)

I'll be working on making this more configurable over the next few days as time allows.

Homotechsual’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev

Changing branch/version.

Homotechsual’s picture

Still working on making this more configurable however this has taken a backseat to Support Views, Token and Dashboard development. It is still a priority so expect something to happen relatively soon.

cewoj’s picture

Issue summary: View changes

There is a lot undefined $currency and total['currency'] variables in the patch code - any clue ?