From 8cbe5a7051693ea4e6902f6d5ea23ac48adef27e Mon Sep 17 00:00:00 2001 From: amazuecos Date: Mon, 5 May 2025 08:04:46 +0200 Subject: [PATCH] fix papel ot color --- ci4/app/Services/ProductionService.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php index 56d3c1d8..6091fab0 100755 --- a/ci4/app/Services/ProductionService.php +++ b/ci4/app/Services/ProductionService.php @@ -1642,22 +1642,22 @@ class ProductionService extends BaseService $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default']; $papel_code = $papel->code_ot; if ($papel_code) { - if (strpos($papel_code, "BCLOF")) { + if (str_contains($papel_code, "BCLOF")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco']; } - if (strpos($papel_code, "AH") && $papel->code == "OFF2") { + if (str_contains($papel_code, "AH")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado']; } - if (strpos($papel_code, "MARF")) { + if (str_contains($papel_code, "MARF")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil']; } - if (strpos($papel_code, "VOLAH")) { + if (str_contains($papel_code, "VOLAH")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado']; } - if ($papel_code == "EM") { + if (str_contains($papel_code, "EM")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate']; } - if ($papel_code == "CGE") { + if (str_contains($papel->nombre, "CARTULINA")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina']; } } @@ -1675,22 +1675,22 @@ class ProductionService extends BaseService $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['default']; $papel_code = $papel->code_ot; if ($papel_code) { - if (strpos($papel_code, "BCLOF")) { + if (str_contains($papel_code, "BCLOF")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['blanco']; } - if (strpos($papel_code, "AH") && $papel->code == "OFF2") { + if (str_contains($papel_code, "AH")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['ahuesado']; } - if (strpos($papel_code, "MARF")) { + if (str_contains($papel_code, "MARF")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['marfil']; } - if (strpos($papel_code, "VOLAH")) { + if (str_contains($papel_code, "VOLAH")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['volumen_ahuesado']; } - if ($papel_code == "EM") { + if (str_contains($papel_code, "EM")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['estucado_mate']; } - if ($papel_code == "CGE") { + if (str_contains($papel->nombre, "CARTULINA")) { $color = $this->ordenTrabajoConfig->OT_PAPEL_COLOR['cartulina']; } }