Files
crm.e5.pl/modules/EcmReports/tpls/ListDailySales.tpl
2024-04-27 09:23:34 +02:00

314 lines
13 KiB
Smarty

<!-- jQuery -->
<script type="text/javascript" src="modules/EcmReports/javascript/jquery.js"></script>
<!-- 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/TableSorterNew/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 th.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>{$MOD.LBL_REPORT} {$MOD.LBL_SUBPANEL_TITLE} </h2>
</td>
</tr>
</table>
<br />
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">Podstawowe wyszukiwanie</a>
</li>
</ul>
<form action="index.php" method="get" name="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 : "{$dateFormat}",
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 : "{$dateFormat}",
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>
<td class="dataLabel" width="10%" nowrap="nowrap">Typ dokumentu</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="type">
<option value="" { if $searchByType==""} selected="true" {/if} >normalny i korekta</option>
<option value="normal" { if $searchByType=="normal"} selected {/if} >normalny</option>
<option value="correct" { if $searchByType=="correct"} selected {/if} >korekta</option>
</select>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Rodzaj faktury:</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="pdfType[]" multiple="multiple">
<option value="K" {if $pdfTypeK} selected="true"{/if}>Kraj</option>
<option value="U" {if $pdfTypeU} selected="true"{/if}>Unia</option>
<option value="E" {if $pdfTypeE} selected="true"{/if}>Eksport</option>
</select>
</td>
</tbody>
</table>
<input class="button" name="submit" value="{$MOD.LBL_EXECUTE}" type="submit">
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href='index.php?module=EcmReports&action=ListDailySales';">
<input id="showGroupButton" class="button" name="clear" value="{$MOD.BTN_SHOW_GROUP_DIVISION}" type="button">
<input id="showVatButton" class="button" name="clear" value="{$MOD.BTN_SHOW_VAT_DIVISION}" type="button">
<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_REGISTER_DATE}</th>
<th>{$MOD.LBL_PDF_TYPE}</th>
<th class="nettoValue nettoValueVat sorter-saas">{$MOD.LBL_NET_VALUE}</th>
<th class="nettoValueG columnSpectrum sorter-saas">TH1</th>
<th class="nettoValueG columnSpectrum sorter-saas">WG1</th>
<th class="nettoValueG columnSpectrum sorter-saas">PP1</th>
<th class="nettoValueGL columnSpectrum sorter-saas">TR1</th>
<!-- Vat count -->
<th class="vataValue columnVatSpectrum sorter-saas">0%</th>
<th class="vatbValue columnVatSpectrum sorter-saas">22%</th>
<th class="vatcValue columnVatSpectrum sorter-saas">23%</th>
<!-- end vat count -->
<th class="sorter-saas">{$MOD.LBL_GROSS_VALUE}</th>
<th class="nettoValue sorter-saas">{$MOD.LBL_COST}</th>
<th class="nettoValueG columnSpectrum sorter-saas">TH2</th>
<th class="nettoValueG columnSpectrum sorter-saas">WG2</th>
<th class="nettoValueG columnSpectrum sorter-saas">PP2</th>
<th class="nettoValueGL columnSpectrum sorter-saas">TR2</th>
<th class="sorter-saas">{$MOD.LBL_MARGIN}</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="5"></th>
<th class="alignRight">{$SUM.subtotalSum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.subPriceGroupKS1Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.subPriceGroupKS2Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.subPriceGroupKS3Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.subPriceGroupKS4Sum|number_format:2:",":"." }</th>
<th class="columnVatSpectrum alignRight">{$SUM.vataSum|number_format:2:",":"." }</th>
<th class="columnVatSpectrum alignRight">{$SUM.vatbSum|number_format:2:",":"." }</th>
<th class="columnVatSpectrum alignRight">{$SUM.vatcSum|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.totalSum|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.costSum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.purchasePriceGroupKS1Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.purchasePriceGroupKS2Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.purchasePriceGroupKS3Sum|number_format:2:",":"." }</th>
<th class="columnSpectrum alignRight">{$SUM.purchasePriceGroupKS4Sum|number_format:2:",":"." }</th>
<th class="alignRight">{$SUM.marginSum|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 style="text-align:left;">
<a target="new" href="index.php?module=Accounts&return_module=Accounts&action=DetailView&record={$ROW.id}">
{$ROW.contractorName}
</a>
</td>
<td style="text-align:right;">
<a target="new" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$ROW.invoiceoutId}">
{$ROW.document_no}
</a>
<td style="text-align:right;">{if $ROW.type == 'normal'}
{$MOD.LBL_PDF_TYPE_NORMAL}
{else if $ROW.type == 'correct'}
{$MOD.LBL_PDF_TYPE_CORRECT}
{/if}
</td>
<td style="text-align:right;">{$ROW.register_date|date_format:"%d.%m.%Y"}</td>
<td style="text-align:right;">{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" style="text-align:right;">{$ROW.subtotal|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right;border-left: 1px solid #687783;">{$ROW.subPriceGroupKS1|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right;">{$ROW.subPriceGroupKS2|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right; padding-right: 4px;">{$ROW.subPriceGroupKS3|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right; border-right: 1px solid #687783; padding-right: 4px;">{$ROW.subPriceGroupKS4|number_format:2:",":"." }</td>
<!-- Vat values -->
<td class="columnVatSpectrum" style="text-align:right;border-left: 1px solid #687783; border-right: 1px solid #687783; padding-right: 4px;">{$ROW.vata|number_format:2:",":"." }</td>
<td class="columnVatSpectrum" style="text-align:right; border-right: 1px solid #687783; padding-right: 4px;">{$ROW.vatb|number_format:2:",":"." }</td>
<td class="columnVatSpectrum" style="text-align:right; border-right: 1px solid #687783; padding-right: 4px;">{$ROW.vatc|number_format:2:",":"." }</td>
<!-- end vat values -->
<td style="text-align:right;">{$ROW.total|number_format:2:",":"." }</td>
<td class="gc" style="text-align:right;">{$ROW.cost|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right;border-left: 1px solid #687783;">{$ROW.purchasePriceGroupKS1|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right;">{$ROW.purchasePriceGroupKS2|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right; padding-right: 4px;">{$ROW.purchasePriceGroupKS3|number_format:2:",":"." }</td>
<td class="columnSpectrum" style="text-align:right; border-right: 1px solid #687783; padding-right: 4px;">{$ROW.purchasePriceGroupKS4|number_format:2:",":"." }</td>
<td style="text-align:right;">{$ROW.margin|number_format:2:",":"." }%</td>
{/foreach}
</tr>
</tbody>
</table>