<#assign showShipping = order.shippingAddress?has_content && !order.pickup, showBilling = order.billingAddress?has_content && !order.sameShippingAndBilling, showBuyerShippingSection = showShipping || order.pickup, showInvoicePayment = order.invoicePayment?has_content, companyOrStoreName = (store.companyName?has_content)?then(store.companyName, store.name)>
${textLabels.invoiceLabel} #${titleInvoice}

Aquí Hay Elefante www.aquihayelefante.es NIF: B56293285 50007 Zaragoza España Tel: +34 604 210 654 info@aquihayelefante.es

Factura #${titleInvoice} <#if order.number?has_content> Número de pedido ${order.number} <#if invoice.dateCreated?has_content> Fecha ${invoice.dateCreated} <#else> Fecha ${order.dateCreated} <#if order.paymentMethod?has_content> Método de pago ${order.paymentMethod.name}

<#if order.orderComments?has_content>

Comentarios para el pedido ${order.orderComments}

<#if showInvoicePayment> <#if showBuyerShippingSection>
${textLabels.invoicePaymentTitle?replace("{date}", "${order.invoicePayment.paymentDueDate}")}
${textLabels.invoicePaymentAccountHolderName} ${order.invoicePayment.accountHolderName}
${textLabels.invoicePaymentBankName} ${order.invoicePayment.bankName}
${textLabels.invoicePaymentIban} ${order.invoicePayment.iban}
${textLabels.invoicePaymentBic} ${order.invoicePayment.bic}
${textLabels.invoicePaymentAmountDue} ${order.invoicePayment.amountDue}
${textLabels.invoicePaymentReferenceNumber} ${order.invoicePayment.referenceNumber}
${textLabels.invoicePaymentDescription?replace("{companyName}", "${companyOrStoreName}")}
<#if order.pickup>

${order.shippingMethod} ${order.pickupTime!} ${order.shippingAddress.name} ${order.shippingAddress.phone!} <@extrafieldsBySection order, "shipping_info"/>

<#elseif showShipping>
${textLabels.shipTo}
${order.shippingAddress.formattedHtml}
${order.shippingAddress.phone!}
<@extrafieldsBySection order, "shipping_info"/>
<#if order.deliveryDate?has_content>

${textLabels.deliveryDateTime} <#if order.deliveryTimeFrom?has_content && order.deliveryTimeTo?has_content> ${textLabels.deliveryDateTimeInterval?replace("{date}", "${order.deliveryDate}")?replace("{timeFrom}", "${order.deliveryTimeFrom}")?replace("{timeTo}", "${order.deliveryTimeTo}")} <#else> ${textLabels.deliveryDateOnly?replace("{date}", "${order.deliveryDate}")}

colspan="2">
Facturar a
<#if showBilling> ${order.billingAddress.formattedHtml}
${order.billingAddress.phone!}
<#if order.customerFiscalCode?has_content>
${textLabels.fiscalCode} ${order.customerFiscalCode}
<#if order.customerTaxId?has_content>
${textLabels.taxId} ${order.customerTaxId}
${customer.email}
<@extrafieldsBySection order, "billing_info"/>
<#if order.items[0].taxes?has_content><#list order.items[0].taxes as tax> <#list order.items as orderItem> <#if orderItem.taxes?has_content><#list orderItem.taxes as tax> <#if order.shippingMethod?has_content && !order.pickup> <#if order.shipping.taxes?has_content><#list order.shipping.taxes as tax>

${textLabels.items}

${textLabels.price}

${textLabels.quantity}

${tax.name!}

${textLabels.subtotal}

${orderItem.name} ${textLabels.sku} ${orderItem.sku} <#list orderItem.options as option> ${option.name}: ${option.value?html}

${orderItem.price}

${orderItem.quantity}

<#if tax.percentValue?has_content>${tax.percentValue}

${orderItem.subtotal}

${order.shippingMethod.name} ${order.shippingMethod.estimatedTransitTime}

${order.shipping.cost}

<#if tax.percentValue?has_content>${tax.percentValue}

${order.shipping.cost}

<#if true && store.taxFreeBusiness> <#elseif order.reversedTaxApplied || order.customerTaxExempt>

<#if order.couponCode?has_content> ${order.couponName}: ${order.couponCode}

<#if order.shippingMethod?has_content> <#if !order.pickup> <#if order.pricesIncludeTax><#else> <#if order.handlingFee?has_content> <#if !order.pricesIncludeTax && order.taxes?has_content><#list order.taxes as tax> <#elseif !order.pricesIncludeTax && store.taxFreeBusiness == false && order.reversedTaxApplied == false && order.customerTaxExempt == false> <#list order.surcharges as surcharge><#if surcharge.visible> <#if order.discounts?has_content><#list order.discounts as discount> <#if order.giftCardRedemption?has_content> <#if order.pricesIncludeTax && order.taxes?has_content> <#list order.taxes as tax> <#if order.taxes?size gt 1>
${textLabels.items} ${order.subtotal}
${textLabels.shipping} ${order.shipping.cost} ${order.shipping.costWithoutTax}
${order.handlingFee.name} ${order.handlingFee.value}
${tax.name} ${tax.value}
${textLabels.vat} ${order.zeroVat}
${surcharge.titleTranslated} ${surcharge.totalValue}
${discount.name} -${discount.value}
${order.giftCardRedemption.name} -${order.giftCardRedemption.value}
${textLabels.totalWithoutTax} ${order.totalWithoutTax}
${tax.name} ${tax.value}
${textLabels.totalTax} ${order.totalTax}
${textLabels.total} ${order.total}
${textLabels.taxFreeBusiness}
<#if order.reversedTaxApplied>${textLabels.vatReverseCharge}<#elseif order.customerTaxExempt>${textLabels.taxExempted}