2019-07-09 16:43:08 +02:00
|
|
|
<?php
|
2020-09-07 15:04:06 +02:00
|
|
|
/*
|
|
|
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
2021-01-20 15:08:51 +01:00
|
|
|
* Copyright (C) DevCode s.r.l.
|
2020-09-07 15:04:06 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2019-07-09 16:43:08 +02:00
|
|
|
|
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
|
2024-05-23 11:36:25 +02:00
|
|
|
$year_start = date('Y', strtotime((string) $date_start));
|
|
|
|
$year_end = date('Y', strtotime((string) $date_end));
|
2019-07-09 16:43:08 +02:00
|
|
|
|
2019-07-09 18:29:40 +02:00
|
|
|
$esercizio = $year_start == $year_end ? ' - '.tr('Esercizio _YEAR_', [
|
2019-07-09 16:43:08 +02:00
|
|
|
'_YEAR_' => $year_end,
|
|
|
|
]) : '';
|
|
|
|
|
|
|
|
if ('entrata' == $dir) {
|
2022-01-15 18:03:47 +01:00
|
|
|
$titolo = tr('Registro iva vendite dal _START_ al _END_ _SEZIONALE_', [
|
2019-07-09 16:43:08 +02:00
|
|
|
'_START_' => Translator::dateToLocale($date_start),
|
|
|
|
'_END_' => Translator::dateToLocale($date_end),
|
2020-07-06 14:16:16 +02:00
|
|
|
'_SEZIONALE_' => (!empty($sezionale)) ? ' - '.$sezionale : '',
|
2019-07-09 16:43:08 +02:00
|
|
|
], ['upper' => true]);
|
|
|
|
} elseif ('uscita' == $dir) {
|
2022-01-15 18:03:47 +01:00
|
|
|
$titolo = tr('Registro iva acquisti dal _START_ al _END_ _SEZIONALE_', [
|
2019-07-09 16:43:08 +02:00
|
|
|
'_START_' => Translator::dateToLocale($date_start),
|
|
|
|
'_END_' => Translator::dateToLocale($date_end),
|
2020-07-06 14:16:16 +02:00
|
|
|
'_SEZIONALE_' => (!empty($sezionale)) ? ' - '.$sezionale : '',
|
2019-07-09 16:43:08 +02:00
|
|
|
], ['upper' => true]);
|
|
|
|
}
|
|
|
|
|
2019-07-09 18:29:40 +02:00
|
|
|
$tipo = $dir == 'entrata' ? tr('Cliente') : tr('Fornitore');
|
2020-01-14 16:15:34 +01:00
|
|
|
$i = 0;
|
2019-07-09 16:43:08 +02:00
|
|
|
|
|
|
|
echo '<h4><b>'.$titolo.'</b></h4>
|
|
|
|
|
2024-10-16 15:48:50 +02:00
|
|
|
<table class="table table-sm table-striped" border="0">
|
2019-07-09 16:43:08 +02:00
|
|
|
<thead>
|
2020-10-09 18:08:24 +02:00
|
|
|
<tr>
|
2022-01-17 14:52:54 +01:00
|
|
|
<th>'.tr('N° Prot.').'</th>
|
2021-07-26 17:47:30 +02:00
|
|
|
<th>'.tr('Data reg.').'</th>
|
2020-01-14 16:15:34 +01:00
|
|
|
<th>'.tr('N<sup>o</sup> doc.').'</th>
|
2020-07-01 18:10:00 +02:00
|
|
|
<th>'.tr('Data doc.').'</th>
|
2019-07-09 16:43:08 +02:00
|
|
|
<th>'.tr('Tipo').'</th>
|
|
|
|
<th>'.$tipo.'</th>
|
2020-07-27 15:40:54 +02:00
|
|
|
<th>'.tr('Tot. doc.').'</th>
|
2019-07-09 16:43:08 +02:00
|
|
|
<th>'.tr('Imponibile').'</th>
|
|
|
|
<th>%</th>
|
|
|
|
<th>'.tr('Iva').'</th>
|
|
|
|
<th>'.tr('Imposta').'</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>';
|