From 76d02ecd7723fbec5ce862845a8c38f66b5cdc10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 8 Jul 2021 21:53:24 +0200 Subject: [PATCH] Update card.php --- htdocs/societe/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 53efb132352..475c1c57082 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -497,7 +497,7 @@ if (empty($reshook)) { 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; @@ -506,7 +506,7 @@ if (empty($reshook)) { 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; @@ -1072,7 +1072,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; @@ -1081,7 +1081,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;