mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-18 04:20:50 +01:00
Fix: Fix controllo stati contratti omonimi al salvataggio
This commit is contained in:
parent
124dc445be
commit
609baea3f9
@ -24,7 +24,7 @@ use Modules\Contratti\Stato;
|
||||
switch (post('op')) {
|
||||
case 'update':
|
||||
$descrizione = post('descrizione');
|
||||
$stato_new = Stato::where('name', $descrizione)->first();
|
||||
$stato_new = Stato::where('name', $descrizione)->where('id','!=', $id_record)->first();
|
||||
|
||||
if ($stato_new) {
|
||||
flash()->error(tr('Questo nome è già stato utilizzato per un altro stato dei contratti.'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user