mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
totalizadores de servicios realizado
This commit is contained in:
@ -58,6 +58,34 @@ class Presupuestopreimpresiones extends \App\Controllers\GoBaseResourceControlle
|
||||
return $this->respond($data);
|
||||
}
|
||||
|
||||
public function update($requestedId = null)
|
||||
{
|
||||
|
||||
if ($requestedId == null) :
|
||||
return;
|
||||
endif;
|
||||
|
||||
$postData = $this->request->getJSON();
|
||||
$tarifas = array_column($postData->datos, 'tarifa_id');
|
||||
$result = [];
|
||||
|
||||
if(count($tarifas)>0){
|
||||
foreach ($tarifas as $tarifa){
|
||||
$values = $this->model->getPrecioTarifa($tarifa);
|
||||
array_push($result, $values);
|
||||
}
|
||||
}
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
$data = [
|
||||
'lines' => $result,
|
||||
$csrfTokenName => $newTokenHash
|
||||
];
|
||||
|
||||
return $this->respond($data);
|
||||
}
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
Reference in New Issue
Block a user