change HTML structure for article costs area

This commit is contained in:
Daniel Seifert 2020-06-30 23:14:26 +02:00
parent 2f1c256779
commit 2cf6ce6f4f
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
3 changed files with 84 additions and 67 deletions

View File

@ -1,54 +1,73 @@
<td class="description"> [{block name="sumbrutto"}]
<div class="sumbrutto"> <tr class="sumbrutto">
[{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}] <td class="description">
</div> [{oxmultilang ident="D3_PDFDOCUMENTS_SUMBRUTTO" suffix="COLON"}]
</td>
<td class="values">
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}]
</td>
</tr>
[{/block}]
[{block name="discount"}]
[{if $order->getFormattedDiscount() != 0}] [{if $order->getFormattedDiscount() != 0}]
<div class="discount"> <tr class="discount">
[{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}] <td class="description">
</div> [{oxmultilang ident="D3_PDFDOCUMENTS_DISCOUNT" suffix="COLON"}]
</td>
<td class="values">
-[{$order->getFormattedDiscount()}] [{$currency->name}]
</td>
</tr>
[{/if}] [{/if}]
<div class="sumnetto"> [{/block}]
[{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}] [{block name="sumnetto"}]
</div> <tr class="sumnetto">
<td class="description">
[{oxmultilang ident="D3_PDFDOCUMENTS_SUMNETTO" suffix="COLON"}]
</td>
<td class="values">
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
</td>
</tr>
[{/block}]
[{block name="producttax"}]
[{foreach from=$productVats key=VatKey item=oVat}] [{foreach from=$productVats key=VatKey item=oVat}]
<div class="producttax"> <tr class="producttax">
[{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] <td class="description">
</div> [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}]
</td>
<td class="values">
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
</td>
</tr>
[{/foreach}] [{/foreach}]
<div class="delivery"> [{/block}]
[{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}] [{block name="delivery"}]
</div> <tr class="delivery">
<div class="deliverytax"> <td class="description">
[{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}] [{oxmultilang ident="D3_PDFDOCUMENTS_DELIVERY" suffix="COLON"}]
</div> </td>
<div class="totalsum"> <td class="values">
[{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}] [{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
</div> </td>
</td> </tr>
<td class="values"> <tr class="deliverytax">
<div class="sumbrutto"> <td class="description">
[{$order->getFormattedTotalBrutSum()}] [{$currency->name}] [{oxmultilang ident="D3_PDFDOCUMENTS_TAX" args=$VatKey suffix="COLON"}]
</div> </td>
[{if $order->getFormattedDiscount() != 0}] <td class="values">
<div class="discount"> [{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
-[{$order->getFormattedDiscount()}] [{$currency->name}] </td>
</div> </tr>
[{/if}] [{/block}]
<div class="sumnetto">
[{$order->getFormattedTotalNetSum()}] [{$currency->name}]
</div>
[{* ToDo: kein foreach wie oben ??? *}]
<div class="producttax">
[{$lang->formatCurrency($oVat, $currency)}] [{$currency->name}]
</div>
<div class="delivery">
[{$lang->formatCurrency($deliveryPrice->getNettoPrice(), $currency)}] [{$currency->name}]
</div>
<div class="deliverytax">
[{$lang->formatCurrency($deliveryPrice->getVATValue(), $currency)}] [{$currency->name}]
</div>
[{* ToDo: keine payment costs ??? *}] [{* ToDo: keine payment costs ??? *}]
<div class="totalsum"> [{block name="totalsum"}]
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}] <tr class="totalsum">
</div> <td class="description">
</td> [{oxmultilang ident="D3_PDFDOCUMENTS_TOTALSUMBRUT" suffix="COLON"}]
</td>
<td class="values">
[{$order->getFormattedTotalOrderSum()}] [{$currency->name}]
</td>
</tr>
[{/block}]

View File

@ -126,11 +126,9 @@
[{if $showPrices}] [{if $showPrices}]
[{block name="articleCosts"}] [{block name="articleCosts"}]
<table class="article_costs_table"> <table class="article_costs_table">
<tr> [{block name="d3_article_costs_summary"}]
[{block name="d3_article_costs_summary"}] [{include file="d3pdfarticlecostsummary.tpl"}]
[{include file="d3pdfarticlecostsummary.tpl"}] [{/block}]
[{/block}]
</tr>
</table> </table>
[{/block}] [{/block}]
[{/if}] [{/if}]

View File

@ -153,35 +153,35 @@ table{
.article_costs_table{ .article_costs_table{
width: 100%; width: 100%;
border-top: solid 0.15mm #000; padding-left: 300px;
border-bottom: solid 0.15mm #000; border-spacing: 0;
border-collapse: collapse;
} }
.article_costs_table .description { .article_costs_table .description {
padding-right: -3px; padding-right: -3px;
width: 70%; width: 70%;
} }
.article_costs_table div { .article_costs_table td {
padding-bottom: 5px; padding-bottom: 5px;
padding-top: 5px; padding-top: 5px;
font-size: 12px; font-size: 12px;
} }
.article_costs_table .description div {
margin-left: 300px;
}
.article_costs_table .values { .article_costs_table .values {
width: 30%; width: 30%;
}
.article_costs_table .values div {
margin-right: -2.2px; margin-right: -2.2px;
text-align: right; text-align: right;
} }
.article_costs_table .sumbrutto, .article_costs_table .sumbrutto td {
.article_costs_table .discount, border-top: solid 0.15mm #000;
.article_costs_table .producttax, }
.article_costs_table .deliverytax { .article_costs_table .sumbrutto td,
.article_costs_table .discount td,
.article_costs_table .producttax td,
.article_costs_table .deliverytax td,
.article_costs_table .totalsum td {
border-bottom: solid 0.15mm #000; border-bottom: solid 0.15mm #000;
} }
.article_costs_table .totalsum { .article_costs_table .totalsum td {
font-weight: bold; font-weight: bold;
} }