1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-26 15:54:17 +01:00

Fix aggiunta referente

This commit is contained in:
MatteoPistorello 2022-02-09 11:48:01 +01:00
parent a9429eb4b9
commit c06e8f725e

View File

@ -24,6 +24,8 @@ $operazione = filter('op');
switch ($operazione) {
case 'addreferente':
if (!empty(post('nome'))) {
$opt_out_newsletter = post('disable_newsletter');
$dbo->insert('an_referenti', [
'idanagrafica' => $id_parent,
'nome' => post('nome'),
@ -31,6 +33,7 @@ switch ($operazione) {
'telefono' => post('telefono'),
'email' => post('email'),
'idsede' => post('idsede'),
'enable_newsletter' => empty($opt_out_newsletter),
]);
$id_record = $dbo->lastInsertedID();
@ -55,7 +58,6 @@ switch ($operazione) {
'telefono' => post('telefono'),
'email' => post('email'),
'idsede' => post('idsede'),
'enable_newsletter' => empty($opt_out_newsletter),
], ['id' => $id_record]);