From e5bc32bb7c2973008dd118ac9cf428cc03d90dd7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Jul 2021 21:55:35 +0200 Subject: [PATCH] Update card.php --- htdocs/societe/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 475c1c57082..76ae78fdb51 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1811,7 +1811,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (GETPOSTISSET('accountancy_code_sell')) { $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); - if ($accountancy_code_sell <= 0) { + if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { $object->accountancy_code_sell = ''; } else { $object->accountancy_code_sell = $accountancy_code_sell; @@ -1820,7 +1820,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (GETPOSTISSET('accountancy_code_buy')) { $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); - if ($accountancy_code_buy <= 0) { + if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { $object->accountancy_code_buy = ''; } else { $object->accountancy_code_buy = $accountancy_code_buy;