Use Symfony formatter for currency symbol placement (#542)

This commit is contained in:
Sanjit Patel
2019-02-08 10:56:47 -05:00
committed by Kevin Papst
parent b2587c71b8
commit 616d514d5a
12 changed files with 58 additions and 33 deletions

View File

@@ -60,7 +60,7 @@ abstract class AbstractRendererTest extends KernelTestCase
$languages = [
'en' => [
'date' => 'Y.m.d',
'duration' => '%%h:%%m h'
'duration' => '%h:%m h'
]
];
@@ -83,6 +83,7 @@ abstract class AbstractRendererTest extends KernelTestCase
protected function getInvoiceModel()
{
$customer = new Customer();
$customer->setCurrency('EUR');
$template = new InvoiceTemplate();
$template->setTitle('a test invoice template title');
$template->setVat(19);
@@ -194,6 +195,7 @@ abstract class AbstractRendererTest extends KernelTestCase
protected function getInvoiceModelOneEntry()
{
$customer = new Customer();
$customer->setCurrency('USD');
$template = new InvoiceTemplate();
$template->setTitle('a test invoice template title');
$template->setVat(19);

View File

@@ -36,8 +36,8 @@ class CsvRendererTest extends AbstractRendererTest
public function getTestModel()
{
yield [$this->getInvoiceModel(), '1,947.99', 6, 5, 1, 2, 2];
yield [$this->getInvoiceModelOneEntry(), '293.27', 2, 1, 0, 1, 0];
yield [$this->getInvoiceModel(), '€1,947.99', 6, 5, 1, 2, 2];
yield [$this->getInvoiceModelOneEntry(), '$293.27', 2, 1, 0, 1, 0];
}
/**

View File

@@ -100,6 +100,7 @@ class DebugRendererTest extends AbstractRendererTest
'entry.amount',
'entry.rate',
'entry.total',
'entry.currency',
'entry.duration',
'entry.duration_minutes',
'entry.begin',