{if $invoiceLogo|trim} {assign var=logowgs value=$invoiceLogo|trim} {else} {if $logo} {assign var=logowgs value=$logo} {else} {assign var=logowgs value="{$WEB_ROOT}/templates/{$template}/assets/images/login-logo.svg"} {/if} {/if} {assign var=colorArray value=['1'=>'','2'=>'yellow','3'=>'green','4'=>'pink']}
{if $invalidInvoiceIdRequested} {include file="$template/includes/panel.tpl" type="danger" headerTitle=$LANG.error bodyContent=$LANG.invoiceserror bodyTextCenter=true} {else}

{$LANG.viewInvoiceMainTitle}

{if $logowgs} {else}

{$companyname}

{/if}
{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}: {strtotime($datedue)|date_format:"%d-%m-%Y"}

{$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 $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.invoicesinvoicedto}:

{$clientsdetails.firstname} {$clientsdetails.lastname}

{if $clientsdetails.companyname}

{$LANG.clientareacompanyname}: {$clientsdetails.companyname}

{/if} {if $clientsdetails.phonenumber}

{$LANG.clientareaphonenumber}: {$clientsdetails.phonenumber}

{/if}

{$LANG.clientareaemail}: {$clientsdetails.email}

{$LANG.viewInvoiceAddress}: {$clientsdetails.address1}, {$clientsdetails.address2}, {$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}, {$clientsdetails.country}

{if $customfields} {foreach from=$customfields item=customfield}

{$customfield.fieldname}: {$customfield.value}

{/foreach} {/if}
  • {$LANG.viewInvoiceNumber}:
    #{$invoiceid}
    #
  • {$LANG.viewInvoiceDate}:
    {strtotime($date)|date_format:"%d-%m-%Y"}
    #
  • {$LANG.viewInvoiceTotalDue}:
    {$balance}
    #

{$LANG.paymentmethod}

{if $status eq "Unpaid" && $allowchangegateway}
{$gatewaydropdown}
{else} {$paymentmethod} {/if}
{if $manualapplycredit}

{$LANG.invoiceaddcreditapply}

{$LANG.invoiceaddcreditdesc1} {$totalcredit}. {$LANG.invoiceaddcreditdesc2}. {$LANG.invoiceaddcreditamount}:
{/if}
{$turns = 1} {foreach from=$invoiceitems item=item} {assign var=stringCount value= $item.description|strpos:'x'} {if $stringCount eq 2} {assign var=explodeDesc value="x"|explode:$item.description} {assign var=quant value=$explodeDesc.0} {else} {assign var=quant value=1} {/if} {if $turns == 4} {$turns = 1} {else} {$turns = $turns+1} {/if} {/foreach} {if $taxrate} {/if}
{$LANG.invoicesdescription} {$LANG.invoicestotal}
{$quant} {$item.description}{if $item.taxed eq "true"} *{/if} {$item.amount}

* {$LANG.invoicestaxindicator}

{$LANG.invoicespayto}

{$payto}

{$LANG.invoicessubtotal}-
{if $taxrate}
{$taxrate}% {$taxname}-
{/if} {if $taxrate2}
{$taxrate2}% {$taxname2}-
{/if}
{$LANG.invoicescredit}-
{$LANG.invoicestotal}
{$subtotal}
{if $taxrate}
{$tax}
{/if} {if $taxrate2}
{$tax2}
{/if}
{$credit}
{$total}
{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}
{/if}

{$LANG.invoicesbacktoclientarea}