Skip to content

Commit

Permalink
fix turoiso template
Browse files Browse the repository at this point in the history
  • Loading branch information
MartkCz committed May 4, 2022
1 parent 8805d77 commit a2e198a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Templates/Translator/TuroisoTemplateTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ final class TuroisoTemplateTranslator extends Translator
public function __construct(string $lang = 'en')
{
$this->addLanguage('en', [
'Invoice' => 'Invoice',
'Payment' => 'Payment',
'Invoice' => 'INVOICE',
'Payment' => 'PAYMENT',
'Total price' => 'Total price',
'Customer' => 'Customer',
'Customer' => 'CUSTOMER',
'Item' => 'Item',
'ID' => 'ID',
'Price per item' => 'Price per item',
Expand Down
7 changes: 3 additions & 4 deletions src/Templates/templates/turoiso.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use WebChemistry\SvgPdf\Utility\TemplateUtility;

/** @var $this TuroisoTemplate */
/** @var $template TuroisoTemplateObject */
$formatMoney = $template->formatMoneyCallback();
$order = $template->getOrder();
$payment = $order->getPayment();

Expand Down Expand Up @@ -53,12 +52,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
<text x="424" y="<?= $y ?>" font-size="7" fill="<?= $template->colors['white'] ?>" text-anchor="end"><?= TemplateUtility::escape($item) ?></text>
<?php endforeach; ?>

<text x="434" y="<?= $y->centerPosition(-2) ?>" font-size="19" fill="<?= $template->colors['white'] ?>" font-weight="bold"><?= TemplateUtility::escape(mb_strtoupper($template->translate('Invoice'))) ?></text>
<text x="434" y="<?= $y->centerPosition(-2) ?>" font-size="19" fill="<?= $template->colors['white'] ?>" font-weight="bold"><?= TemplateUtility::escape($template->translate('Invoice')) ?></text>
<!-- / Header text right -->

<!-- Subheader left -->
<?php $catcher = TemplateUtility::createMaxWidthCatcher($this->getRenderer(), $width); $catcher->start(); ?>
<text x="33" y="175" font-size="16" font-weight="bold" fill="<?= $template->colors['primary'] ?>"><?= TemplateUtility::escape(mb_strtoupper($template->translate('Customer'))) ?></text>
<text x="33" y="175" font-size="16" font-weight="bold" fill="<?= $template->colors['primary'] ?>"><?= TemplateUtility::escape($template->translate('Customer')) ?></text>
<?= $catcher->endAndGetContent() ?>

<?php
Expand All @@ -77,7 +76,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';

<!-- Subheader right -->
<?php $x = 350 ?>
<text x="<?= $x ?>" y="175" font-size="16" font-weight="bold" fill="<?= $template->colors['primary'] ?>"><?= TemplateUtility::escape(mb_strtoupper($template->translate('Payment'))) ?></text>
<text x="<?= $x ?>" y="175" font-size="16" font-weight="bold" fill="<?= $template->colors['primary'] ?>"><?= TemplateUtility::escape($template->translate('Payment')) ?></text>

<?php $y = 182; ?>
<polygon points="<?= $x - 10 ?>,<?= $y ?> <?= $x - 10 ?>,<?= $y + 10 ?> <?= $x + 2 ?>,<?= $y + 2 ?> <?= $width ?>,<?= $y + 2 ?> <?= $width ?>,<?= $y ?>" fill="<?= $template->colors['primary'] ?>" />
Expand Down

0 comments on commit a2e198a

Please sign in to comment.