{if $invalidInvoiceIdRequested} {include file="$template/includes/panel.tpl" type="danger" headerTitle=$LANG.error bodyContent=$LANG.invoiceserror bodyTextCenter=true} {else}
{if $logo}

{else}

{$companyname}

{/if}

{$pagetitle}

{if $status eq "Draft"} {$LANG.invoicesdraft} {elseif $status eq "Unpaid"} {$LANG.invoicesunpaid} {elseif $status eq "Paid"} {elseif $status eq "Refunded"} {$LANG.invoicesrefunded} {elseif $status eq "Cancelled"} {$LANG.invoicescancelled} {elseif $status eq "Collections"} {$LANG.invoicescollections} {elseif $status eq "Payment Pending"} {/if}
{if $status eq "Unpaid" || $status eq "Draft"}
{$LANG.invoicesdatedue}: {$datedue}
{$paymentbutton}
{/if}

{if $paymentSuccessAwaitingNotification} {include file="$template/includes/panel.tpl" type="success" headerTitle=$LANG.success bodyContent=$LANG.invoicePaymentSuccessAwaitingNotify bodyTextCenter=true} {elseif $paymentSuccess} {include file="$template/includes/panel.tpl" type="success" headerTitle=$LANG.success bodyContent=$LANG.invoicepaymentsuccessconfirmation bodyTextCenter=true} {elseif $paymentInititated} {include file="$template/includes/panel.tpl" type="info" headerTitle=$LANG.success bodyContent=$LANG.invoicePaymentInitiated bodyTextCenter=true} {elseif $pendingReview} {include file="$template/includes/panel.tpl" type="info" headerTitle=$LANG.success bodyContent=$LANG.invoicepaymentpendingreview bodyTextCenter=true} {elseif $paymentFailed} {include file="$template/includes/panel.tpl" type="danger" headerTitle=$LANG.error bodyContent=$LANG.invoicepaymentfailedconfirmation bodyTextCenter=true} {elseif $offlineReview} {include file="$template/includes/panel.tpl" type="info" headerTitle=$LANG.success bodyContent=$LANG.invoiceofflinepaid bodyTextCenter=true} {/if}
{$LANG.invoicespayto}
{$payto} {if $taxCode}
{$taxIdLabel}: {$taxCode}{/if}
{$LANG.invoicesinvoicedto}
{if $clientsdetails.companyname}{$clientsdetails.companyname}
{/if} {$clientsdetails.firstname} {$clientsdetails.lastname}
{$clientsdetails.address1}, {$clientsdetails.address2}
{$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}
{$clientsdetails.country} {if $clientsdetails.tax_id}
{$taxIdLabel}: {$clientsdetails.tax_id} {/if} {if $customfields}

{foreach from=$customfields item=customfield} {$customfield.fieldname}: {$customfield.value}
{/foreach} {/if}
{$LANG.paymentmethod}
{if $status eq "Unpaid" && $allowchangegateway}
{$gatewaydropdown}
{else} {$paymentmethod}{if $paymethoddisplayname} ({$paymethoddisplayname}){/if} {/if}


{$LANG.invoicesdatecreated}
{$date}


{if $manualapplycredit}

{$LANG.invoiceaddcreditapply}

{$LANG.invoiceaddcreditdesc1} {$totalcredit}. {$LANG.invoiceaddcreditdesc2}. {$LANG.invoiceaddcreditamount}:
{/if} {if $notes} {include file="$template/includes/panel.tpl" type="info" headerTitle=$LANG.invoicesnotes bodyContent=$notes} {/if}

{$LANG.invoicelineitems}

{foreach from=$invoiceitems item=item} {/foreach} {if $taxname} {/if} {if $taxname2} {/if}
{$LANG.invoicesdescription} {$LANG.invoicesamount}
{$item.description}{if $item.taxed eq "true"} *{/if} {$item.amount}
{$LANG.invoicessubtotal} {$subtotal}
{$taxrate}% {$taxname} {$tax}
{$taxrate2}% {$taxname2} {$tax2}
{$LANG.invoicescredit} {$credit}
{$LANG.invoicestotal} {$total}
{if $taxrate}

* {$LANG.invoicestaxindicator}

{/if}
{foreach from=$transactions item=transaction} {foreachelse} {/foreach}
{$LANG.invoicestransdate} {$LANG.invoicestransgateway} {$LANG.invoicestransid} {$LANG.invoicestransamount}
{$transaction.date} {$transaction.gateway} {$transaction.transid} {$transaction.amount}
{$LANG.invoicestransnonefound}
{$LANG.invoicesbalance} {$balance}
{$LANG.print} {$LANG.invoicesdownload}
{/if}

{$LANG.invoicesbacktoclientarea}