{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content}

{$layout.pagetitle}

{$default_printpage = ConfigHelper::getConfig('invoices.default_printpage')}
{if $pagination->getTotal() != 0} {/if} {foreach $invoicelist as $invoice} {assign var=invoiceid value=$invoice.id} {number number=$invoice.number template=$invoice.template time=$invoice.cdate assign=number customerid=$invoice.customerid} {foreachelse} {/foreach} {if $pagination->getTotal() != 0} {/if}
{trans("ID:")} {if $listdata.order == "id"}{/if} {trans("Date:")} {if $listdata.order == "cdate"}{/if} {trans("Number:")} {if $listdata.order == "number"}{/if} {trans("Value:")} {if $listdata.order == "value"}{/if} {trans("Items:")} {if $listdata.order == "count"}{/if} {trans("For:")} {if $listdata.order == "name"}{/if}  
{trans("Filter:")}     {trans("Plan:")} {trans("Group:")}  »»»
{include file="pagination.html"} {button icon="add" label="New invoice" onclick="location.href = '?m=invoicenew{if $listdata.cat == 'customerid'}&customerid={$listdata.search}{/if}&action=init';"}
{$invoice.id|string_format:"%06d"} {$invoice.cdate|date_format:"%Y/%m/%d %H:%M"} {$number} {$invoice.value|money_format} {$invoice.count} {$invoice.name}, {$invoice.address}, {$invoice.zip} {$invoice.city}{if $invoice.country != ""}, {t}{$invoice.country}{/t}{/if} {foreach $invoice.customlinks as $link} {if isset($link.icon)}{$link.label}{else}{$link.label}{/if} {/foreach} {if $invoice.type == $smarty.const.DOC_INVOICE_PRO} {button type="link" icon="transform" href="?m=invoicenew&id={$invoice.id}&action=init" tip="Convert to invoice"} {/if} {if $invoice.sendinvoices && !$invoice.cancelled && ($invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_CNOTE || $invoice.type == $smarty.const.DOC_INVOICE_PRO)} {button type="link" icon="mail" class="send-invoice" href="?m=invoicesend&id={$invoice.id}" tip="Send invoice"} {/if} {if $invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_INVOICE_PRO || $invoice.type == $smarty.const.DOC_CNOTE} {if $invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_CNOTE} {if !$invoice.cancelled && ($invoice.type == $smarty.const.DOC_INVOICE || ($invoice.type == $smarty.const.DOC_CNOTE && !$invoice.referenced))} {button type="link" icon="correction" href="?m=invoicenote&id={$invoice.id}&action=init" tip="Revise"} {/if} {if ($invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_INVOICE_PRO) && !$invoice.closed && !$invoice.referenced && !$invoice.archived} {if !$invoice.published || ConfigHelper::checkPrivilege('published_document_modification')} {button type="link" icon="delete" class="delete-invoice" tip="Delete" href="?m=invoicedel&id={$invoice.id}"} {/if} {/if} {else} {button type="link" icon="delete" tip="Delete" class="delete-proforma-invoice" href="?m=invoicedel&id={$invoice.id}"} {/if} {/if} {if !$invoice.closed && !$invoice.archived} {if $invoice.type == $smarty.const.DOC_CNOTE} {if !$invoice.referenced && (!$invoice.published || ConfigHelper::checkPrivilege('published_document_modification'))} {button type="link" icon="delete" class="delete-invoice" tip="Delete" href="?m=invoicedel&id={$invoice.id}"} {/if} {/if} {if !$invoice.cancelled} {if ($invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_INVOICE_PRO)} {if $invoice.type == $smarty.const.DOC_INVOICE} {if !$invoice.referenced && (!$invoice.published || ConfigHelper::checkPrivilege('published_document_modification'))} {button type="link" icon="edit" href="?m=invoiceedit&id={$invoice.id}&action=edit" class="edit-invoice" tip="Edit"} {/if} {else} {button type="link" icon="edit" tip="Edit" href="?m=invoiceedit&id={$invoice.id}&action=edit{if $invoice.type == $smarty.const.DOC_INVOICE_PRO}&proforma=1{/if}"} {/if} {elseif $invoice.type == $smarty.const.DOC_CNOTE} {if !$invoice.referenced && (!$invoice.published || ConfigHelper::checkPrivilege('published_document_modification'))} {button type="link" icon="edit" tip="Edit" class="edit-invoice" href="?m=invoiceedit&id={$invoice.id}&action=edit"} {/if} {/if} {/if} {/if} {if !$invoice.cancelled} {if $invoice.type != $smarty.const.DOC_INVOICE_PRO && !$invoice.archived && !$invoice.referenced && (!$invoice.published || ConfigHelper::checkPrivilege('published_document_modification'))} {button type="link" icon="cancel" tip="Cancel" class="cancel-invoice" href="?m=invoicecancel&id={$invoice.id}"} {/if} {elseif $invoice.cancelled} {button type="link" icon="back" tip="Recover" href="?m=invoicecancel&id={$invoice.id}&recover=1" class="recover-invoice"} {/if} {if !$invoice.cancelled} {if $invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_CNOTE || $invoice.type == $smarty.const.DOC_INVOICE_PRO} {if !$invoice.archived} {if ConfigHelper::checkPrivilege('trade_document_archiving')} {button type="link" icon="archive" tip="Archive" href="?m=invoicearchive&id={$invoice.id}"} {/if} {else} {if ConfigHelper::checkPrivilege('trade_document_unarchiving')} {button type="link" icon="restore" tip="Unarchive" href="?m=invoiceunarchive&id={$invoice.id}"} {/if} {/if} {/if} {/if} {if $invoice.type == $smarty.const.DOC_INVOICE || $invoice.type == $smarty.const.DOC_INVOICE_PRO} {if $invoice.type == $smarty.const.DOC_INVOICE && (!$invoice.published || ConfigHelper::checkPrivilege('published_document_modification'))} {button type="link" icon="view" external=true href="?m=invoice&id={$invoice.id}&dontpublish=1"} {/if} {button type="link" icon="print" external=true href="?m=invoice&id={$invoice.id}"} {/if} {if $invoice.type == $smarty.const.DOC_CNOTE} {if !$invoice.published || ConfigHelper::checkPrivilege('published_document_modification')} {button type="link" icon="view" external=true href="?m=invoice&id={$invoice.id}&dontpublish=1"} {/if} {button type="link" icon="print" external=true href="?m=invoice&id={$invoice.id}"} {/if}

{trans("No such invoices in database.")}

{include file="pagination.html"} {button icon="add" label="New invoice" onclick="location.href = '?m=invoicenew{if $listdata.cat == 'customerid'}&customerid={$listdata.search}{/if}&action=init';"}
{if !$proforma} {button icon="cash" label="Check/Uncheck as accounted" id="account-invoices"} {/if} {button icon="mail" id="send-invoices" label="Send invoices"} {if ConfigHelper::checkPrivilege('trade_document_archiving')} {button icon="archive" id="archive-invoices" label="Archive"} {/if} {if ConfigHelper::checkPrivilege('trade_document_unarchiving')} {button icon="restore" id="unarchive-invoices" label="Unarchive"} {/if} {button icon="print" label="Print" id="print-invoices"}
{/block}