Revert "Merge branch 'feat/add-chat-presupuesto-cliente' into 'main'"

This reverts merge request !352
This commit is contained in:
Alvaro
2024-10-23 05:18:00 +00:00
parent 47e6cbb5f7
commit 7ce2723a09
147 changed files with 5666 additions and 9809 deletions

View File

@ -838,13 +838,9 @@ class PresupuestoService extends BaseService
* Devuelve el ancho de la cubierta/sobrecubierta, incluido el lomo.
* El $uso tiene que ser "cubierta" o "sobrecubierta"
*/
public static function getAnchoTotalExteriores($uso = "cubierta", $tipo_impresion_id = 1, $datosPedido = null, $maquina_id = -1, $lomoRedondo = 0)
public static function getAnchoTotalExteriores($uso = "cubierta", $tipo_impresion_id = 1, $datosPedido = null, $maquina_id = -1)
{
$ancho_total = 0;
$sangre_cubierta = self::SANGRE_FORMAS_CUBIERTA;
if($datosPedido->ancho > 210 || $datosPedido->alto > 297){
$sangre_cubierta = 15;
}
if ($datosPedido) {
// Tapa blanda (cosido y fresado)
@ -865,13 +861,8 @@ class PresupuestoService extends BaseService
// si es cubierta
// se añade 7mm del ancho del cartón (2*3.5mm) por cada lado del lomo
// más 7mm de vuelo+cajo por cada lado. Por último, 20mm de sangre por cada lado
if ($uso == "cubierta"){
$ancho_total += (2 * 7 + 2 * $sangre_cubierta + 6);
if($lomoRedondo){
$ancho_total += 6;
}
}
if ($uso == "cubierta")
$ancho_total += (2 * 7 + 2 * self::SANGRE_FORMAS_CUBIERTA + 7);
// si es sobrecubierta
// Se añaden 5mm de sangre por cada lado + 2 * 7mm de vuelo portada y contraportada -> total 52
else
@ -902,7 +893,7 @@ class PresupuestoService extends BaseService
// Tapa dura
else{
// Se le suma 20mm de sangre por cada lado. Como son 2 hojas independientes, se multiplica por 4
$ancho_total += (4 * $sangre_cubierta);
$ancho_total += (4 * self::SANGRE_FORMAS_CUBIERTA);
}
}
else {
@ -1725,7 +1716,6 @@ class PresupuestoService extends BaseService
$cliente_id = $input_data['cliente_id'];
$datosTipolog = $input_data['datosTipolog'] ?? null;
$a_favor_fibra = $datosPedido->a_favor_fibra ?? false;
$lomoRedondo = $input_data['lomoRedondo'] ?? 0;
$tipo = $isColor ? ($isHq ? 'colorhq' : 'color') : ($isHq ? 'negrohq' : 'negro');
@ -1757,7 +1747,7 @@ class PresupuestoService extends BaseService
if ($uso == 'cubierta' || $uso == 'sobrecubierta') {
$datosPedido->anchoExteriores = PresupuestoService::getAnchoTotalExteriores($uso, $tipo_impresion_id, $datosPedido, $maquina->maquina_id, $lomoRedondo);
$datosPedido->anchoExteriores = PresupuestoService::getAnchoTotalExteriores($uso, $tipo_impresion_id, $datosPedido, $maquina->maquina_id);
$datosPedido->altoExteriores = PresupuestoService::getAltoTotalExteriores($uso, $tipo_impresion_id, $datosPedido);
}