129 lines
5.7 KiB
Smarty
129 lines
5.7 KiB
Smarty
{*
|
|
* 2012 Firmes
|
|
* Mechanizmy obsługi rozszerzenia FirmesLink B2B
|
|
* Obsluga wyswietlania historii dokumentow
|
|
*}
|
|
|
|
{extends file='page.tpl'}
|
|
|
|
{block name="page_content"}
|
|
|
|
<div id="firmesb2b_block_documents">
|
|
|
|
<header class="page-header">
|
|
<h1 class="page-heading">{l s='Historia faktur i płatności' mod='firmesb2b'}</h1>
|
|
</header>
|
|
|
|
|
|
{if $B2Bdocuments}
|
|
|
|
|
|
<table class="table table-striped table-bordered table-labeled hidden-sm-down">
|
|
<thead class="thead-default">
|
|
<tr>
|
|
<th class="first_item">{l s='Dokument' mod='firmesb2b'}</th>
|
|
<th class="item">{l s='Data' mod='firmesb2b'}</th>
|
|
<th class="item">{l s='Netto' mod='firmesb2b'}</th>
|
|
<th class="item">{l s='Brutto' mod='firmesb2b'}</th>
|
|
<th class="item">{l s='Termin' mod='firmesb2b'}</th>
|
|
<th class="last_item">{l s='Do zapłaty' mod='firmesb2b'}</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
|
|
{foreach from=$B2Bdocuments item=document name=myLoop}
|
|
<tr class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if} {if $smarty.foreach.myLoop.index % 2}alternate_item{/if}">
|
|
<td class="b2b_number">
|
|
|
|
<a class="b2b_document_link" href="{$link->getModuleLink('firmesb2b', 'documents', ['id' => $document.document_id, 's' => $document.source_id, 'p' => $current_page])}">{$document.number}</a>
|
|
|
|
{if $document.db_documentId > 0 && $document.db_binaryId > 0 }
|
|
<a class="b2b_document_link" href="{$link->getModuleLink('firmesb2b', 'documents', ['getfile' => $document.document_id, 's' => $document.source_id, 'p' => $current_page])}"><img src="{$module_template_dir}img/pdf.gif" class="b2b_download_icon icon" alt="{l s='Wydruk PDF' mod='firmesb2b'}"/></a>
|
|
{* <a class="b2b_document_link" href="{$link->getModuleLink('firmesb2b', 'documents', ['getfile' => $document.document_id, 'binary_id' => $document.document_id*-1, 's' => $document.source_id, 'p' => $current_page])}" title = "Dokument EPP"><img src="{$module_template_dir}img/epp.png" class="b2b_download_icon icon" alt="{l s='Dokument EPP' mod='firmesb2b'}"/></a> *}
|
|
{/if}
|
|
|
|
{if $document.db_documentId > 0 && $document.eppid < 0 }
|
|
<a class="b2b_document_link" href="{$link->getModuleLink('firmesb2b', 'documents', ['getfile' => $document.document_id, 'binary_id' => $document.eppid, 's' => $document.source_id, 'p' => $current_page])}" title = "Dokument EPP"><img src="{$module_template_dir}img/epp.png" class="b2b_download_icon icon" alt="{l s='Dokument EPP' mod='firmesb2b'}"/></a>
|
|
{/if}
|
|
|
|
</td>
|
|
<td class="b2b_date">{dateFormat date=$document.date full=0}</td>
|
|
<td class="b2b_price">{$document.total_net|string_format:"%.2f"}</td>
|
|
<td class="b2b_price">{$document.total_gros|string_format:"%.2f"}</td>
|
|
|
|
<td class="b2b_date">
|
|
{if $document.payment_ammount > 0}
|
|
|
|
{if $smarty.now|date_format:"%Y-%m-%d" > $document.payment_date} <span class="b2b_warn"> {/if}
|
|
{dateFormat date=$document.payment_date full=0} ({$document.payment_lateness}d)
|
|
{if $smarty.now|date_format:"%Y-%m-%d" > $document.payment_date} </span>{/if}
|
|
|
|
{/if}
|
|
</td>
|
|
<td class="b2b_payment">
|
|
{if $document.payment_ammount > 0}
|
|
{if $smarty.now|date_format:"%Y-%m-%d" > $document.payment_date} <span class="b2b_warn"> {/if}
|
|
{$document.payment_ammount|string_format:"%.2f"}
|
|
{if $smarty.now|date_format:"%Y-%m-%d" > $document.payment_date} </span>{/if}
|
|
{/if}
|
|
</td>
|
|
|
|
</tr>
|
|
{/foreach}
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
{if $pages > 0}
|
|
<nav class="pagination">
|
|
<!-- Pagination -->
|
|
<div id="pagination" class="pagination">
|
|
|
|
<ul class="page-list clearfix text-xs-center">
|
|
{if $current_page > 0}
|
|
<li id="pagination_previous"><a href="{$link->getModuleLink('firmesb2b', 'documents', ['p' => ($current_page - 1)])}">« {l s='Poprzednia' mod='firmesb2b'}</a></li>
|
|
{else}
|
|
<li id="pagination_previous" class="disabled"><span>« {l s='Poprzednia' mod='firmesb2b'}</span></li>
|
|
{/if}
|
|
|
|
{section name=pagination start=0 loop=$pages+1 step=1}
|
|
{if $current_page == $smarty.section.pagination.index}
|
|
<li class="current"><span>{$current_page+1|escape:'htmlall':'UTF-8'}</span></li>
|
|
{else}
|
|
<li><a href="{$link->getModuleLink('firmesb2b', 'documents', ['p' => $smarty.section.pagination.index])}">{$smarty.section.pagination.index+1|escape:'htmlall':'UTF-8'}</a></li>
|
|
{/if}
|
|
{/section}
|
|
|
|
{if $current_page < $pages}
|
|
<li id="pagination_next"><a href="{$link->getModuleLink('firmesb2b', 'documents', ['p' => ($current_page + 1)])}">{l s='Następna' mod='firmesb2b'} »</a></li>
|
|
{else}
|
|
<li id="pagination_next" class="disabled"><span>{l s='Następna' mod='firmesb2b'} »</span></li>
|
|
{/if}
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
</nav>
|
|
{/if}
|
|
|
|
|
|
{else}
|
|
<p class="warning">{l s='Lista dokumentów jest pusta.' mod='firmesb2b'}</p>
|
|
{/if}
|
|
|
|
|
|
<ul class="footer_links clearfix">
|
|
<li class="fleft">
|
|
<a class="btn btn-default button button-small" href="{$link->getPageLink('my-account', true)|escape:'htmlall':'UTF-8'}">
|
|
<span>
|
|
<i class="icon-chevron-left"></i>{l s='Powrót do Twojego konta' mod='firmesb2b'}
|
|
</span>
|
|
</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
{/block} |