there is no decimal points have been sets for Iranian Rial currency which make it use default 2 digit decimal points which is wrong.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sepehr.sadatifar’s picture

Status: Active » Needs review
FileSize
816 bytes

Status: Needs review » Needs work

The last submitted patch, commerce-iranian-rial-2074141-0.patch, failed testing.

rszrama’s picture

Title: Iranian Rial currency decimals problem » Update the currency format for the Iranian Rial
Component: Other » Commerce
Category: bug » task

Looks like the patch failed b/c it uses a . instead of a ,. Can you point me to any Iranian eCommerce sites for currency formatting reference?

sepehr.sadatifar’s picture

oops! sry.
I think this is a good reference (see "E" column in "Active codes" table).

sepehr.sadatifar’s picture

Status: Needs work » Needs review
sepehr.sadatifar’s picture

a patch which covers both this issue and another issue with Iranian rial symbol character.

sepehr.sadatifar’s picture

@rszrama will this patch commited any soon?

rszrama’s picture

Wait, I don't understand - that Wikipedia page says the Iranian rial uses two decimal places. Any ideas why?

sepehr.sadatifar’s picture

Issue summary: View changes

@rszrama at the time of writing the comment it was 0 decimal points in wikipedia article (see here). after some digging it turned out that officially Iranian rial uses two decimal points which means it divides to a minor currency unit (dinar) which because rial itself has a very low value we don't even have a official paper money or coin for dinar in iran but we have an unofficial major unit (toman).
so if we want to be conformed with ISO 4217 we should have these corrections on current code:
1- use rial for major unit instead of toman which is an unoffical unit.
2- use dinar for minor unit.
I strongly suggest we don't use minor unit of `dinar` because believe me, even iranian people don't know it's the official minor unit of iran currency!
my preference is to use unofficial major unit of `toman` and minor unit of `rial` and have 0 for decimal points.

bojanz’s picture

Status: Needs review » Fixed

Validated #6 against CLDR, and committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.