{template_event name="quiqqer::erpAccountingTemplate::header::begin" entityType=$entityType}
{assign var=Logo value=\QUI\ERP\Defaults::getLogo()}
{locale group="quiqqer/erp-accounting-templates" var="header" shopownerAdressShort=QUI\ERP\Defaults::getShortAddress()}
{if $Address} {$Address->getDisplay()} {/if}

{locale group="quiqqer/erp-accounting-templates" var="title.contract"}

{if $Customer} {if $Customer->getCustomerNo()} {else} {/if} {/if} {if $Editor && $Editor->getName() !== ''} {/if} {if $this->getContract()->getData('salesOrder')} {assign var=salesOrder value=$this->getContract()->getData('salesOrder')} {/if}
{locale group="quiqqer/erp-accounting-templates" var="body.id"} {$this->getPrefixedNumber()}
{locale group="quiqqer/erp-accounting-templates" var="body.date"} {$begin}
{locale group="quiqqer/erp-accounting-templates" var="body.customerId"}{$Customer->getCustomerNo()}{$Customer->getId()}
{locale group="quiqqer/erp-accounting-templates" var="body.editor"} {$Editor->getName()}
{locale group="quiqqer/erp-accounting-templates" var="body.salesOrder.id"} {erpGetPrefixedNumber assign=prefixedNumber var=$salesOrder} {$prefixedNumber}
{if isset($useShipping) && $useShipping}
{locale group="quiqqer/erp-accounting-templates" var="body.deliveryAddress"}:
{if $DeliveryAddress && $DeliveryAddress->getText() !== ''} {$DeliveryAddress->getText()} {else} {locale group="quiqqer/erp-accounting-templates" var="body.deliveryAddress_like_invoiceAddress"} {/if}
{/if}
{template_event name="quiqqer::erpAccountingTemplate::header::end" entityType=$entityType}