This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
<table cellspacing="0" cellpadding="0" border="0">
<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_LISTSALES_NAME}</h2></td>
</tr>
</table>
<br />
<form action="index.php?module=EcmInvoiceOuts&action=ListSales" method="post" name="SearchFormListSales"><ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">{$MOD.LBL_SEARCH}</a>
</li>
</ul>
<table style="border-top: 0px none; margin-bottom: 4px;width:100%" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" nowrap="" >
{$MOD.LBL_LISTSALES_YEAR}:
</td>
<td width="30%" nowrap="" >
<input type='text' id='year' name='year' value='{$POST.year}' maxlength="4"/>
</td>
<td width="5%" nowrap="" >
{$MOD.LBL_LISTSALES_CODE}:
</td>
<td width="30%" nowrap="" >
<input type='text' id='code' name='code' value='{$POST.code}'/>
</td>
<td width="5%" nowrap="" >
{$MOD.LBL_LISTSALES_QTY}:
</td>
<td width="30%" nowrap="" >
<input type='text' id='quantity' name='quantity' value='{$POST.quantity}'/>
</td>
<td width="5%" nowrap="" >
{$MOD.LBL_LISTSALES_PRICE}:
</td>
<td width="30%" nowrap="" >
<input type='text' id='price' name='price' value='{$POST.price}'/>
</td>
<td width="10%" nowrap="nowrap" class="dataLabel">{$MOD.LBL_LISTSALES_PARENT_NAME}:</td>
<td nowrap="nowrap" class="dataField">
<input type="text" title="" size="" id="account_name" tabindex="" name="account_name" value='{$POST.account_name}'>
<input type="hidden" id="account_id" name="account_id" value='{$POST.account_id}'>
<input type="button" onclick="{literal}open_popup(&quot;Accounts&quot;, 600, 400, &quot;&quot;, true, false, {&quot;call_back_function&quot;:&quot;set_return&quot;,&quot;form_name&quot;:&quot;SearchFormListSales&quot;,&quot;field_to_name_array&quot;:{&quot;id&quot;:&quot;account_id&quot;,&quot;name&quot;:&quot;account_name&quot;}}, &quot;single&quot;, true);{/literal}" value="Wybierz" class="button" accesskey="T" title="Wybierz [Alt+T]" tabindex="" name="btn_account_name"></td>
</tr>
</table>
<input class="button" type="submit" value="{$MOD.LBL_LISTSALES_SEARCH}" name="submit">
<input class="button" type="button" onclick="location.href='index.php?module=EcmInvoiceOuts&action=ListSales';" value="{$MOD.LBL_LISTSALES_CLEAR}" name="clear">
</form>
<br>
{if !empty($POSITION_LIST)}
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;" id="myTable" class="tablesorter">
<thead>
<tr>
<th ><input type="checkbox" name="selectall" id="selectall"></th>
<th >{$MOD.LBL_LISTSALES_CODE}</th>
<th >{$MOD.LBL_LISTSALES_NAME_POS}</th>
<th >{$MOD.LBL_LISTSALES_QTY}</th>
<th >{$MOD.LBL_LISTSALES_PRICE}</th>
<th >{$MOD.LBL_LISTSALES_DOCUMENT_NO}</th>
<th >{$MOD.LBL_LISTSALES_REGISTER_DATE}</th>
</thead>
<tbody>
{foreach from=$POSITION_LIST key="key" item="item" name="components"}
{if $item.id!=''}
<tr style="vertical-align:top;">
<td style="text-align: center"><input type="checkbox" value="{$item.id}" class="make_pdf" id="make_pdf_{$item.position}" name="selectedid[]"></td>
<td >{$item.code}</td>
<td >{$item.name}</td>
<td style="text-align: right">{$item.quantity}</td>
<td data-total="{$item.price_netto}" style="text-align: right">{$item.price_netto|number_format:2:".":","}</td>
<td data-total="{$item.number}"style="text-align: right"><a href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$item.fk_id}">{$item.document_no}</a></td>
<td data-total="{$item.register_date|date_format:"%Y%m%d"}"style="text-align: center">{$item.register_date|date_format:"%d.%m.%Y"}</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
{/if}

