mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Fix cambio stato interventi in fase di fatturazione
This commit is contained in:
parent
aed5aa1a66
commit
9eaa601732
@ -255,10 +255,12 @@ class Contratto extends Document
|
||||
$interventi = $this->interventi;
|
||||
$stato_intervento = \Modules\Interventi\Stato::where('codice', $codice_intervento)->first();
|
||||
foreach ($interventi as $intervento) {
|
||||
if ($intervento->stato->is_completato==1) {
|
||||
$intervento->stato()->associate($stato_intervento);
|
||||
$intervento->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Metodi statici
|
||||
|
||||
|
@ -283,11 +283,13 @@ class Preventivo extends Document
|
||||
$interventi = $this->interventi;
|
||||
$stato_intervento = \Modules\Interventi\Stato::where('codice', $codice_intervento)->first();
|
||||
foreach ($interventi as $intervento) {
|
||||
if ($intervento->stato->is_completato==1) {
|
||||
$intervento->stato()->associate($stato_intervento);
|
||||
$intervento->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Metodi statici
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user