Updated FormatConverter to Format Price based on Currency (if provided)

- Fixes #176 Issue
- Renamed formatToTwoDecimalPlaces to formatToNumber
This commit is contained in:
japatel
2014-12-08 17:11:33 -06:00
parent 8bb80cb843
commit 7c4a16ca3d
8 changed files with 106 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ class Currency extends PPModel
public function setValue($value)
{
NumericValidator::validate($value, "Value");
$value = FormatConverter::formatToTwoDecimalPlaces($value);
$value = FormatConverter::formatToPrice($value, $this->getCurrency());
$this->value = $value;
return $this;
}