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

@@ -55,7 +55,7 @@ class Amount extends PPModel
public function setTotal($total)
{
NumericValidator::validate($total, "Total");
$total = FormatConverter::formatToTwoDecimalPlaces($total);
$total = FormatConverter::formatToPrice($total, $this->getCurrency());
$this->total = $total;
return $this;
}