Template für den Lieferschein erzeugt

This commit is contained in:
BlubbFish 2020-04-14 18:47:28 +02:00
parent 195d77ad5f
commit 6439861042
2 changed files with 92 additions and 0 deletions

View File

View File

@ -0,0 +1,92 @@
{extends file='documents/index.tpl'}
{block name="document_index_head_bottom"}
<h1>{s name="DocumentIndexShippingNumber"}{/s} {$Document.id}</h1>
{s name="DocumentIndexPageCounter"}{/s}
{/block}
{block name="document_index_selectAdress"}
{assign var="address" value="shipping"}
{/block}
{block name="document_index_head_right"}
{$smarty.block.parent}
{if $Document.bid}{s name="DocumentIndexInvoiceID"}{/s} {$Document.bid}<br />{/if}
{/block}
{block name="document_index_table_header"}
<table cellpadding="0" cellspacing="0" width="100%">
<tbody valign="top">
<tr>
<td align="left" width="5%" class="head">
<strong>{s name="DocumentIndexHeadPosition"}{/s}</strong>
</td>
<td align="left" width="10%" class="head">
<strong>{s name="DocumentIndexHeadArticleID"}{/s}</strong>
</td>
<td align="left" width="62%" class="head">
<strong>{s name="DocumentIndexHeadName"}{/s}</strong>
</td>
<td align="right" width="5%" class="head">
<strong>{s name="DocumentIndexHeadQuantity"}{/s}</strong>
</td>
<td align="right" width="8%" class="head">
<strong>{s name="DocumentIndexHeadWeigt"}{/s}</strong>
</td>
<td align="right" width="10%" class="head">
<strong>{s name="DocumentIndexHeadADR"}{/s}</strong>
</td>
</tr>
{/block}
{assign var="totWeight" value="0"}
{assign var="cal_weight" value="0"}
{assign var="totADR" value="0"}
{block name="document_index_table_each"}
{if ($position.modus == 0 || $position.modus == 1) && $position.name != 'Versandkosten'}
<tr>
<td align="left" width="5%" valign="top">
{$number+1}
</td>
<td align="left" width="10%" valign="top">
{$position.articleordernumber|truncate:14:""}
</td>
<td align="left" width="62%" valign="top">
{s name="DocumentIndexPositionNameDefault"}{$position.name|nl2br|wordwrap:65:"<br />\n"}{/s}
{if $position.attr3 != ""}<br><strong>{s name="DocumentIndexEachHint"}{/s}</strong> {$position.attr3} {/if}
</td>
<td align="right" width="5%" valign="top">
{$position.quantity}
</td>
<td align="right" width="8%" valign="top">
{$cal_weight = $position.attr1 * $position.quantity}
{if $cal_weight < 1000}
{$cal_weight} g
{else}
{($cal_weight/1000)|string_format:"%.1f"} kg
{/if}
{$totWeight = $totWeight + $cal_weight}
</td>
<td align="right" width="10%" valign="top">
{$position.attr2 * $position.quantity} P.
{$totADR = $totADR + ($position.attr2 * $position.quantity)}
</td>
</tr>
{/if}
{/block}
{block name="document_index_amount"}
<div id="amount">
<table width="250px" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="right" width="150px"><strong>{s name="DocumentIndexTotalWeight"}{/s}:</strong></td>
<td align="right" width="100px">{($totWeight/1000)|string_format:"%.1f"} kg</td>
</tr>
<tr>
<td align="right"><strong>{s name="DocumentIndexTotalADR"}{/s}:</strong></td>
<td align="right">{$totADR} Punkte</td>
</tr>
</tbody>
</table>
</div>
{/block}