{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}
{if $this->getInvoice()->getInvoiceType() === 5} {* 5 = TYPE_INVOICE_CANCEL *}

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

{else}

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

{/if} {if $Customer} {if $Customer->getCustomerNo()} {else} {/if} {/if} {if $Editor && $Editor->getName() !== ''} {/if} {if method_exists($this, 'getInvoice') && $this->getInvoice() && method_exists($this->getInvoice(), 'getData') && $this->getInvoice()->getData('contract') } {assign var=contract value=$this->getInvoice()->getData('contract')} {/if}
{locale group="quiqqer/erp-accounting-templates" var="body.id"} {$this->getId()}
{locale group="quiqqer/erp-accounting-templates" var="body.date"} {$dateFormatted}
{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.contract.id"} {erpGetPrefixedNumber assign=prefixedNumber var=$contract} {$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}