1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-22 05:23:41 +01:00
openstamanager/modules/interventi/api/delete.php

27 lines
706 B
PHP
Raw Normal View History

2018-08-29 18:06:51 +02:00
<?php
switch ($resource) {
case 'sessioni_intervento':
2018-09-03 10:03:27 +02:00
$dbo->query('DELETE FROM `in_interventi_tecnici` WHERE `idintervento` = :id_intervento AND `idtecnico` = :id_tecnico', [
':id_intervento' => $request['id_intervento'],
':id_tecnico' => $user['idanagrafica'],
]);
2018-08-29 18:06:51 +02:00
break;
case 'articoli_intervento':
2018-09-03 10:03:27 +02:00
$dbo->query('DELETE FROM `mg_articoli_interventi` WHERE `idintervento` = :id_intervento', [
2018-08-29 18:06:51 +02:00
':id_intervento' => $request['id_intervento'],
]);
// TODO: prevedere la modifica di quantità!
2018-08-31 17:33:33 +02:00
// TODO: prevedere causali
2018-08-29 18:06:51 +02:00
break;
}
return [
'sessioni_intervento',
'articoli_intervento',
];