mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Aggiunta azione di gruppo per cambio relazione anagrafiche
This commit is contained in:
parent
dd2b4b3985
commit
9bd34be376
@ -77,6 +77,19 @@ switch (post('op')) {
|
|||||||
|
|
||||||
download($file, 'anagrafiche.csv');
|
download($file, 'anagrafiche.csv');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'cambia-relazione':
|
||||||
|
$idrelazione = post('idrelazione');
|
||||||
|
|
||||||
|
foreach ($id_records as $id) {
|
||||||
|
$anagrafica = Anagrafica::find($id);
|
||||||
|
|
||||||
|
$anagrafica->idrelazione = $idrelazione;
|
||||||
|
|
||||||
|
$anagrafica->save();
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$operations = [];
|
$operations = [];
|
||||||
@ -113,4 +126,13 @@ if (App::debug() && $google) {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$operations['cambia-relazione'] = [
|
||||||
|
'text' => '<span><i class="fa fa-copy"></i> '.tr('Cambia relazione').'</span>',
|
||||||
|
'data' => [
|
||||||
|
'msg' => tr('Vuoi davvero cambiare la relazione delle anagrafiche selezionate?').'<br><br>{[ "type": "select", "label": "'.tr('Relazione con il cliente').'", "name": "idrelazione", "required": 1, "ajax-source": "relazioni"]}',
|
||||||
|
'button' => tr('Procedi'),
|
||||||
|
'class' => 'btn btn-lg btn-warning',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
return $operations;
|
return $operations;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user