View File

@@ -0,0 +1,137 @@
Raport w trakcie budowy - Michał Zieliński<br>
<form action="index.php?module=EcmInvoiceOuts&action=Report_INTRASTAT" method="POST">
<div id="report_settings" class="edit view search basic" style="width: 97vw;">
<table cellspacing="0" cellpadding="0" style="width: 100%">
<tbody>
<tr>
<td>
<input type="number" size="4" maxlength="4" value="{$year}" name="year"/>
<input type="number" size="2" maxlength="2" value="{$month}" name="month"/>
<input type="hidden" name="process" value="1"/>
<input class="button" type="submit" value="Generuj"/>
</td>
</tr>
</tbody>
</table>
</div>
</form>
{if $process}
<form action="index.php?module=EcmInvoiceOuts&action=Report_INTRASTAT" method="POST">
<input type="hidden" name="xml" value="1"/>
<input type="hidden" value="{$year}" name="xml_year"/>
<input type="hidden" value="{$month}" name="xml_month"/>
<input class="button" type="submit" value="XML"/>
</form>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.24/datatables.min.css" />
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.24/datatables.min.js"></script>
<script>
{literal}
$(document).ready(function() {
$('#report').DataTable({
lengthMenu: [
[50, 100, 200, 500, -1],
[50, 100, 200, 500, "Wszystkie"]
],
pageLength: 200,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.10.24/i18n/Polish.json'
},
scrollX: true,
scrollY: "60vh",
scrollCollapse: true,
order: [[ 0, "asc" ]],
columnDefs: [
{ targets: [3,4,5,6,7, 8], className: 'dt-right'}
]
});
$('#products').DataTable({
pageLength: 200,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.10.24/i18n/Polish.json'
},
columnDefs: [
{ targets: [2,3], className: 'dt-right'}
],
lengthMenu: [
[50, 100, 200, 500, -1],
[50, 100, 200, 500, "Wszystkie"]
],
scrollX: true,
scrollY: "60vh",
scrollCollapse: true,
order: [[ 0, "asc" ]],
});
});
{/literal}
</script>
<style>
{literal}
div.dataTables_wrapper {
width: 95vw;
max-height: 50vw;
margin: 0 auto;
}
{/literal}
</style>
Raport wygenerowany na podstawie dokumentów:
{foreach from=$invoices item="item"}
<a target="new" href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$item.id}">{$item.document_no}</a>&nbsp;
{/foreach}
<br><br>
<table id="report" class="display nowrap hover" style="width:100%">
<thead>
<tr>
<th>Numer pozycji</th>
<th>Kod towarowy</th>
<th>Opis towaru</th>
<th>Rodzaj transakcji</th>
<th>Kraj przeznaczenia</th>
<th>Identyfikator kontrahenta zagranicznego</th>
<th>Wartość fakturowa PLN</th>
<th>Waga brutto</th>
<th>Ilość intrastat</th>
</tr>
</thead>
<tbody>
{foreach from=$data item="item"}
<tr>
<td>{$item.position}</td>
<td>{$item.pkwiu}</td>
<td>{$item.description|truncate:75}</td>
<td>11</td>
<td>{$item.country}</td>
<td>{$item.nip}</td>
<td>{$item.total}</td>
<td>{$item.weight}</td>
<td>{if $item.qty_intrastat > 0}{$item.qty_intrastat}{/if}</td>
</tr>
{/foreach}
</tbody>
</table>
{if $badProducts|@count>0}
<hr>
<h3>Niepoprawnie uzupełnione produkty</h3><br>
<table id="products" class="display nowrap hover" style="width:100%">
<thead>
<tr>
<th>Kod</th>
<th>Nazwa</th>
<th>PKWiU</th>
<th>Waga brutto</th>
</tr>
</thead>
<tbody>
{foreach from=$badProducts item="item"}
<tr>
<td>
<a target="new" href="index.php?module=EcmProducts&action=DetailView&record={$item.id}">{$item.code}</a>
</td>
<td>{$item.name}</td>
<td>{$item.pkwiu}</td>
<td>{$item.weight}</td>
</tr>
{/foreach}
</tbody>
</table>
{/if}
{/if}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<ns1:IST xmlns:ns1="http://www.mf.gov.pl/xsd/Intrastat/IST.xsd" xmlns:ns2="http://www.mf.gov.pl/xsd/aesais/typy"
xmlns:ns3="http://www.w3.org/2000/09/xmldsig#">
<ns1:Deklaracja Data="{$today}" LacznaLiczbaPozycji="{$data|@count}" LacznaWartoscFaktur="{$total}" Miejscowosc="Toruń"
Miesiac="{$month}" NrWlasny="01{$month}{$year}TWIN" Numer="1" Rodzaj="D" Rok="{$year}" Typ="W" UC="420000" Wersja="1">
<ns1:PodmiotZobowiazany KodPocztowy="87-126" Miejscowosc="Obrowo" Nazwa="Twinpol sp. z o.o."
Nip="8792676609" Regon="36022300800000" UlicaNumer="Al. Lipowa 48" />
{foreach from=$data item="item"}
<ns1:Towar IdKontrahenta="{$item.nip}" KodTowarowy="{$item.pkwiu}" KrajPochodzenia="PL" {if $item.qty_intrastat}IloscUzupelniajacaJm="{$item.qty_intrastat}" {/if}KrajPrzeznaczeniaWysylki="{$item.country}" MasaNetto="{$item.weight}" OpisTowaru="{$item.description}" PozId="{$item.position}" RodzajTransakcji="11" WartoscFaktury="{$item.total}" />
{/foreach}
<ns1:Wypelniajacy Email="katarzynagorniak@twojedoradztwo.pl" NazwiskoImie="Katarzyna Górniak"
Telefon="506429209" />
</ns1:Deklaracja>
</ns1:IST>

