Roberto Santini 1 semana atrás
pai
commit
2190e2426e
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      app/Models/ContrattoServizio.php

+ 3
- 3
app/Models/ContrattoServizio.php Ver arquivo

313
             $this->todos()->delete();
313
             $this->todos()->delete();
314
         }
314
         }
315
 
315
 
316
-        $template = ContrattoTemplate::with('contrattoTemplateTodos')->find($this->contratto_template_id);
316
+        $template = ContrattoTemplate::with('todos')->find($this->contratto_template_id);
317
         if (! $template) {
317
         if (! $template) {
318
             return 0;
318
             return 0;
319
         }
319
         }
320
 
320
 
321
         $count = 0;
321
         $count = 0;
322
-        foreach ($template->contrattoTemplateTodos as $todo) {
322
+        foreach ($template->todos as $todo) {
323
             if (! $todo->attivo) {
323
             if (! $todo->attivo) {
324
                 continue;
324
                 continue;
325
             }
325
             }
364
             $this->righe()->delete();
364
             $this->righe()->delete();
365
         }
365
         }
366
 
366
 
367
-        $template = ContrattoTemplate::with('contrattoTemplateRigas.prodotto')->find($this->contratto_template_id);
367
+        $template = ContrattoTemplate::with('righe.prodotto')->find($this->contratto_template_id);
368
         if (! $template) {
368
         if (! $template) {
369
             return 0;
369
             return 0;
370
         }
370
         }

Carregando…
Cancelar
Salvar