{$_logo = false} {if !empty($company.logo_url)} {$_logo = $company.logo_url} {/if} {if !empty($company.invoice_options) && !empty($company.invoice_options.color)} {$_color = $company.invoice_options.color} {/if}
{* LOGO *} {if !empty($_logo)} {/if}
{* AUTHOR *}

{ifempty($company.name, $invoice.company_id)|escape}

{if !empty($company.address)}

{$company.address|escape|nl2br}

{/if} {if !empty($company.phone)}

{$company.phone|escape}

{/if}

[`Invoice`]: [`#`]{$invoice.number|escape} [`issued on`] {$invoice.invoice_date|wa_date}

{strip} [`Provider`]: {ifempty($company.name, $invoice.company_id)|escape} {if !empty($company.address)}, {$company.address|escape|nl2br}{/if} {if !empty($company.phone)}, {$company.phone|escape}{/if} {/strip}

[`Billed To`]: {if $customer.company} {$customer.company|escape} {else} {$customer.name|escape} {/if} {$_city = $customer->get('address:city', 'default')} {if $_city}{$_city|escape}{/if}

{if !empty($invoice.due_date)}

{$invoice.due_date|wa_date}

{/if}
{$_subtotal = 0} {foreach $invoice.items as $_item} {$_item_total = ($_item.quantity * $_item.price)} {$_subtotal = $_subtotal + $_item_total} {/foreach} {if ($invoice.tax_type != "NONE")} {/if}
[`Product or service`] [`Qty`] [`Price`] {$invoice.tax_name} [`Amount`]
{$_item@iteration} {$_item.name|escape} {$_item.quantity|wa_format} {$_item.price|wa_format} {if ($_item.tax_type == "NONE")} [`without`] {$invoice.tax_name} {else} {$_item.tax_percent|floatval}% {/if} {$_item_total|wa_format}
[`Subtotal`] {$_subtotal|wa_format}
{$_type = ""} {if ($invoice.tax_type == "INCLUDE")} {$_type = "[`including`]"} {/if} {$_name = "[`tax`]"} {if !empty($invoice.tax_name)} {$_name = $invoice.tax_name} {/if} {if !empty($_type)}{$_type} {/if}{$_name|escape} {$invoice.tax_amount|wa_format}
[`Total`] {$invoice.amount|wa_format_amount_currency:$invoice.currency_id}
{if !empty($invoice.comment)}
[`Comment`]

{$invoice.comment|default:""}

{/if}