Skip to content

Commit

Permalink
Revert "fix translation"
Browse files Browse the repository at this point in the history
Revert "added german translation and basic transform code for units"
  • Loading branch information
HorstOeko committed Dec 18, 2024
1 parent 4993324 commit e11156a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 576 deletions.
2 changes: 1 addition & 1 deletion src/ZugferdVisualizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private function testTemplateIsSet(): void
private function testTemplateExists(): void
{
if (!$this->renderer->templateExists($this->template)) {
throw new ZugferdVisualizerNoTemplateNotExistsException($this->template);
throw new ZugferdVisualizerNoTemplateNotExistsException();
}
}

Expand Down
26 changes: 0 additions & 26 deletions src/contracts/ZugferdVisualizerCodelistTransform.php

This file was deleted.

48 changes: 0 additions & 48 deletions src/renderer/ZugferdVisualizerDefaultTransformer.php

This file was deleted.

39 changes: 0 additions & 39 deletions src/renderer/ZugferdVisualizerGermanTransformer.php

This file was deleted.

46 changes: 10 additions & 36 deletions src/template/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
}
table.postable th {
padding-bottom: 10px;
text-align:left;
}
table.postable td.posno,
table.postable th.posno {
Expand Down Expand Up @@ -184,47 +183,22 @@
</head>
<body>
<?php
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $invoiceCurrency, $taxCurrency, $documentname, $documentlanguage, $effectiveSpecifiedPeriod);
$document->getDocumentInformation($documentno, $documenttypecode, $documentdate, $invoiceCurrency, $taxCurrency, $documentname, $documentlanguage, $effectiveSpecifiedPeriod);
$document->getDocumentBuyer($buyername, $buyerids, $buyerdescription);
$document->getDocumentBuyerAddress($buyeraddressline1, $buyeraddressline2, $buyeraddressline3, $buyerpostcode, $buyercity, $buyercounty, $buyersubdivision);
$document->getDocumentBuyerOrderReferencedDocument($bt13,$btX147);
//leitwegeID bt10
$document->getDocumentBuyerReference($buyerRef);
$document->getDocumentSupplyChainEvent($bt72);
?>
<p>
<?= implode('<br/>',array_filter([
$buyername,
$buyeraddressline1,
$buyeraddressline2,
$buyeraddressline3,
$buyercounty . ' ' . $buyerpostcode . ' ' . $buyercity
])); ?>
<?php echo $buyername; ?><br>
<?php if ($buyeraddressline1) { ?><?php echo $buyeraddressline1; ?><br><?php } ?>
<?php if ($buyeraddressline2) { ?><?php echo $buyeraddressline2; ?><br><?php } ?>
<?php if ($buyeraddressline3) { ?><?php echo $buyeraddressline3; ?><br><?php } ?>
<?php echo $buyercounty . " " . $buyerpostcode . " " . $buyercity; ?><br>
</p>
<h1 style="margin: 0; padding: 0; margin-top: 50px">
<?= \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultTransformer::transformDocTypeCode($documenttypecode); ?>
Invoice <?php echo $documentno; ?>
</h1>
<p>
<table class="postable">
<thead>
<tr>
<th>Invoice date</th>
<th>Delivery date</th>
<th>Invoice no</th>
<th>Customer no</th>
<th>Reference</th>
</tr>
</thead>
<tbody>
<tr>
<td><?= $documentdate->format("Y-m-d"); ?></td>
<td><?= $bt72?->format("Y-m-d") ?? $documentdate->format("Y-m-d");/*optional, filled by invoice date*/ ?></td>
<td><?= $documentno; ?></td>
<td><?= implode(', ',$buyerids); ?></td>
<td><?= $buyerRef . $bt13; ?></td>
</tr>
</tbody>
</table>
<p style="margin: 0; padding: 0">
Invoice Date <?php echo $documentdate->format("d.m.Y"); ?>
</p>
<p style="margin-top: 50px" class="bold">
Dear customer,
Expand Down Expand Up @@ -274,7 +248,7 @@
<tr>
<td class="posno<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo $lineid; ?></td>
<td class="posdesc<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo $prodname; ?></td>
<td class="posqty<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo $billedquantity; ?>&nbsp;<?= \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultTransformer::transformUnit($billedquantityunitcode) ?></td>
<td class="posqty<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo $billedquantity; ?> <?php echo $billedquantityunitcode ?></td>
<td class="posunitprice<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo number_format($netpriceamount, 2); ?> <?php echo $invoiceCurrency; ?></td>
<td class="poslineamount<?php echo $isfirstposition ? ' space' : '' ?>"><?php echo number_format($lineTotalAmount, 2); ?> <?php echo $invoiceCurrency; ?></td>
<?php if ($document->firstDocumentPositionTax()) { ?>
Expand Down
Loading

0 comments on commit e11156a

Please sign in to comment.