View File

@@ -0,0 +1,79 @@
<script type="text/javascript" src="modules/EcmInvoiceOuts/javascript/multiDiscountCorrectInvoice.js"></script>
<ul class="tablist" style="width:100%;">
<li>
<a class="current" href="#">Podstawowe wyszukiwanie</a>
</li>
</ul>
<form action="index.php" method="get" name="searchInvoices">
<input type="hidden" name="module" value="EcmInvoiceOuts" />
<input type="hidden" name="action" value="multiDiscountCorrectInvoice" />
<input type="hidden" name="process" value="1" />
<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="5%" nowrap="nowrap">Data do</td>
<td class="dataField" width="10%" 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>
<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="{literal}open_popup( 'Accounts', 600, 400, '', true, false, {'call_back_function':'set_return','form_name':'searchInvoices','field_to_name_array':{'id':'account_id','name':'account_name'}}, 'single', true );{/literal}">
</td>
</tr>
</tbody>
</table>
<input class="button" name="submit" value="Szukaj" type="submit">
<input class="button" name="clear" value="Wyczyść" type="button" onclick="location.href='index.php?module=EcmInvoiceOuts&action=multiDiscountCorrectInvoice';">
</form>
{if $PROCESS=='1'}
<table class="list view" id="invTable">
<tbody>
<tr><th><input type="checkbox" id="invSelectAll"/></th><th>Numer faktury</th><th>Data rejestracji</th><th>Wartość netto</th></tr>
{foreach from=$INVOICES item=I}
<tr class="oddListRowS1">
<td><input type="checkbox" class="invcheckbox" name="inv[]" value="{$I.id}" style="text-align: center;"></td>
<td><a href="index.php?module=EcmInvoiceOuts&action=DetailView&record={$I.id}" target="new">{$I.document_no}</a></td>
<td>{$I.register_date}</td>
<td class="netto">{$I.total_netto}</td>
</tr>
{/foreach}
</tbody>
</table>
<br>
Obniż cenę jednostkową netto o:&nbsp<input value="0" id="discount" name="discount"/>&nbsp%.<br>
Przybliżona wartość korekty <p style="display:inline" id="total_info">0</p> zł.<br>
<input type="button" class="button" onClick="prepareData();" value="Przejdź do korekty"/>
{/if}