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); ?>

- ',array_filter([ - $buyername, - $buyeraddressline1, - $buyeraddressline2, - $buyeraddressline3, - $buyercounty . ' ' . $buyerpostcode . ' ' . $buyercity - ])); ?> +
+
+
+
+

- + Invoice

-

- - - - - - - - - - - - - - - - - - - -
Invoice dateDelivery dateInvoice noCustomer noReference
format("Y-m-d"); ?>format("Y-m-d") ?? $documentdate->format("Y-m-d");/*optional, filled by invoice date*/ ?>
+

+ Invoice Date format("d.m.Y"); ?>

Dear customer, @@ -274,7 +248,7 @@ -   + firstDocumentPositionTax()) { ?> diff --git a/src/template/german.tmpl b/src/template/german.tmpl deleted file mode 100644 index e7eb065..0000000 --- a/src/template/german.tmpl +++ /dev/null @@ -1,426 +0,0 @@ - - - - - - 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); - ?> -

- ',array_filter([ - $buyername, - $buyeraddressline1, - $buyeraddressline2, - $buyeraddressline3, - $buyercounty . ' ' . $buyerpostcode . ' ' . $buyercity - ])); ?> -

-

- -

-

- - - - - - - - - - - - - - - - - - - -
RechnungsdatumLieferdatumRechnungsnummerKundennummerKundenreferenz
format("Y-m-d"); ?>format("Y-m-d") ?? $documentdate->format("Y-m-d");/*optional, filled by invoice date*/ ?>
-

- getDocumentNotes($documentNotes); ?> - - - - - - - - - - - - - - - - - - firstDocumentPosition()) { - $isfirstposition = true; - do { - $document->getDocumentPositionGenerals($lineid, $linestatuscode, $linestatusreasoncode); - $document->getDocumentPositionProductDetails($prodname, $proddesc, $prodsellerid, $prodbuyerid, $prodglobalidtype, $prodglobalid); - $document->getDocumentPositionGrossPrice($grosspriceamount, $grosspricebasisquantity, $grosspricebasisquantityunitcode); - $document->getDocumentPositionNetPrice($netpriceamount, $netpricebasisquantity, $netpricebasisquantityunitcode); - $document->getDocumentPositionLineSummation($lineTotalAmount, $totalAllowanceChargeAmount); - $document->getDocumentPositionQuantity($billedquantity, $billedquantityunitcode, $chargeFreeQuantity, $chargeFreeQuantityunitcode, $packageQuantity, $packageQuantityunitcode); - ?> - firstDocumentPositionNote()) { ?> - - - - - nextDocumentPositionNote()); ?> - - - - - - - firstDocumentPositionTax()) { ?> - getDocumentPositionTax($categoryCode, $typeCode, $rateApplicablePercent, $calculatedAmount, $exemptionReason, $exemptionReasonCode); ?> - - - - - - firstDocumentPositionGrossPriceAllowanceCharge()) { ?> - - getDocumentPositionGrossPrice($grossAmount, $grossBasisQuantity, $grossBasisQuantityUnitCode); ?> - getDocumentPositionGrossPriceAllowanceCharge($actualAmount, $isCharge, $calculationPercent, $basisAmount, $reason, $taxTypeCode, $taxCategoryCode, $rateApplicablePercent, $sequence, $basisQuantity, $basisQuantityUnitCode, $reasonCode); ?> - - - - - - - nextDocumentPositionGrossPriceAllowanceCharge()); ?> - - - nextDocumentPosition()); ?> - - - - - firstDocumentAllowanceCharge()) { ?> - - - - - - - - - - getDocumentAllowanceCharge($actualAmount, $isCharge, $taxCategoryCode, $taxTypeCode, $rateApplicablePercent, $sequence, $calculationPercent, $basisAmount, $basisQuantity, $basisQuantityUnitCode, $reasonCode, $reason); ?> - - - - - - - - nextDocumentAllowanceCharge()); ?> - - - - - getDocumentSummation($grandTotalAmount, $duePayableAmount, $lineTotalAmount, $chargeTotalAmount, $allowanceTotalAmount, $taxBasisTotalAmount, $taxTotalAmount, $roundingAmount, $totalPrepaidAmount); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - firstDocumentTax()) { ?> - - - - - - - - - - - getDocumentTax($categoryCode, $typeCode, $basisAmount, $calculatedAmount, $rateApplicablePercent, $exemptionReason, $exemptionReasonCode, $lineTotalBasisAmount, $allowanceChargeBasisAmount, $taxPointDate, $dueDateTypeCode); ?> - - - - - - - - - nextDocumentTax()); ?> - - - - - - - - - - - firstDocumentPaymentTerms()) { ?> - - - - getDocumentPaymentTerm($description, $dueDate, $directDebitMandateID); ?> - - - - nextDocumentPaymentTerms()); ?> - - -
Pos.BezeichnungMengeEinzelpreisGesamtpreisSteuer
  - getDocumentPositionNote($posnoteContent, $posnoteContentCode, $posnoteSubjectCode); ?> - - -
  % 
   ()
 
 Nachlass/Gebühren
 
 
 Summe
 Netto
 Gebühren Gesamt
 Nachlass Gesamt
 Steuern
 Brutto Gesamt
 Bereits bezahlt
 Zahlbetrag
 
 Steuerübersicht
 %
 Gesamt
- -
- - \ No newline at end of file