1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-27 00:06:14 +01:00
openstamanager/modules/fatture/variables.php

20 lines
728 B
PHP
Raw Normal View History

<?php
2018-06-23 15:41:32 +02:00
$r = $dbo->fetchOne('SELECT *,
(SELECT email FROM an_anagrafiche WHERE an_anagrafiche.idanagrafica=co_documenti.idanagrafica) AS email,
2018-11-12 18:49:51 +01:00
(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 [
2018-11-12 18:49:51 +01:00
'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']),
2018-08-11 15:49:46 +02:00
'id_anagrafica' => $r['idanagrafica'],
];
2018-11-12 18:49:51 +01:00