mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-18 04:20:50 +01:00
Fix cambio stato intervento in fase di eliminazione riga da fattura
This commit is contained in:
parent
dfbed77adc
commit
e1e0369f4b
@ -182,7 +182,7 @@ trait RelationTrait
|
||||
{
|
||||
$result = parent::delete();
|
||||
|
||||
if (!empty($this->idintervento)) {
|
||||
if (!empty($this->idintervento) && $this->fattura->getRighe()->where('idintervento', $this->idintervento)->count()==1) {
|
||||
database()->query("UPDATE in_interventi SET idstatointervento = (SELECT idstatointervento FROM in_statiintervento WHERE codice = 'OK') WHERE id=".prepare($this->idintervento));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user