From ae692bf4a5a62974b74808b0a3575e221bb0c24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Tue, 1 Oct 2024 14:23:10 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20pipe=20para=20el=20modelo=20Tari?= =?UTF-8?q?fa=20en=20su=20funci=C3=B3n=20apply?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Model/Tarifa.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/Model/Tarifa.php b/Core/Model/Tarifa.php index b327f91823..592eefcb06 100644 --- a/Core/Model/Tarifa.php +++ b/Core/Model/Tarifa.php @@ -99,6 +99,11 @@ public function apply(float $cost, float $price) break; } + $ext = $this->pipe('apply', $finalPrice, $cost, $price); + if ($ext && is_numeric($ext)) { + $finalPrice = $ext; + } + if ($this->maxpvp && $finalPrice > $price) { return (float)$price; } elseif ($this->mincoste && $finalPrice < $cost) {