Files
2025-05-12 15:46:37 +00:00

304 lines
10 KiB
Smarty
Executable File

<!-- Tablesorter script: required -->
<script src="modules/EcmReports/TableSorterNew/js/jquery.tablesorter.js"></script>
<script src="modules/EcmReports/TableSorterNew/js/jquery.tablesorter.widgets.js"></script>
<script type="text/javascript" src="modules/EcmReports/javascript/jquery.blockUI.js"></script>
<!-- Tablesorter: theme -->
<link class="theme" rel="stylesheet" href="modules/EcmReports/TableSorter/css/theme.blue.css">
<script type="text/javascript" src="modules/EcmReports/javascript/ListDailySales.js"></script>
<style type="text/css">
{literal}
thead, tfoot {font-weight: bold;}
{/literal}
{literal}
.additionalColumn {
background-color: #87CCED;
border-top: 1px solid black;
}
.sumRow {
background-color: #BDC7B5;
}
/* 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;
}
table.tablesorter tbody tr.sumTr td {
background: #EBEBED;
color: black;
}
table.tablesorter tbody tr.sumTr:hover td {
background: #E0E0E2;
color: black;
font-weight: bold;
}
table.tablesorter thead th.groupActiveG {
border-top: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid #687783;
background-color: #ABC3D7;
}
table.tablesorter thead th.groupActiveGL {
border-right: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid #687783;
background-color: #ABC3D7;
}
table.tablesorter thead th.groupActive {
border-left: 1px solid black;
border-top: 1px solid black;
border-bottom: 1px solid black;
background-color: #ABC3D7;
}
table.tablesorter tfoot th.alignLeft,
table.tablesorter tbody td.alignLeft {
text-align: left;
}
table.tablesorter tfoot th.alignRight,
table.tablesorter tbody td.alignRight {
text-align: right;
}
{/literal}
</style>
<table id="table" 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>Rejestr wartościowy </h2>
</td>
</tr>
</table>
<br />
<ul class="tablist" style="width:100%;">
</ul>
<form action="index.php" method="get" name="searchDailyReports" id="searchDailyReports">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="ListDailySales" />
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
{* Search by date_from *}
<td class="dataLabel" width="5%" nowrap="nowrap"> Data od</td>
<td class="dataField" width="10%" nowrap="nowrap">
<input id="date_from" name="date_from" type="text" maxlength="10" size="11" tabindex="" title="" 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">
Calendar.setup({ldelim}
inputField: "date_from",
daFormat: "%d.%m.%Y",
button: "date_from_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
</td>
{* Search by date_to *}
<td class="dataLabel" width="10%" nowrap="nowrap">Data do</td>
<td class="dataField" width="30%" nowrap="nowrap">
<input autocomplete="off" name="date_to" id="date_to" value="{$date_to}" title="" 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: "%d.%m.%Y",
button: "date_to_trigger",
singleClick: true,
dateStr: "",
step: 1
{rdelim}
);
</script>
</td>
{* Search by contractor *}
<td class="dataLabel" width="10%" nowrap="nowrap">{$MOD.LBL_CONTRACTOR}</td>
<td class="dataField" width="30%" nowrap="nowrap">
<input id="account_name" type="text" title="" value="{$contractorName}" size="" tabindex="" name="account_name">
<input id="account_id" type="hidden" value="{$contractorId}" name="account_id">
<input class="button" type="button" value="Wybierz" accesskey="T" title="Select [Alt+T]" tabindex="" value="{$contractorName}" name="btn_account_name" onClick="getContractor()">
{* Open popup window to select contractor *}
<script language="JavaScript" type="text/javascript">
function getContractor(){ldelim}
open_popup("Accounts", 600, 400, "", true, false,
{ldelim}
"call_back_function": "set_return", "form_name": "searchDailyReports", "field_to_name_array":
{ldelim}"id": "account_id", "name": "account_name"{rdelim}
{rdelim}, "single", true);
{rdelim}
;
</script>
</td>
{if $submit eq "Wykonaj"}
<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="true" {/if}>{$c}</option>
{/foreach}
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Typ dokumentu</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="type[]" multiple="multiple">
<option value="fv" {if $searchByType.fv } selected="true" {/if} >FV</option>
<option value="fvk" {if $searchByType.fvk } selected="true" {/if} >FVK</option>
<option value="pr" {if $searchByType.pr } selected="true" {/if} >PR</option>
<option value="prk" {if $searchByType.prk } selected="true" {/if} >PRK</option>
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Rodzaj dokumentu:</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="pdfType[]" multiple="multiple">
<option value="K" {if $pdfType.K} selected="true"{/if}>Kraj</option>
<option value="U" {if $pdfType.U} selected="true"{/if}>Unia</option>
<option value="E" {if $pdfType.E} selected="true"{/if}>Eksport</option>
</select>
</td>
{else}
<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}" >{$c}</option>
{/foreach}
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Typ dokumentu</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="type[]" multiple="multiple">
<option value="fv" selected="true">FV</option>
<option value="fvk" selected="true" >FVK</option>
<option value="pr" selected="true" >PR</option>
<option value="prk" selected="true" >PRK</option>
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Rodzaj dokumentu:</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="pdfType[]" multiple="multiple">
<option value="K" selected="true">Kraj</option>
<option value="U" selected="true">Unia</option>
<option value="E" selected="true">Eksport</option>
</select>
</td>
{/if}
</tr>
</tbody>
</table>
</form>
<input class="button" name="submit" value="{$MOD.LBL_EXECUTE}" type="submit" form="searchDailyReports">
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href = 'index.php?module=EcmReports&action=ListDailySales';">
<input id="excelEksport" class="button" name="importToExcel" value="{$MOD.BTN_EXCEL_EXPORT}" type="button">
<input id="pdfEksport" class="button" name="importToPDF" value="{$MOD.BTN_PDF_EXPORT}" type="button">
<br>
<br>
{* Table headers *}
<table id="myTable" class="tablesorter-blue">
<thead>
<tr>
<th>{$MOD.LBL_CONTRACTOR}</th>
<th>{$MOD.LBL_INVOICE_NUMBER}</th>
<th>{$MOD.LBL_TYPE}</th>
<th>{$MOD.LBL_DOCUMENT_DATE}</th>
<th>{$MOD.LBL_PDF_TYPE}</th>
<th class="nettoValue nettoValueVat sorter-saas">{$MOD.LBL_NET_VALUE}</th>
<th class="sorter-saas">{$MOD.LBL_GROSS_VALUE}</th>
<th class="nettoValue sorter-saas">{$MOD.LBL_COST}</th>
<th class="sorter-saas">{$MOD.LBL_MARGIN}</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="5"></th>
<th class="alignRight">{$SUM.netto|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.brutto|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.cost|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.margin|number_format:2:",":"." }</th>
</tr>
</tfoot>
<tbody aria-live="polite" aria-relevant="all">
{foreach from=$DATA item=ROW name=loop}
{if $smarty.foreach.loop.index % 2 == 1}
<tr>
{else}
<tr style="background-color: #e6e6e6;" role="row">
{/if}
<td class="alignLeft">
<a target="new" href="index.php?module=Accounts&return_module=Accounts&action=DetailView&record={$ROW.account.id}">
{$ROW.account.name}
</a>
</td>
<td class="alignLeft">
<a target="new" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$ROW.id}">
{$ROW.document_no}
</a>
<td class="alignLeft">{$ROW.showType}</td>
<td class="alignLeft">{$ROW.register_date}</td>
<td class="alignLeft">{if $ROW.pdf_type == 'U'}
{$MOD.LBL_PDF_TYPE_U}
{/if}
{if $ROW.pdf_type == 'K'}
{$MOD.LBL_PDF_TYPE_K}
{/if}
{if $ROW.pdf_type == 'E'}
{$MOD.LBL_PDF_TYPE_E}
{/if}
</td>
<td class="gs alignRight" ">{$ROW.total_netto|number_format:2:",":"." }</td>
<td class="alignRight">{$ROW.total_brutto|number_format:2:",":"." }</td>
<td class="gc alignRight" >{$ROW.purchase_price|number_format:2:",":"." }</td>
<td class="alignRight">{$ROW.margin|number_format:2:",":"." } ({$ROW.marginInPercent|number_format:2:",":"."}%)</td>
{/foreach}
</tr>
</tbody>
</table>