corregido bud preview

This commit is contained in:
2024-01-09 10:32:06 +01:00
parent a2f9874278
commit f46a8b9fba
6 changed files with 45 additions and 32 deletions

View File

@ -421,7 +421,8 @@ class PresupuestoService extends BaseService
$formas_v = $h2 * $v2; //p2
$num_formas = $h1*$h2;
$num_formas = ($formas_h > $formas_v) ? $formas_h : $formas_v;
$num_formas = $isCosido ? $num_formas * 2 : $num_formas;
// si no hay formas se devuelve n/a
@ -490,7 +491,7 @@ class PresupuestoService extends BaseService
// verticales
$calles = (new \App\Models\Configuracion\MaquinasCallesModel())->getCallesForMaquina($maquina->maquina_id, $h2_temp);
if(count($calles)>0)
$h2 = ($h2_temp * $anchoForCalculo + 2 * $calles[0]->externas + ($h2_temp - 1) * $calles[0]->internas < ($maquina->ancho)) ? $h2_temp : $h2_temp - 1;
$h2 = ($h2_temp * $alto + 2 * $calles[0]->externas + ($h2_temp - 1) * $calles[0]->internas < ($maquina->ancho)) ? $h2_temp : $h2_temp - 1;
else
$h2 = $h2_temp;
$v2 = floor($maquina->alto_impresion / $anchoForCalculo);