mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado grapado
This commit is contained in:
@ -728,6 +728,8 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
'servicios' => $reqData['servicios'] ?? [],
|
'servicios' => $reqData['servicios'] ?? [],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$datos_presupuesto['id'] = $id;
|
||||||
|
|
||||||
$resultado_presupuesto = $this->calcular_presupuesto($datos_presupuesto, $selected_tirada, true);
|
$resultado_presupuesto = $this->calcular_presupuesto($datos_presupuesto, $selected_tirada, true);
|
||||||
|
|
||||||
if (isset($resultado_presupuesto['errors'])) {
|
if (isset($resultado_presupuesto['errors'])) {
|
||||||
@ -1402,7 +1404,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
if ($interior == -1) {
|
if ($interior == -1) {
|
||||||
$errorModel = new ErrorPresupuesto();
|
$errorModel = new ErrorPresupuesto();
|
||||||
$errorModel->insertError(
|
$errorModel->insertError(
|
||||||
$datos_entrada['id'],
|
$datos_entrada['id']==0?null:$datos_entrada['id'],
|
||||||
auth()->user()->id,
|
auth()->user()->id,
|
||||||
'
|
'
|
||||||
No se puede obtener el interior',
|
No se puede obtener el interior',
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class Direcciones {
|
|||||||
validators: {
|
validators: {
|
||||||
callback: {
|
callback: {
|
||||||
callback: () => {
|
callback: () => {
|
||||||
const div = $('#divErrorEnvios'); // Selecciona el div
|
/* const div = $('#divErrorEnvios'); // Selecciona el div
|
||||||
|
|
||||||
div.find('.fv-plugins-message-container').remove();
|
div.find('.fv-plugins-message-container').remove();
|
||||||
|
|
||||||
@ -149,6 +149,8 @@ class Direcciones {
|
|||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
return false;
|
return false;
|
||||||
|
*/
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -439,7 +439,11 @@ class PresupuestoCliente {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
popSuccessAlert(response.message);
|
if(response.error){
|
||||||
|
popErrorAlert("No se ha podido guardar el presupuesto. Por favor, póngase en contacto con el departamento comercial.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
popSuccessAlert(response.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
() => { $('#loader').modal('hide'); }
|
() => { $('#loader').modal('hide'); }
|
||||||
|
|||||||
@ -11,10 +11,14 @@ class previewFormas {
|
|||||||
this.alto = datos.alto;
|
this.alto = datos.alto;
|
||||||
this.lomo = datos.lomo;
|
this.lomo = datos.lomo;
|
||||||
|
|
||||||
if(datos.solapas == undefined || datos.solapas == null || datos.solapas == false)
|
if (datos.solapas == undefined || datos.solapas == null || datos.solapas == false) {
|
||||||
this.solapa = 0;
|
this.solapa = 0;
|
||||||
else
|
this.offsetSolapa = 0.0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.solapa = datos.solapas;
|
this.solapa = datos.solapas;
|
||||||
|
this.offsetSolapa = 3.0;
|
||||||
|
}
|
||||||
this.lomoRedondo = datos.lomoRedondo;
|
this.lomoRedondo = datos.lomoRedondo;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -237,14 +241,14 @@ class previewFormas {
|
|||||||
let styleCotas = { size: 12, family: 'Public Sans' };
|
let styleCotas = { size: 12, family: 'Public Sans' };
|
||||||
let sangradoTexto = "Sangrado 20 mm";
|
let sangradoTexto = "Sangrado 20 mm";
|
||||||
let sangradoValor = parseFloat(20); // mm
|
let sangradoValor = parseFloat(20); // mm
|
||||||
if(this.ancho >= 210 || this.alto >= 297){
|
if (this.ancho >= 210 || this.alto >= 297) {
|
||||||
sangradoValor = parseFloat(15); // mm
|
sangradoValor = parseFloat(15); // mm
|
||||||
sangradoTexto = "Sangrado 15 mm";
|
sangradoTexto = "Sangrado 15 mm";
|
||||||
}
|
}
|
||||||
let anchoPliegue = parseFloat(7); // mm cajo
|
let anchoPliegue = parseFloat(7); // mm cajo
|
||||||
let altoPliegue = parseFloat(7); // mm
|
let altoPliegue = parseFloat(7); // mm
|
||||||
let anchoCarton = parseFloat(6); // mm
|
let anchoCarton = parseFloat(6); // mm
|
||||||
if(this.lomoRedondo)
|
if (this.lomoRedondo)
|
||||||
anchoCarton += parseFloat(6); // mm
|
anchoCarton += parseFloat(6); // mm
|
||||||
// Definicion de los parametros del Esquema de Cubierta (EC)
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
if (this.size == "thumbnail") {
|
if (this.size == "thumbnail") {
|
||||||
@ -358,7 +362,7 @@ class previewFormas {
|
|||||||
previewEC.makeText((this.lomo + anchoCarton).toFixed(1) + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText((this.lomo + anchoCarton).toFixed(1) + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText((this.ancho + anchoPliegue).toFixed(1) + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText((this.ancho + anchoPliegue).toFixed(1) + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText((this.ancho + anchoPliegue).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText((this.ancho + anchoPliegue).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText((this.alto + altoPliegue).toFixed(1)+ " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText((this.alto + altoPliegue).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText((this.alto + (2 * sangradoValor) + altoPliegue).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 55, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText((this.alto + (2 * sangradoValor) + altoPliegue).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 55, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText((2 * this.ancho) + this.lomo + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm",
|
previewEC.makeText((2 * this.ancho) + this.lomo + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm",
|
||||||
origenEC.x,
|
origenEC.x,
|
||||||
@ -586,7 +590,6 @@ class previewFormas {
|
|||||||
let styleCotas = { size: 12, family: 'Public Sans' };
|
let styleCotas = { size: 12, family: 'Public Sans' };
|
||||||
let sangradoTexto = "Sangrado 5 mm";
|
let sangradoTexto = "Sangrado 5 mm";
|
||||||
let sangradoValor = parseFloat(5); // mm
|
let sangradoValor = parseFloat(5); // mm
|
||||||
let offsetSolapaValor = parseFloat(0); // mm
|
|
||||||
|
|
||||||
// Definicion de los parametros del Esquema de Cubierta (EC)
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
if (this.solapa == 0) {
|
if (this.solapa == 0) {
|
||||||
@ -739,11 +742,11 @@ class previewFormas {
|
|||||||
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + anchoSolapa + 20), origenEC.y, styleSangrado).rotation = -Math.PI / 2;
|
||||||
// Cotas
|
// Cotas
|
||||||
previewEC.makeText((anchoLibro + offsetSolapaValor).toFixed(1) + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText((this.ancho + this.offsetSolapa).toFixed(1) + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText((anchoLibro + offsetSolapaValor).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText((this.ancho + this.offsetSolapa).toFixed(1) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText(altoLibro.toFixed(1) + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText(this.alto.toFixed(1) + " mm", origenEC.x + (lomoLibro / 2) + 25, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText(altoLibro.toFixed(1) + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText(this.alto.toFixed(1) + (2 * sangradoValor) + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro + anchoSolapa) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText(((2 * anchoLibro) + (2 * (anchoSolapa + offsetSolapaValor)) + lomoLibro + (2 * sangradoValor)).toFixed(1) + " mm",
|
previewEC.makeText(((2 * anchoLibro) + (2 * (this.solapa + this.offsetSolapa)) + this.lomo + (2 * sangradoValor)).toFixed(1) + " mm",
|
||||||
origenEC.x,
|
origenEC.x,
|
||||||
origenEC.y + (altoLibro / 2) + 50,
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
styleCotas);
|
styleCotas);
|
||||||
|
|||||||
Reference in New Issue
Block a user