mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
corregido direcciones borran precio
This commit is contained in:
@ -719,7 +719,11 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Se suma el coste de envío a cada precio unidad
|
||||||
|
for ($i = 0; $i < count($tirada); $i++) {
|
||||||
|
if($return_data['coste_envio'] && isset($return_data['coste_envio'][$i]) && $return_data['coste_envio'][$i] > 0)
|
||||||
|
$return_data['precio_u'][$i] = round(floatval($return_data['precio_u'][$i]) + $return_data['coste_envio'][$i]/$tirada[$i], 4);
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->request) {
|
if ($this->request) {
|
||||||
if ($this->request->isAJAX())
|
if ($this->request->isAJAX())
|
||||||
|
|||||||
@ -376,6 +376,10 @@ class Direcciones {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.#addTarjetaDireccion(this.divDirecciones, this.direcciones, divId, id, unidades, entregaPalets);
|
this.#addTarjetaDireccion(this.divDirecciones, this.direcciones, divId, id, unidades, entregaPalets);
|
||||||
|
|
||||||
|
this.calcularPresupuesto = true;
|
||||||
|
this.divDirecciones.trigger('change');
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
@ -578,6 +582,10 @@ class Direcciones {
|
|||||||
this.sameAddPrincipalFP2.trigger('change');
|
this.sameAddPrincipalFP2.trigger('change');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.calcularPresupuesto = true;
|
||||||
|
this.divDirecciones.trigger('change');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#deleteDireccionFP(event, num_ferroPrototipo = 1) {
|
#deleteDireccionFP(event, num_ferroPrototipo = 1) {
|
||||||
|
|||||||
@ -851,7 +851,7 @@ class PresupuestoCliente {
|
|||||||
self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales,
|
self.direcciones.cargarDatos(response.data.direcciones, response.data.datosGenerales,
|
||||||
(response.data.direccionesFerroPrototipo && response.data.direccionesFerroPrototipo.length > 0) ?
|
(response.data.direccionesFerroPrototipo && response.data.direccionesFerroPrototipo.length > 0) ?
|
||||||
response.data.direccionesFerroPrototipo : [] ,
|
response.data.direccionesFerroPrototipo : [] ,
|
||||||
response.data.direccionesFPChecks ? JSON.parse(response.data.direccionesFPChecks) : {}
|
response.data.direccionesFPChecks && response.data.direccionesFPChecks.length > 0 ? JSON.parse(response.data.direccionesFPChecks) : {}
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user