diff --git a/src/ZugferdVisualizer.php b/src/ZugferdVisualizer.php index 3700fef..80685d8 100644 --- a/src/ZugferdVisualizer.php +++ b/src/ZugferdVisualizer.php @@ -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(); } } diff --git a/src/contracts/ZugferdVisualizerCodelistTransform.php b/src/contracts/ZugferdVisualizerCodelistTransform.php deleted file mode 100644 index f32373b..0000000 --- a/src/contracts/ZugferdVisualizerCodelistTransform.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/horstoeko/zugferdvisualizer - */ -interface ZugferdVisualizerCodelistTransform{ - - public static function transformDocTypeCode(string $code): string; - - public static function transformUnit(string $unitCode): string; -} diff --git a/src/renderer/ZugferdVisualizerDefaultTransformer.php b/src/renderer/ZugferdVisualizerDefaultTransformer.php deleted file mode 100644 index 1b11137..0000000 --- a/src/renderer/ZugferdVisualizerDefaultTransformer.php +++ /dev/null @@ -1,48 +0,0 @@ - 'Invoice', - ZugferdInvoiceType::CORRECTION => 'Corrected Invoice', - ZugferdInvoiceType::CREDITNOTE => 'Credit note', - ZugferdInvoiceType::PREPAYMENTINVOICE => 'Prepaid invoice', - default => 'Unknown: ' . $code, - }; - } - - public static function transformUnit(string $unitCode): string{ - return match($unitCode){ - ZugferdUnitCodes::REC20_PIECE, - ZugferdUnitCodes::REC21_PIECE => 'pc', - ZugferdUnitCodes::REC20_KILOGRAM => 'kg', - ZugferdUnitCodes::REC20_LITRE => 'l', - ZugferdUnitCodes::REC20_SQUARE_METRE => 'm2', - ZugferdUnitCodes::REC20_ONE => '', - default => '??(' . $unitCode . ')', - }; - } -} diff --git a/src/renderer/ZugferdVisualizerGermanTransformer.php b/src/renderer/ZugferdVisualizerGermanTransformer.php deleted file mode 100644 index 51214ee..0000000 --- a/src/renderer/ZugferdVisualizerGermanTransformer.php +++ /dev/null @@ -1,39 +0,0 @@ - 'Rechnung', - ZugferdInvoiceType::CORRECTION => 'Rechnungskorrektur', - ZugferdInvoiceType::CREDITNOTE => 'Gutschrift', - ZugferdInvoiceType::PREPAYMENTINVOICE => 'Prepaid invoice', - default => 'Unbekannt: ' . $code, - }; - } -} diff --git a/src/template/default.tmpl b/src/template/default.tmpl index e644097..1ac8391 100644 --- a/src/template/default.tmpl +++ b/src/template/default.tmpl @@ -41,7 +41,6 @@ } table.postable th { padding-bottom: 10px; - text-align:left; } table.postable td.posno, table.postable th.posno { @@ -184,47 +183,22 @@
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); ?>
- = implode('
',array_filter([
- $buyername,
- $buyeraddressline1,
- $buyeraddressline2,
- $buyeraddressline3,
- $buyercounty . ' ' . $buyerpostcode . ' ' . $buyercity
- ])); ?>
+
+
+
+
+
-
Invoice date | -Delivery date | -Invoice no | -Customer no | -Reference | -
---|---|---|---|---|
= $documentdate->format("Y-m-d"); ?> | -= $bt72?->format("Y-m-d") ?? $documentdate->format("Y-m-d");/*optional, filled by invoice date*/ ?> | -= $documentno; ?> | -= implode(', ',$buyerids); ?> | -= $buyerRef . $bt13; ?> | -
+ Invoice Date format("d.m.Y"); ?>
Dear customer, @@ -274,7 +248,7 @@
- = implode('
',array_filter([
- $buyername,
- $buyeraddressline1,
- $buyeraddressline2,
- $buyeraddressline3,
- $buyercounty . ' ' . $buyerpostcode . ' ' . $buyercity
- ])); ?>
-
-
Rechnungsdatum | -Lieferdatum | -Rechnungsnummer | -Kundennummer | -Kundenreferenz | -
---|---|---|---|---|
= $documentdate->format("Y-m-d"); ?> | -= $bt72?->format("Y-m-d") ?? $documentdate->format("Y-m-d");/*optional, filled by invoice date*/ ?> | -= $documentno; ?> | -= implode(', ',$buyerids); ?> | -= $buyerRef . $bt13; ?> | -
Pos. | -Bezeichnung | -Menge | -Einzelpreis | -Gesamtpreis | -Steuer | -|
---|---|---|---|---|---|---|
- | - getDocumentPositionNote($posnoteContent, $posnoteContentCode, $posnoteSubjectCode); ?> - - - | -|||||
- | - | = \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerGermanTransformer::transformUnit($billedquantityunitcode) ?> | -- | - firstDocumentPositionTax()) { ?> - getDocumentPositionTax($categoryCode, $typeCode, $rateApplicablePercent, $calculatedAmount, $exemptionReason, $exemptionReasonCode); ?> - | % | - -- - |
- | - | - | () | -|||
- | ||||||
- | Nachlass/Gebühren | -|||||
- | - | - | - | |||
- | ||||||
- | Summe | -|||||
- | Netto | -- | ||||
- | Gebühren Gesamt | -- | ||||
- | Nachlass Gesamt | -- | ||||
- | Steuern | -- | ||||
- | Brutto Gesamt | -- | ||||
- | Bereits bezahlt | -- | ||||
- | Zahlbetrag | -- | ||||
- | ||||||
- | Steuerübersicht | -|||||
- | % | -- | - | |||
- | Gesamt | -- | - | |||
- - | -