mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
finalizado nuevo presupuesto cliente a falta de confirmar
This commit is contained in:
@ -229,6 +229,25 @@ class Clientedirecciones extends \App\Controllers\BaseResourceController
|
||||
}
|
||||
}
|
||||
|
||||
public function getDireccionPresupuesto($id)
|
||||
{
|
||||
try {
|
||||
$model = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
||||
$resourceData = $model->getDireccion($id);
|
||||
$response = (object)[
|
||||
'error' => false,
|
||||
'data' => $resourceData
|
||||
];
|
||||
return $this->respond($response);
|
||||
} catch (\Exception $e) {
|
||||
$response = (object)[
|
||||
'error' => true,
|
||||
'message' => $e->getMessage()
|
||||
];
|
||||
return $this->fail($response);
|
||||
}
|
||||
}
|
||||
|
||||
public function datatable_editor()
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
@ -994,74 +994,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
;
|
||||
/*
|
||||
|
||||
if (this.datos.tipo == "cosido") {
|
||||
this.datos.paginasCuadernillo = this.datosGenerales.paginasCuadernillo.val();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//////////////////////////
|
||||
this.datos = {
|
||||
|
||||
|
||||
tamanio: this.datosGenerales.getDimensionLibro(),
|
||||
tirada: this.datosGenerales.getTiradas(),
|
||||
paginas: this.datosGenerales.paginas.val(),
|
||||
paginasColor: this.datosGenerales.paginasColor.val(),
|
||||
paginasCuadernillo: this.datosGenerales.paginasCuadernillo.val(),
|
||||
papelInteriorDiferente: this.datosGenerales.papelDiferente.is(':checked') ? 1 : 0,
|
||||
|
||||
tipo: this.datosGenerales.tiposLibro.filter('.selected').attr('id'),
|
||||
|
||||
isColor: this.datosGenerales.getIsColor() ? 1 : 0,
|
||||
isHq: this.disenioInterior.getIsHq() ? 1 : 0,
|
||||
|
||||
interior: {
|
||||
papelInterior: this.disenioInterior.getPapel(),
|
||||
gramajeInterior: this.disenioInterior.getGramaje(),
|
||||
},
|
||||
|
||||
cubierta: {
|
||||
tipoCubierta: this.disenioCubierta.disenioCubierta.filter('.selected').attr('id'),
|
||||
papelCubierta: this.disenioCubierta.getPapel(),
|
||||
gramajeCubierta: this.disenioCubierta.getGramaje(),
|
||||
cabezada: this.disenioCubierta.getCabezada(),
|
||||
acabados: this.disenioCubierta.getAcabados(),
|
||||
carasImpresion: this.disenioCubierta.carasCubierta.val(),
|
||||
},
|
||||
|
||||
guardas: this.disenioCubierta.getGuardas(),
|
||||
sobrecubierta: this.disenioCubierta.getSobrecubierta(),
|
||||
faja: this.disenioCubierta.getFaja(),
|
||||
|
||||
|
||||
let solapasCubierta = this.disenioCubierta.getSolapasCubierta();
|
||||
if (solapasCubierta !== null && solapasCubierta !== undefined) {
|
||||
|
||||
if (solapasCubierta === false)
|
||||
this.datos.cubierta.solapas = 0;
|
||||
else {
|
||||
this.datos.cubierta.solapas = 1;
|
||||
this.datos.cubierta.tamanioSolapas = solapasCubierta;
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.datos.cubierta.solapas = 0;
|
||||
}
|
||||
|
||||
if (this.direcciones.direcciones.length > 0) {
|
||||
this.datos.direcciones = [];
|
||||
for (let i = 0; i < this.direcciones.direcciones.length; i++) {
|
||||
this.datos.direcciones.push(this.direcciones.direcciones[i].getFormData());
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
////////////////////////////////////////////////////////*/
|
||||
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
|
||||
Reference in New Issue
Block a user