From bfd954b91ea564d5afc0d0629787acdbb1eebed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 14 Mar 2021 23:51:49 +0100 Subject: [PATCH 1/2] fix php8 warning --- htdocs/compta/tva/quadri_detail.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 788067ec696..d3c16e10907 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2006-2015 Yannick Warnier * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2019 Eric Seigne * * This program is free software; you can redistribute it and/or modify @@ -116,16 +116,16 @@ if (empty($min)) { // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products -$modetax = $conf->global->TAX_MODE; +$modetax = (!empty($conf->global->TAX_MODE) ? $conf->global->TAX_MODE : 0); if (GETPOSTISSET("modetax")) { - $modetax = GETPOST("modetax", 'int'); + $modetax = GETPOSTINT("modetax"); } if (empty($modetax)) { $modetax = 0; } // Security check -$socid = GETPOST('socid', 'int'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -242,7 +242,7 @@ if ($mysoc->tva_assuj) { $vatsup .= ' ('.$langs->trans("ToGetBack").')'; } -$optioncss = GETPOST('optioncss'); +$optioncss = GETPOST('optioncss', 'alpha'); if ($optioncss != "print") { report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, array(), $calcmode); } From c2c434ab7f073753e1369f536b9735659f28a15a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 15 Mar 2021 10:59:41 +0100 Subject: [PATCH 2/2] Update quadri_detail.php --- htdocs/compta/tva/quadri_detail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index d3c16e10907..c1f89dd3bbc 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -116,7 +116,7 @@ if (empty($min)) { // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit, 2=option on payments for products -$modetax = (!empty($conf->global->TAX_MODE) ? $conf->global->TAX_MODE : 0); +$modetax = (empty($conf->global->TAX_MODE) ? 0 : $conf->global->TAX_MODE); if (GETPOSTISSET("modetax")) { $modetax = GETPOSTINT("modetax"); }