Completamento invio PEC
This commit is contained in:
parent
e2d4e0df8d
commit
cf498a7c56
|
@ -2,15 +2,18 @@
|
|||
|
||||
$r = $dbo->fetchOne('SELECT *,
|
||||
(SELECT email FROM an_anagrafiche WHERE an_anagrafiche.idanagrafica=co_documenti.idanagrafica) AS email,
|
||||
(SELECT pec FROM an_anagrafiche WHERE an_anagrafiche.idanagrafica=co_documenti.idanagrafica) AS pec
|
||||
(SELECT pec FROM an_anagrafiche WHERE an_anagrafiche.idanagrafica=co_documenti.idanagrafica) AS pec,
|
||||
(SELECT pec FROM zz_smtps WHERE zz_smtps.id='.$template['id_smtp'].') AS is_pec
|
||||
FROM co_documenti WHERE id='.prepare($id_record));
|
||||
|
||||
// Variabili da sostituire
|
||||
return [
|
||||
'email' => $template['name'] == 'Fattura Elettronica' ? $r['pec'] : $r['email'],
|
||||
'email' => $r['is_pec'] ? $r['pec'] : $r['email'],
|
||||
'id_anagrafica' => $r['idanagrafica'],
|
||||
'numero' => empty($r['numero_esterno']) ? $r['numero'] : $r['numero_esterno'],
|
||||
'note' => $r['note'],
|
||||
'data' => Translator::dateToLocale($r['data']),
|
||||
'id_anagrafica' => $r['idanagrafica'],
|
||||
];
|
||||
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class EmailNotification extends Notification
|
|||
}
|
||||
|
||||
/**
|
||||
* Aggiunge un destinataro alla notifica.
|
||||
* Aggiunge un destinatario alla notifica.
|
||||
*
|
||||
* @param string $value
|
||||
* @param string $type
|
||||
|
|
|
@ -640,7 +640,7 @@ UPDATE `zz_group_module` SET `name` = 'Mostra ai clienti solo i propri impianti'
|
|||
|
||||
|
||||
-- Importazione dell'account email PEC
|
||||
INSERT INTO `zz_smtps` (`id`, `name`, `note`, `server`, `port`, `username`, `password`, `from_name`, `from_address`, `encryption`, `pec`, `predefined`) VALUES (NULL, 'PEC aziendale', '', '', '', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `zz_smtps` (`id`, `name`, `note`, `server`, `port`, `username`, `password`, `from_name`, `from_address`, `encryption`, `pec`, `predefined`) VALUES (NULL, 'PEC aziendale', '', '', '', '', '', '', '', '', '1', '0');
|
||||
|
||||
INSERT INTO `zz_emails` (`id`, `id_module`, `id_smtp`, `name`, `icon`, `subject`, `reply_to`, `cc`, `bcc`, `body`, `read_notify`, `predefined`) VALUES (NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fatture di vendita'), (SELECT `id` FROM `zz_smtps` WHERE `pec` = 1 LIMIT 0,1), 'PEC', 'fa fa-file', 'Invio fattura numero {numero} del {data}', '', 'sdi01@pec.fatturapa.it', '', '<p>Gentile Cliente,</p>\r\n<p>inviamo in allegato la fattura numero {numero} del {data}.</p>\r\n<p> </p>\r\n<p>Distinti saluti</p>\r\n', '0', '0');
|
||||
|
||||
|
|
Loading…
Reference in New Issue