mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Fix minore
This commit is contained in:
parent
09b2f3d236
commit
70d48973bd
@ -110,7 +110,7 @@ switch (post('op')) {
|
||||
$new->numero = Preventivo::getNextNumero(Carbon::now(), $new->id_segment);
|
||||
$new->data_bozza = Carbon::now();
|
||||
|
||||
$stato_preventivo = Stato::where('descrizione', '=', 'Bozza')->first();
|
||||
$stato_preventivo = (new Stato())->getByName('Bozza')->id_record;
|
||||
$new->stato()->associate($stato_preventivo);
|
||||
|
||||
$new->save();
|
||||
@ -385,7 +385,7 @@ switch (post('op')) {
|
||||
// Copia del preventivo
|
||||
$new = $preventivo->replicate();
|
||||
|
||||
$stato_preventivo = Stato::where('descrizione', '=', 'Bozza')->first();
|
||||
$stato_preventivo = (new Stato())->getByName('Bozza')->id_record;
|
||||
$new->stato()->associate($stato_preventivo);
|
||||
|
||||
$new->save();
|
||||
|
@ -275,7 +275,7 @@ class Preventivo extends Document
|
||||
$codice_intervento = 'OK';
|
||||
}
|
||||
|
||||
$stato = Stato::where('descrizione', $descrizione)->first();
|
||||
$stato = (new Stato())->getByName($descrizione)->id_record;
|
||||
$this->stato()->associate($stato);
|
||||
$this->save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user