114 lines
5.4 KiB
Smarty
Executable File
114 lines
5.4 KiB
Smarty
Executable File
|
|
{if $viewSelected eq 'documents'}
|
|
<table id="myTable" style="font-size: 8pt; width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Numer dokumentu</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt; width:10%">Data</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">
|
|
|
|
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
|
|
Kartoteka materiałowa
|
|
{elseif $documentSelected eq 'EcmStockDocMoves'}
|
|
Magazyn docelowy
|
|
{elseif $documentSelected eq 'EcmStockDocIns'}
|
|
Dostawca
|
|
{elseif $documentSelected eq 'EcmStockDocOuts'}
|
|
Odbiorca
|
|
{elseif $documentSelected eq 'EcmInvoiceOuts'}
|
|
Kontrahent
|
|
{/if}
|
|
</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Opis dokumentu</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Magazyn</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody >
|
|
{foreach from=$DATA.doc key="key" item="item" name=loop}
|
|
<tr>
|
|
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
|
|
<td>
|
|
{$item.typ} {$item.numer}
|
|
</td>
|
|
<td>
|
|
{$item.data}
|
|
</td>
|
|
<td>
|
|
{if $documentSelected eq 'EcmStockDocInsideOuts' or $documentSelected eq 'EcmStockDocInsideIns' or $documentSelected eq 'EcmStockDocCorrects'}
|
|
{$item.kartoteka}
|
|
{elseif $documentSelected eq 'EcmStockDocMoves'}
|
|
{$item.magazynIn}
|
|
{elseif $documentSelected eq 'EcmStockDocIns' or $documentSelected eq 'EcmStockDocOuts' or $documentSelected eq 'EcmInvoiceOuts' }
|
|
{$item.accountNazwa}
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
{$item.nazwa}
|
|
</td>
|
|
|
|
<td style="text-align: right">
|
|
{assign var=suma value=$suma+$item.wartosc}
|
|
{$item.wartosc|number_format:2:",":"."}
|
|
</td>
|
|
<td style="text-align: left">
|
|
{$item.magazyn}
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan='5' style="border-top: 1px solid black;text-align:left;">Suma:</th>
|
|
<th style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
|
|
<th style="border-top: 1px solid black;"></th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
{elseif $viewSelected eq 'positions'}
|
|
<table id="myTable" style="font-size: 8pt; width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Lp.</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Indeks</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Nazwa</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Jm</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Ilość</th>
|
|
<th style="border: 1px solid black; font-weight: bold; font-size: 8pt;">Wartość</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody aria-live="polite" aria-relevant="all">
|
|
{foreach from=$DATA.prod key="key" item="item" name=loop}
|
|
<tr>
|
|
<td>{assign var=pozycja value=$pozycja+1}{$pozycja}</td>
|
|
<td>
|
|
{$item.kod}
|
|
</td>
|
|
<td>
|
|
{$item.nazwa}
|
|
</td>
|
|
<td>
|
|
{$item.jm}
|
|
</td>
|
|
<td style="text-align: right">
|
|
{assign var=sumaIlosci value=$sumaIlosci+$item.ilosc}
|
|
{$item.ilosc|number_format:2:",":"."}
|
|
</td>
|
|
<td style="text-align: right">
|
|
{assign var=suma value=$suma+$item.wartosc}
|
|
{$item.wartosc|number_format:2:",":"."}
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th colspan='4' style="border-top: 1px solid black;text-align:left;">Suma:</th>
|
|
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$sumaIlosci|number_format:2:",":"." }</th>
|
|
<th colspan='1' style="border-top: 1px solid black;text-align:right;">{$suma|number_format:2:",":"." }</th>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
{/if}
|