From a15f770b657dd46784ba8241d7205851f38a1faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Wed, 30 Oct 2024 13:55:42 +0100 Subject: [PATCH] =?UTF-8?q?Corregido=20bug=20cuando=20la=20l=C3=ADnea=20ti?= =?UTF-8?q?ene=20descuento=20negativo=20y=20el=20documento=20100%=20de=20d?= =?UTF-8?q?escuento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Lib/AjaxForms/PurchasesFooterHTML.php | 2 +- Core/Lib/AjaxForms/SalesFooterHTML.php | 2 +- Core/Lib/Calculator.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Lib/AjaxForms/PurchasesFooterHTML.php b/Core/Lib/AjaxForms/PurchasesFooterHTML.php index e2260f796..f5d0153d7 100644 --- a/Core/Lib/AjaxForms/PurchasesFooterHTML.php +++ b/Core/Lib/AjaxForms/PurchasesFooterHTML.php @@ -204,7 +204,7 @@ private static function renderField(PurchaseDocument $model, string $field): ?st return self::observaciones($model); case 'total': - return self::column($model, 'total', 'total', true); + return self::column($model, 'total', 'total'); case 'totalirpf': return self::column($model, 'totalirpf', 'irpf', true); diff --git a/Core/Lib/AjaxForms/SalesFooterHTML.php b/Core/Lib/AjaxForms/SalesFooterHTML.php index 1a4c482bc..416ca6a88 100644 --- a/Core/Lib/AjaxForms/SalesFooterHTML.php +++ b/Core/Lib/AjaxForms/SalesFooterHTML.php @@ -206,7 +206,7 @@ private static function renderField(SalesDocument $model, string $field): ?strin return self::observaciones($model); case 'total': - return self::column($model, 'total', 'total', true); + return self::column($model, 'total', 'total'); case 'totalbeneficio': return self::column($model, 'totalbeneficio', 'profits', true, Tools::settings('default', 'levelbenefitsales', 0)); diff --git a/Core/Lib/Calculator.php b/Core/Lib/Calculator.php index e35baea99..2778886a1 100644 --- a/Core/Lib/Calculator.php +++ b/Core/Lib/Calculator.php @@ -114,7 +114,7 @@ public static function getSubtotals(BusinessDocument $doc, array $lines): array } $pvpTotal = $line->pvptotal * (100 - $doc->dtopor1) / 100 * (100 - $doc->dtopor2) / 100; - if (empty($pvpTotal)) { + if (empty($line->pvptotal)) { continue; }