|
|
@@ -360,6 +360,7 @@ class IssueController extends Controller
|
|
360
|
360
|
$tempoImpiegatoOnSite = Issue::getTempoImpiegato($issue->id, [Config::getValue(Config::ATTIVITA_ON_SITE), Config::TECNICO_AGGIUNTIVO], $from, $to, 'Sì');
|
|
361
|
361
|
$tempoImpiegatoRemota = Issue::getTempoImpiegato($issue->id, [Config::getValue(Config::ATTIVITA_REMOTA)], $from, $to, 'Sì');
|
|
362
|
362
|
|
|
|
363
|
+ // dd($tempoImpiegatoOnSite);
|
|
363
|
364
|
foreach($tempoImpiegatoOnSite as $tempo){
|
|
364
|
365
|
// arrotondamento tempo
|
|
365
|
366
|
$ore = $tempo->hours;
|
|
|
@@ -376,15 +377,17 @@ class IssueController extends Controller
|
|
376
|
377
|
'quantita' => $ore]
|
|
377
|
378
|
);
|
|
378
|
379
|
|
|
379
|
|
- if($tempo->activity_id == Config::getValue(Config::ATTIVITA_ON_SITE)){
|
|
|
380
|
+ // if($tempo->activity->id == Config::getValue(Config::ATTIVITA_ON_SITE)){
|
|
380
|
381
|
$collectionIssue->push([
|
|
381
|
382
|
'nome' => "Diritto fisso di uscita - #".$issue->id." - ".$sedeCliente." - ".$data,
|
|
382
|
383
|
'codice' => 'INT-USC',
|
|
383
|
384
|
'quantita' => 1]
|
|
384
|
385
|
);
|
|
385
|
|
- }
|
|
|
386
|
+ // }
|
|
386
|
387
|
}
|
|
387
|
388
|
|
|
|
389
|
+ // return;
|
|
|
390
|
+
|
|
388
|
391
|
foreach($tempoImpiegatoRemota as $tempo){
|
|
389
|
392
|
$collectionIssue->push([
|
|
390
|
393
|
'nome' => "Intervento Tecnico #".$issue->id." ".$issue->subject." - ".Carbon::parse($tempo->spent_on)->format('d/m/Y'),
|
|
|
@@ -402,6 +405,8 @@ class IssueController extends Controller
|
|
402
|
405
|
$filename = 'issues';
|
|
403
|
406
|
}
|
|
404
|
407
|
|
|
|
408
|
+ //dump($collectionIssue);
|
|
|
409
|
+
|
|
405
|
410
|
return Excel::download(new IssueExport($collectionIssue), $filename.'.xlsx');
|
|
406
|
411
|
}else{
|
|
407
|
412
|
Session::flash('flash_message', "Nessun progetto selezionato!");
|