mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-18 10:15:05 +01:00
Bugfix
This commit is contained in:
parent
59395c5453
commit
f9248219ff
@ -39,12 +39,12 @@ $totale_ordini_cliente = $ordini_cliente->sum('totale_imponibile');
|
||||
$interventi = [];
|
||||
// Clienti
|
||||
if ($anagrafica->isTipo('Cliente')) {
|
||||
$interventi = $dbo->fetchArray('SELECT id FROM in_interventi WHERE in_interventi.idanagrafica='.prepare($id_record).' AND data_richiesta BETWEEN '.prepare($start).' AND '.prepare($end));
|
||||
$interventi = $dbo->fetchArray('SELECT in_interventi.id FROM in_interventi WHERE in_interventi.idanagrafica='.prepare($id_record).' AND data_richiesta BETWEEN '.prepare($start).' AND '.prepare($end));
|
||||
}
|
||||
|
||||
// Tecnici
|
||||
elseif ($anagrafica->isTipo('Tecnico')) {
|
||||
$interventi = $dbo->fetchArray('SELECT id FROM in_interventi INNER JOIN in_interventi_tecnici ON in_interventi.id = in_interventi_tecnici.idintervento WHERE in_interventi_tecnici.idtecnico='.prepare($id_record).' AND data_richiesta BETWEEN '.prepare($start).' AND '.prepare($end));
|
||||
$interventi = $dbo->fetchArray('SELECT in_interventi.id FROM in_interventi INNER JOIN in_interventi_tecnici ON in_interventi.id = in_interventi_tecnici.idintervento WHERE in_interventi_tecnici.idtecnico='.prepare($id_record).' AND data_richiesta BETWEEN '.prepare($start).' AND '.prepare($end));
|
||||
}
|
||||
|
||||
$interventi = Intervento::whereIn('id', array_column($interventi, 'id'))->get();
|
||||
|
Loading…
Reference in New Issue
Block a user