1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-28 16:50:06 +01:00

Fix rimozione riga singola intervento in fattura

This commit is contained in:
Matteo Baccarin 2020-01-29 09:37:11 +01:00
parent cfad7fd3e4
commit 94070ce0e0

View File

@ -485,15 +485,12 @@ switch (post('op')) {
if (!empty($riga)) {
try {
$righe = $fattura->getRighe();
$righe_intervento = $righe->where('idintervento', $riga->idintervento);
foreach ($righe_intervento as $r) {
$r->delete();
}
$riga->delete();
flash()->info(tr('Intervento _NUM_ rimosso!', [
'_NUM_' => $idintervento,
]));
} catch (InvalidArgumentException $e) {
flash()->error(tr('Errore durante l\'eliminazione della riga!'));
}