Add TPL files

This commit is contained in:
2025-05-12 15:46:37 +00:00
parent 4a4ed02e8a
commit b4d54ba40b
894 changed files with 120580 additions and 0 deletions

View File

@@ -0,0 +1,136 @@
<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>