{template_event name="quiqqer::erpAccountingTemplate::header::begin" entityType=$entityType}
{assign var=Logo value=\QUI\ERP\Defaults::getLogo()} {if !empty($epcQrCodeImageSrc)}
{locale group="quiqqer/erp-accounting-templates" var="epcQrCode.info"}
{/if}
{locale group="quiqqer/erp-accounting-templates" var="header" shopownerAdressShort=QUI\ERP\Defaults::getShortAddress()}
{if $Address} {$Address->getDisplay()} {/if}
{if method_exists($this, 'isDraft') && $this->isDraft()}

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

{else}

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

{/if} {if $Customer} {if $Customer->getCustomerNo()} {else} {/if} {/if} {if !empty($orderNumber)} {/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} {if method_exists($this, 'getInvoice') && $this->getInvoice() && method_exists($this->getInvoice(), 'getData') && $this->getInvoice()->getData('salesOrder') } {assign var=salesOrder value=$this->getInvoice()->getData('salesOrder')} {if isset($salesOrder.uuid)} {assign var=hash value=$salesOrder.uuid} {/if} {if isset($salesOrder.hash)} {assign var=hash value=$salesOrder.hash} {/if} {/if} {if method_exists($this, 'getInvoice') && $this->getInvoice() && method_exists($this->getInvoice(), 'getData') && $this->getInvoice()->getData('offer') } {assign var=offer value=$this->getInvoice()->getData('offer')} {/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.orderNumber"} {$orderNumber}
{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.id} {$prefixedNumber} >
{locale group="quiqqer/erp-accounting-templates" var="body.salesOrder.id"} {erpGetPrefixedNumber assign=prefixedNumber var=$hash} {$prefixedNumber}
{locale group="quiqqer/erp-accounting-templates" var="body.offer"} {erpGetPrefixedNumber assign=prefixedNumber var=$offer} {$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}