199 lines
12 KiB
Smarty
199 lines
12 KiB
Smarty
<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>
|
|
<link rel="stylesheet" type="text/css" href="modules/EcmReports/TableSorter/css/theme.blue.css"/>
|
|
<link rel="stylesheet" type="text/css" href="modules/EcmReports/TableSorter/css/theme.blue2.css"/>
|
|
<!-- Tablesorter -->
|
|
<script type="text/javascript" src="include/jQuery/tablesorter-master/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript" src="modules/EcmReports/TableSorter/js/jquery.tablesorter.widgets.js"></script>
|
|
<script type="text/javascript" src="modules/EcmReports/javascript/ReportBuyesByVat.js"></script>
|
|
{*<script type="text/javascript" src="https://www.google.com/jsapi"></script>*}
|
|
|
|
<style type="text/css">
|
|
{literal}
|
|
thead, tfoot {font-weight: bold;}
|
|
|
|
table.tablesorter tbody tr:hover td {
|
|
background: #E8E8E8;
|
|
color: #343432;
|
|
}
|
|
/* Extra selectors needed to override the default styling */
|
|
table.tablesorter tbody tr.normal-row td {
|
|
background: #EFEFF1;
|
|
color: #343432;
|
|
}
|
|
table.tablesorter tbody tr.alt-row td {
|
|
background: #FFF;
|
|
color: #343432;
|
|
}
|
|
/* Extra selectors needed to override the default styling */
|
|
table.tablesorter tbody tr.normal-row:hover td {
|
|
background: #E8E8E8;
|
|
color: #343432;
|
|
}
|
|
table.tablesorter tbody tr.alt-row:hover td {
|
|
background: #E8E8E8;
|
|
color: #343432;
|
|
}
|
|
.element{
|
|
position:fixed;
|
|
bottom: 0%;
|
|
width: 97%;
|
|
padding:10px;
|
|
font-family:Arial;
|
|
background-color: white;
|
|
border:1px solid black;
|
|
}
|
|
{/literal}
|
|
</style>
|
|
|
|
<table id="tableMenu" cellspacing="0" cellpadding="0" border="0">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16">
|
|
</td>
|
|
<td>
|
|
<h2>{$MOD.LBL_REPORT} {$MOD.LBL_REPORT_RECEIVE_REGISTER}</h2>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<ul class="tablist" style="width:100%;">
|
|
<li>
|
|
<a class="current" href="#">{$MOD.LBL_SEARCH}</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<form action="index.php" method="get" name="where" id="where">
|
|
<input type="hidden" name="module" value="EcmReports" />
|
|
<input type="hidden" name="action" value="ReportBuyesByVat" />
|
|
<input type="hidden" name="parentTab" value="Raporty"/>
|
|
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td style="white-space: nowrap">{$MOD.LBL_DATE_FROM}
|
|
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="Data od" value="{$date_from}" autocomplete="off">
|
|
<img id="date_from_trigger" border="0" align="absmiddle" alt="Enter Date" src="themes/default/images/jscalendar.gif">
|
|
<script language="JavaScript" type="text/javascript">
|
|
{* console.log('dupa');*}
|
|
Calendar.setup({ldelim}
|
|
inputField: "date_from",
|
|
daFormat: "{$dateFormat}",
|
|
button: "date_from_trigger",
|
|
singleClick: true,
|
|
dateStr: "",
|
|
step: 1
|
|
{rdelim}
|
|
);
|
|
</script>
|
|
</td>
|
|
<td style="white-space: nowrap">{$MOD.LBL_DATE_TO}
|
|
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="Data do" tabindex="" size="11" maxlength="10" type="text">
|
|
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="date_to_trigger" align="absmiddle" border="0">
|
|
<script language="JavaScript" type="text/javascript">
|
|
Calendar.setup({ldelim}
|
|
inputField: "date_to",
|
|
daFormat: "{$dateFormat}",
|
|
button: "date_to_trigger",
|
|
singleClick: true,
|
|
dateStr: "",
|
|
step: 1
|
|
{rdelim}
|
|
);
|
|
</script>
|
|
</td>
|
|
<td class="dataLabel" width="10%" nowrap="nowrap">Kategoria dokumentu</td>
|
|
<td class="dataField" width="30%" nowrap="nowrap">
|
|
<select name="category[]" multiple="multiple">
|
|
{foreach from=$category item=c key=k }
|
|
<option value="{$k}" {if @in_array($k, $category_selected) } selected="true" {/if}>{$c}</option>
|
|
{/foreach}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<input class="button" value="{$MOD.LBL_EXECUTE}" type="submit" form="where">
|
|
<input class="button" value="{$MOD.LBL_CLEAR}" type="button" onclick="location.href = 'index.php?module=EcmReports&action=ReportBuyesByVat&parentTab=Raporty';">
|
|
<!-- <input id="excelEksport" class="button" name="importToExcel" value="{$MOD.BTN_EXCEL_EXPORT}" type="button" onclick="excelExport();"> -->
|
|
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button" >
|
|
|
|
<table class="tablesorter tablesorter-blue" role="grid" id='table'>
|
|
<thead>
|
|
<tr class="tablesorter-headerRow" role="row">
|
|
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="0" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="9%" style = "text-align: left">{$MOD.LBL_DOC_NUMBER}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="1" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="6%" style = "text-align: left">{$MOD.LBL_CREATE_LAB}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="2" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="6%" style = "text-align: left">{$MOD.LBL_SALE_DATE}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="3" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="8%" style = "text-align: left">{$MOD.LBL_SALES_NIP}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="4" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="13%" style = "text-align: left">{$MOD.LBL_LIST_SUBJECT}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="5" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="8%" style = "text-align: left">{$MOD.LBL_ADDRESS}</th>
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="6" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="5%" style = "text-align: left">{$MOD.LBL_BUYER_VALUE_BRUTTO}</th>
|
|
{foreach from= $vat_value key= t item= w}
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="7" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="4%" style = "text-align: left">{$MOD.LBL_BUYER_VALUE_NETTO} {$t}</th>
|
|
{if $w.sumavat != NULL}
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="8" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="4%" style = "text-align: left">{$MOD.LBL_VAT} {$t}</th>
|
|
{/if}
|
|
{/foreach}
|
|
<th class="sorter-text tablesorter-header tablesorter-headerUnSorted" data-column="9" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" style="-moz-user-select: none;" aria-sort="none" aria-label="Name: No sort applied, activate to apply an ascending sort width="4%" style = "text-align: left">{$MOD.LBL_SUM_VAT}</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from= $data key= k item= i}
|
|
|
|
<tr>
|
|
|
|
<td> <a target="new" href="index.php?module=Documents&offset=35&stamp=1429090400048670400&return_module=Documents&action=DetailView&record={$i.document_id}">{$i.document_number}</a></td>
|
|
<td>{$i.document_date|date_format:"%d.%m.%Y"}</td>
|
|
<td>{$i.register_date|date_format:"%d.%m.%Y"}</td>
|
|
|
|
<td>{$i.to_vatid}</td>
|
|
<td><a target="new" href="index.php?module=Accounts&return_module=Accounts&action=DetailView&record={$i.id}">{$i.name}</a></td>
|
|
<td>{$i.register_address_postalcode} {$i.register_address_city}</td>
|
|
<td style = "text-align: right">{$i.value|number_format:2:",":"."}</td>
|
|
{foreach from=$vat_value key=o item=j}
|
|
{assign var=prawdafalsz value=false}
|
|
{foreach from=$i.vaty item = e}
|
|
{if $o == $e.vat_value}
|
|
{assign var=prawdafalsz value=true}
|
|
{assign var=prawdafalszvat value=$e.vat}
|
|
{assign var=prawdafalsznetto value=$e.netto}
|
|
{/if}
|
|
{/foreach}
|
|
{if $prawdafalsz == true }
|
|
<td style = "text-align: right">{$prawdafalsznetto|number_format:2:",":"."}</td>
|
|
{if $j.sumavat != NULL}
|
|
<td style = "text-align: right">{$prawdafalszvat|number_format:2:",":"."}</td>
|
|
{/if}
|
|
{else}
|
|
<td style = "text-align: right">0,00</td>
|
|
{if $j.sumavat != NULL}
|
|
<td style = "text-align: right">0,00</td>
|
|
{/if}
|
|
{/if}
|
|
{/foreach}
|
|
<td style = "text-align: right">{$i.vatsumapozycja|number_format:2:",":"."}</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
<tfoot style="background-color: #E8E8E8;">
|
|
|
|
<tr>
|
|
<td style="text-align: left;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$MOD.LBL_SUM}</td>
|
|
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;" colspan="5"></td>
|
|
|
|
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$SumaBrutto|number_format:2:",":"."}</td>
|
|
|
|
{foreach from=$vat_value key =o item=j}
|
|
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$j.sumanetto|number_format:2:",":"."}</td>
|
|
{if $j.sumavat != NULL}
|
|
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$j.sumavat|number_format:2:",":"."}</td>
|
|
{/if}
|
|
{/foreach}
|
|
<td style="text-align: right;background-color: #E8E8E8; border: 1px solid #E8E8E8;">{$SumaVat|number_format:2:",":"."}</td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
</table>
|