mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
comparador cubierta y sobrecubierta terminado
This commit is contained in:
@ -660,7 +660,9 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
public function obtenerComparadorExteriores()
|
||||
{
|
||||
|
||||
$resultado = [];
|
||||
$lineasCubierta = null;
|
||||
$lineasSobrecubierta = null;
|
||||
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$cubierta = $this->request->getPost('cubierta') ?? false;
|
||||
@ -676,9 +678,9 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
$datosPedido = $cubierta['datosPedido'];
|
||||
$papel_generico = $cubierta['papel_generico'];
|
||||
$gramaje = $cubierta['gramaje'];
|
||||
$paginas_color = $this->request->getPost('paginas_color') ?? 0;
|
||||
$tipo_impresion_id = $this->request->getPost('tipo_impresion_id');
|
||||
$uso = $this->request->getPost('uso');
|
||||
$paginas_color = $cubierta['datosPedido']['paginas'] ?? 0;
|
||||
$tipo_impresion_id = $cubierta['tipo_impresion_id'];
|
||||
$uso = $cubierta['uso'];
|
||||
$lomoRedondo = $cubierta['lomoRedondo'] ?? false;
|
||||
|
||||
$data = array(
|
||||
@ -693,8 +695,7 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
'uso' => $uso,
|
||||
'lomoRedondo' => $lomoRedondo
|
||||
);
|
||||
$lineas = PresupuestoClienteService::obtenerCubierta($data, true);
|
||||
$resultado['cubierta'] = $lineas;
|
||||
$lineasCubierta = PresupuestoClienteService::obtenerCubierta($data, true);
|
||||
}
|
||||
|
||||
if ($sobrecubierta) {
|
||||
@ -703,9 +704,9 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
$datosPedido = $sobrecubierta['datosPedido'];
|
||||
$papel_generico = $sobrecubierta['papel_generico'];
|
||||
$gramaje = $sobrecubierta['gramaje'];
|
||||
$paginas_color = $this->request->getPost('paginas_color') ?? 0;
|
||||
$tipo_impresion_id = $this->request->getPost('tipo_impresion_id');
|
||||
$uso = $this->request->getPost('uso');
|
||||
$paginas_color = $sobrecubierta['datosPedido']['paginas'] ?? 0;
|
||||
$tipo_impresion_id = $sobrecubierta['tipo_impresion_id'];
|
||||
$uso = $sobrecubierta['uso'];
|
||||
|
||||
$data = array(
|
||||
'cliente_id' => $cliente_id,
|
||||
@ -718,14 +719,16 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
'tipo_impresion_id' => $tipo_impresion_id,
|
||||
'uso' => $uso
|
||||
);
|
||||
$lineas = PresupuestoClienteService::obtenerSobrecubierta($data, true);
|
||||
$resultado['sobrecubierta'] = $lineas;
|
||||
$lineasSobrecubierta = PresupuestoClienteService::obtenerSobrecubierta($data, true);
|
||||
}
|
||||
|
||||
|
||||
return $this->respond(
|
||||
[
|
||||
'status' => 1,
|
||||
'data' => $resultado
|
||||
'data' => (object) array(
|
||||
'cubierta' => $lineasCubierta,
|
||||
'sobrecubierta' => $lineasSobrecubierta
|
||||
)
|
||||
]
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user