From f9a0dd11e27b9d5b84387b01178464597f23c1ad Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Wed, 10 Jun 2020 15:36:22 +0200 Subject: [PATCH] outsource article_cost_summary and included it + metadata entry --- .../d3_article_costs_summary.tpl | 26 +++++++++++ .../views/tpl/documents/invoice/invoice.tpl | 46 ++++--------------- metadata.php | 1 + 3 files changed, 35 insertions(+), 38 deletions(-) create mode 100644 Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl diff --git a/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl new file mode 100644 index 0000000..a25ad8d --- /dev/null +++ b/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl @@ -0,0 +1,26 @@ +[{* ++++++Beschreibung der Kostensummierung++++++ *}] + +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
+ [{if $order->getFormattedDiscount() != 0}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
+ [{/if}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
+ [{foreach from=$productVats key=VatKey item=oVat}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+ [{/foreach}] +
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
+
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
+ +[{* ++++++Kostensummierung++++++ *}] + +
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
+ [{if $order->getFormattedDiscount() != 0}] +
-[{$order->getFormattedDiscount()}] [{$currency->name}]
+ [{/if}] +
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
+
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
+
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
+
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
+ \ No newline at end of file diff --git a/Application/views/tpl/documents/invoice/invoice.tpl b/Application/views/tpl/documents/invoice/invoice.tpl index e959f98..21d62bf 100644 --- a/Application/views/tpl/documents/invoice/invoice.tpl +++ b/Application/views/tpl/documents/invoice/invoice.tpl @@ -18,18 +18,13 @@ [{/block}] - [{* +++++ fold and punch marks +++++ *}] - [{block name="pdfDIN5008Markings"}] - [{include file="d3din5008.tpl"}] - [{/block}] - - [{* +++++ main page part +++++ *}] - [{block name="pdfHeadingFile"}] - [{block name="pdfHeaderFile"}] - [{include file="d3invoice_pdf_addressarea.tpl"}] + [{* +++++ main page part +++++ *}] + [{block name="pdfHeadingFile"}] + [{block name="pdfHeaderFile"}] + [{include file="d3invoice_pdf_addressarea.tpl"}] + [{/block}] [{/block}] - [{/block}] - [{* +++++Artikeltabelle+++++*}] + [{* +++++Artikeltabelle+++++*}] [{block name="articleListing"}] @@ -59,32 +54,7 @@
[{block name="d3_article_costs_summary"}] - [{* ++++++Beschreibung der Kostensummierung++++++ *}] - - [{* ++++++Kostensummierung++++++ *}] - + [{include file="d3_article_costs_summary.tpl"}] [{/block}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMBRUTTO"}]
- [{if $order->getFormattedDiscount() != 0}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DISCOUNT"}]
- [{/if}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_SUMNETTO"}]
- [{foreach from=$productVats key=VatKey item=oVat}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
- [{/foreach}] -
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_DELIVERY"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAX"}] [{$VatKey}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_PERCENTAGE"}] [{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TAXPERCVALUE"}]
-
[{oxmultilang ident="D3_ORDER_OVERVIEW_PDF_ORDERBILL_TOTALSUMBRUT"}]
-
-
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
- [{if $order->getFormattedDiscount() != 0}] -
-[{$order->getFormattedDiscount()}] [{$currency->name}]
- [{/if}] -
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
-
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
-
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
-
@@ -93,4 +63,4 @@ [{include file="d3invoice_pdf_conclusion.tpl"}] [{/block}] - \ No newline at end of file + diff --git a/metadata.php b/metadata.php index 9328a04..a3bad85 100644 --- a/metadata.php +++ b/metadata.php @@ -60,6 +60,7 @@ $aModule = [ 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', 'd3invoice_pdf_addressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfHeader.tpl', 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/pdfPastThank.tpl', + 'd3_article_costs_summary.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/includingFiles/d3_article_costs_summary.tpl', 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/header.tpl', 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/footer.tpl',