Skip to content

Commit 7e1cb26

Browse files
committed
feat: stampa gdpr in anagrafica
1 parent 0eb5146 commit 7e1cb26

4 files changed

Lines changed: 379 additions & 1 deletion

File tree

templates/GDPR/body.php

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
<?php
2+
3+
// Recupero le condizioni GDPR dalle impostazioni
4+
$condizioni_gdpr = setting('Condizioni GDPR');
5+
6+
echo "
7+
<table class='table' style='overflow:hidden;font-size:8pt;' autosize='0'>
8+
<tr>
9+
<th style='background-color:white;color:black;font-size:10pt;font-weight:bold;padding:3px;text-align:center;'>
10+
INFORMATIVA PRIVACY (Art. 13 GDPR)<br>
11+
</th>
12+
</tr>
13+
<tr style='border:0px;'>
14+
<td align='justify' style='border:0px;padding:3px;'>
15+
&nbsp;<br>
16+
</td>
17+
</tr>
18+
<tr>
19+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
20+
1. TITOLARE DEL TRATTAMENTO
21+
</th>
22+
</tr>
23+
<tr style='border:0px;'>
24+
<td align='justify' style='border:0px;padding:3px;'>
25+
Il Titolare del trattamento è $f_ragionesociale con sede in $f_indirizzo, $f_citta_full.<br>
26+
Codice Fiscale: $f_codicefiscale - P.IVA: $f_piva<br><br>
27+
Per qualsiasi informazione relativa al trattamento dei dati personali, è possibile contattare il Titolare all'indirizzo sopra indicato o all'email $f_email.
28+
</td>
29+
</tr>
30+
<tr style='border:0px;'>
31+
<td align='justify' style='border:0px;padding:3px;'>
32+
&nbsp;<br>
33+
</td>
34+
</tr>
35+
<tr>
36+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
37+
2. FINALITÀ DEL TRATTAMENTO
38+
</th>
39+
</tr>
40+
<tr style='border:0px;'>
41+
<td align='justify' style='border:0px;padding:3px;'>
42+
I dati personali raccolti saranno trattati per le seguenti finalità:<br>
43+
&bull; Esecuzione di obblighi contrattuali e precontrattuali<br>
44+
&bull; Adempimento di obblighi di legge (fiscali, contabili, ecc.)<br>
45+
&bull; Gestione amministrativa e commerciale della clientela<br>
46+
&bull; Attività di assistenza tecnica e supporto<br>
47+
&bull; Finalità marketing e promozionali (previo consenso)
48+
</td>
49+
</tr>
50+
<tr style='border:0px;'>
51+
<td align='justify' style='border:0px;padding:3px;'>
52+
&nbsp;<br>
53+
</td>
54+
</tr>
55+
<tr>
56+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
57+
3. BASE GIURIDICA DEL TRATTAMENTO
58+
</th>
59+
</tr>
60+
<tr style='border:0px;'>
61+
<td align='justify' style='border:0px;padding:3px;'>
62+
Il trattamento dei dati personali si basa sulle seguenti basi giuridiche previste dal GDPR:<br>
63+
&bull; Art. 6, comma 1, lett. b): esecuzione di un contratto<br>
64+
&bull; Art. 6, comma 1, lett. c): adempimento di un obbligo legale<br>
65+
&bull; Art. 6, comma 1, lett. f): legittimo interesse del titolare<br>
66+
&bull; Art. 6, comma 1, lett. a): consenso dell'interessato (per finalità marketing)
67+
</td>
68+
</tr>
69+
<tr style='border:0px;'>
70+
<td align='justify' style='border:0px;padding:3px;'>
71+
&nbsp;<br>
72+
</td>
73+
</tr>
74+
<tr>
75+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
76+
4. CATEGORIE DI DATI TRATTATI
77+
</th>
78+
</tr>
79+
<tr style='border:0px;'>
80+
<td align='justify' style='border:0px;padding:3px;'>
81+
Il trattamento riguarda i seguenti dati personali:<br>
82+
&bull; Dati anagrafici (nome, cognome, ragione sociale, ecc.)<br>
83+
&bull; Dati di contatto (indirizzo, telefono, email)<br>
84+
&bull; Dati fiscali (codice fiscale, partita IVA)<br>
85+
&bull; Dati bancari (IBAN per pagamenti)<br>
86+
&bull; Dati relativi a servizi e prodotti acquistati
87+
</td>
88+
</tr>
89+
<tr style='border:0px;'>
90+
<td align='justify' style='border:0px;padding:3px;'>
91+
&nbsp;<br>
92+
</td>
93+
</tr>
94+
<tr>
95+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
96+
5. DESTINATARI DEI DATI
97+
</th>
98+
</tr>
99+
<tr style='border:0px;'>
100+
<td align='justify' style='border:0px;padding:3px;'>
101+
I dati personali potranno essere comunicati a:<br>
102+
&bull; Dipendenti e collaboratori del Titolare<br>
103+
&bull; Professionisti e consulenti (avvocati, commercialisti, ecc.)<br>
104+
&bull; Autorità pubbliche e organi di controllo (per adempimenti di legge)<br>
105+
&bull; Banche e istituti finanziari (per gestione pagamenti)<br>
106+
&bull; Fornitori di servizi informatici e di comunicazione<br>
107+
I dati non saranno diffusi al pubblico.
108+
</td>
109+
</tr>
110+
<tr style='border:0px;'>
111+
<td align='justify' style='border:0px;padding:3px;'>
112+
&nbsp;<br>
113+
</td>
114+
</tr>
115+
<tr>
116+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
117+
6. TRASFERIMENTO DEI DATI VERSO PAESI TERZI
118+
</th>
119+
</tr>
120+
<tr style='border:0px;'>
121+
<td align='justify' style='border:0px;padding:3px;'>
122+
I dati personali non saranno trasferiti verso paesi terzi non appartenenti all'Unione Europea, salvo quanto necessario per l'esecuzione del contratto o previo consenso dell'interessato. In tal caso, il trasferimento avverrà in conformità alle disposizioni del GDPR (art. 44 e seguenti).
123+
</td>
124+
</tr>
125+
<tr style='border:0px;'>
126+
<td align='justify' style='border:0px;padding:3px;'>
127+
&nbsp;<br>
128+
</td>
129+
</tr>
130+
<tr>
131+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
132+
7. PERIODO DI CONSERVAZIONE DEI DATI
133+
</th>
134+
</tr>
135+
<tr style='border:0px;'>
136+
<td align='justify' style='border:0px;padding:3px;'>
137+
I dati personali saranno conservati per il tempo necessario al conseguimento delle finalità per cui sono stati raccolti e, in ogni caso, per il periodo previsto dalle normative vigenti:<br>
138+
&bull; Dati fiscali e contabili: 10 anni (art. 2220 c.c.)<br>
139+
&bull; Dati contrattuali: 10 anni dalla cessazione del rapporto<br>
140+
&bull; Dati marketing: fino a revoca del consenso<br>
141+
&bull; Backup e dati tecnici: per il tempo strettamente necessario all'intervento e comunque non oltre 30 giorni
142+
</td>
143+
</tr>
144+
<tr style='border:0px;'>
145+
<td align='justify' style='border:0px;padding:3px;'>
146+
&nbsp;<br>
147+
</td>
148+
</tr>
149+
</table>
150+
<div style='page-break-before:always'></div>
151+
<table class='table' style='overflow:hidden;font-size:8pt;' autosize='0'>
152+
<tr>
153+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
154+
8. DIRITTI DELL'INTERESSATO
155+
</th>
156+
</tr>
157+
<tr style='border:0px;'>
158+
<td align='justify' style='border:0px;padding:3px;'>
159+
L'interessato ha il diritto di esercitare i seguenti diritti previsti dagli artt. 15-22 del GDPR:<br>
160+
&bull; Diritto di accesso (art. 15)<br>
161+
&bull; Diritto di rettifica (art. 16)<br>
162+
&bull; Diritto alla cancellazione (diritto all'oblio) (art. 17)<br>
163+
&bull; Diritto di limitazione del trattamento (art. 18)<br>
164+
&bull; Diritto alla portabilità dei dati (art. 20)<br>
165+
&bull; Diritto di opposizione (art. 21)<br>
166+
&bull; Diritto di non essere sottoposto a processi decisionali automatizzati (art. 22)<br>
167+
&bull; Diritto di revocare il consenso in qualsiasi momento<br><br>
168+
Per esercitare tali diritti, l'interessato può inviare una richiesta all'indirizzo email $f_email o per iscritto alla sede del Titolare.
169+
</td>
170+
</tr>
171+
<tr style='border:0px;'>
172+
<td align='justify' style='border:0px;padding:3px;'>
173+
&nbsp;<br>
174+
</td>
175+
</tr>
176+
<tr>
177+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
178+
9. DIRITTO DI RECLAMO
179+
</th>
180+
</tr>
181+
<tr style='border:0px;'>
182+
<td align='justify' style='border:0px;padding:3px;'>
183+
L'interessato ha il diritto di proporre reclamo all'Autorità Garante per la protezione dei dati personali (Garante Privacy) qualora ritenga che il trattamento dei suoi dati sia avvenuto in violazione della normativa vigente. Il reclamo può essere presentato presso la sede del Garante (Piazza Venezia, 11 - 00186 Roma) o tramite il sito web www.garanteprivacy.it.
184+
</td>
185+
</tr>
186+
<tr style='border:0px;'>
187+
<td align='justify' style='border:0px;padding:3px;'>
188+
&nbsp;<br>
189+
</td>
190+
</tr>
191+
<tr>
192+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
193+
10. OBBLIGATORIETÀ O FACOLTATIVITÀ DEL CONFERIMENTO
194+
</th>
195+
</tr>
196+
<tr style='border:0px;'>
197+
<td align='justify' style='border:0px;padding:3px;'>
198+
Il conferimento dei dati personali è obbligatorio per le finalità connesse all'esecuzione del contratto e all'adempimento degli obblighi di legge. Il rifiuto di conferire tali dati comporta l'impossibilità di instaurare o proseguire il rapporto contrattuale. Il conferimento dei dati per finalità di marketing è facoltativo e il mancato consenso non ha alcuna conseguenza sul rapporto contrattuale.
199+
</td>
200+
</tr>";
201+
202+
// Mostra la sezione Condizioni Generali solo se specificata
203+
if (!empty($condizioni_gdpr)) {
204+
echo "
205+
<tr style='border:0px;'>
206+
<td align='justify' style='border:0px;padding:3px;'>
207+
&nbsp;<br>
208+
</td>
209+
</tr>
210+
<tr>
211+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
212+
11. CONDIZIONI GENERALI
213+
</th>
214+
</tr>
215+
<tr style='border:0px;'>
216+
<td align='justify' style='border:0px;padding:3px;'>
217+
".nl2br($condizioni_gdpr)."
218+
</td>
219+
</tr>";
220+
}
221+
222+
echo "
223+
<tr style='border:0px;'>
224+
<td align='justify' style='border:0px;padding:3px;'>
225+
&nbsp;<br>&nbsp;<br>
226+
</td>
227+
</tr>";
228+
229+
$firma = !empty($anagrafica['firma_file']) ? '<img src="'.DOCROOT.'/files/anagrafiche/'.$anagrafica['firma_file'].'" style="width:60mm;">' : '';
230+
231+
echo "
232+
<tr>
233+
<td align='justify' style='padding:3px;'>
234+
<table style='width:100%'>
235+
<tr>
236+
<td style='width:60%;padding:0px;'>
237+
Luogo e Data: ___________________________<br>
238+
IL CLIENTE (Firma per accettazione)
239+
</td>
240+
<td style='width:40%'>
241+
Firma<br>".($firma!=''?$firma:'<br><br>.............................')."
242+
</td>
243+
</tr>
244+
</table>
245+
</td>
246+
</tr>
247+
<tr style='border:0px;'>
248+
<td align='justify' style='border:0px;padding:3px;'>
249+
&nbsp;<br>
250+
</td>
251+
</tr>
252+
<tr style='border:0px;'>
253+
<td align='justify' style='border:0px;padding:3px;'>
254+
&nbsp;<br>&nbsp;<br>
255+
</td>
256+
</tr>
257+
<tr>
258+
<th style='background-color:#dbe5f1;font-size:9pt;font-weight:bold;padding:3px;'>
259+
CONSENSI PRIVACY E MARKETING
260+
</th>
261+
</tr>
262+
<tr>
263+
<td align='justify' style='padding:3px;'>
264+
1. PRESA VISIONE INFORMATIVA (Obbligatorio)<br>
265+
Dichiaro di aver ricevuto l'informativa privacy e compreso le modalità di trattamento dei miei dati personali ai sensi del Regolamento (UE) 2016/679 (GDPR).<br>
266+
[X] Confermo<br><br>
267+
268+
2. MARKETING GENERICO (Facoltativo)<br>
269+
Acconsento all'invio di comunicazioni promozionali, newsletter e materiale informativo tramite email, SMS, WhatsApp o altri mezzi di comunicazione.<br>
270+
[ ] Acconsento &nbsp;&nbsp; [ ] Non acconsento<br><br>
271+
272+
3. PROFILAZIONE (Facoltativo)<br>
273+
Acconsento all'analisi dei miei dati di acquisto e alle preferenze manifestate per ricevere offerte personalizzate e servizi su misura.<br>
274+
[ ] Acconsento &nbsp;&nbsp; [ ] Non acconsento<br><br>
275+
276+
4. CESSIONE DATI A TERZI (Facoltativo)<br>
277+
Acconsento alla cessione dei miei dati a partner commerciali selezionati per finalità promozionali.<br>
278+
[ ] Acconsento &nbsp;&nbsp; [ ] Non acconsento<br><br>
279+
</td>
280+
</tr>";
281+
282+
$firma = !empty($anagrafica['firma_file']) ? '<img src="'.DOCROOT.'/files/anagrafiche/'.$anagrafica['firma_file'].'" style="width:60mm;">' : '';
283+
284+
echo "
285+
<tr>
286+
<td align='justify' style='padding:3px;'>
287+
<table style='width:100%'>
288+
<tr>
289+
<td style='width:60%;padding:0px;'>
290+
$f_citta_full, lì ".date('d/m/Y')." (data)<br>
291+
IL CLIENTE (Seconda Firma Obbligatoria)
292+
</td>
293+
<td style='width:40%'>
294+
Firma<br>".($firma!=''?$firma:'<br><br>.............................')."
295+
</td>
296+
</tr>
297+
</table>
298+
</td>
299+
</tr>
300+
</table>";
301+
302+
?>

templates/GDPR/init.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
5+
* Copyright (C) DevCode s.r.l.
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
include_once __DIR__.'/../../core.php';
22+
23+
use Modules\Anagrafiche\Anagrafica;
24+
25+
$anagrafica = Anagrafica::find($id_record);

templates/GDPR/settings.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/*
4+
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
5+
* Copyright (C) DevCode s.r.l.
6+
*
7+
* This program is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
$settings = [
22+
'orientation' => 'P',
23+
'format' => 'A4',
24+
'font-size' => 8,
25+
'margins' => [
26+
'top' => 'auto',
27+
'bottom' => 'auto',
28+
'left' => 12,
29+
'right' => 12,
30+
],
31+
'header-font-size' => 10,
32+
];
33+
34+
return $settings;

update/2_11.sql

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,21 @@ INSERT INTO `zz_settings_lang` (`id_lang`, `id_record`, `title`, `help`) VALUES
223223
(1, (SELECT MAX(`id`)-1 FROM `zz_settings`), 'Conto per Iva su acquisti Reverse charge', ''),
224224
(2, (SELECT MAX(`id`)-1 FROM `zz_settings`), 'Account for IVA on purchases with reverse charge', ''),
225225
(1, (SELECT MAX(`id`) FROM `zz_settings`), 'Conto per Iva su vendite Reverse charge', ''),
226-
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'Account for IVA on sales with reverse charge', '');
226+
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'Account for IVA on sales with reverse charge', '');
227+
228+
-- Aggiunta stampa GDPR
229+
INSERT INTO `zz_prints` (`id_module`, `is_record`, `name`, `directory`, `previous`, `options`, `icon`, `version`, `compatibility`, `order`, `predefined`, `enabled`) VALUES
230+
((SELECT `id` FROM `zz_modules` WHERE `name`='Anagrafiche'), '1', 'GDPR', 'GDPR', 'idanagrafica', '', 'fa fa-print', '', '', '0', '0', '1');
231+
232+
-- Traduzioni stampa GDPR
233+
INSERT INTO `zz_prints_lang` (`id_lang`, `id_record`, `title`, `filename`) VALUES
234+
(1, (SELECT `id` FROM `zz_prints` WHERE `name` = 'GDPR'), 'GDPR', 'GDPR'),
235+
(2, (SELECT `id` FROM `zz_prints` WHERE `name` = 'GDPR'), 'GDPR', 'GDPR');
236+
237+
-- Aggiunta impostazione Condizioni GDPR
238+
INSERT INTO `zz_settings` (`nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES
239+
('Condizioni GDPR', '', 'ckeditor', 1, 'Generali');
240+
241+
INSERT INTO `zz_settings_lang` (`id_lang`, `id_record`, `title`, `help`) VALUES
242+
(1, (SELECT MAX(`id`) FROM `zz_settings`), 'Condizioni GDPR', 'Condizioni generali da includere nella stampa GDPR'),
243+
(2, (SELECT MAX(`id`) FROM `zz_settings`), 'GDPR Terms', 'General terms to include in GDPR print');

0 commit comments

Comments
 (0)