mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ya funciona añadir los servicios
This commit is contained in:
@ -42,15 +42,14 @@ class Presupuestoacabados extends \App\Controllers\GoBaseResourceController
|
||||
endif;
|
||||
|
||||
$postData = $this->request->getJSON();
|
||||
$tarifas = array_column($postData->datos, 'tarifa_id');
|
||||
if(count($tarifas)>0){
|
||||
$this->model->deleteServiciosNotInArray($requestedId, $tarifas);
|
||||
if(count($postData->datos)>0){
|
||||
$this->model->deleteServiciosNotInArray($requestedId, $postData->datos);
|
||||
}
|
||||
else{
|
||||
$this->model->deleteAllServicios($requestedId);
|
||||
}
|
||||
|
||||
if(count($tarifas)>0){
|
||||
if(count($postData->datos)>0){
|
||||
$this->model->updateTarifas($requestedId, $postData->datos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user