From 59c40227ffb476ffc7d939188fe786ce732e01c2 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Fri, 27 Nov 2020 14:31:14 +0100 Subject: [PATCH 1/2] Add PROPAL_ENABLE_NEGATIVE in the case of a call for tenders it is possible to have to figure in less value with quotations whose total is negative --- htdocs/comm/propal/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index b2f728ac5f5..85182f1b4bd 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2411,7 +2411,9 @@ if ($action == 'create') if ($action != 'editline') { // Validate - if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) + + + if (($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) 0) || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) { if ($usercanvalidate) { From aaf8d437803a7078b6eb63a39c0e74980fe9acfc Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 27 Nov 2020 13:33:37 +0000 Subject: [PATCH 2/2] Fixing style errors. --- htdocs/comm/propal/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 85182f1b4bd..69a2a4b9f82 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2411,9 +2411,9 @@ if ($action == 'create') if ($action != 'editline') { // Validate - - if (($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) 0) || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) + + if (($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) 0) || ($object->statut == Propal::STATUS_DRAFT && !empty($conf->global->PROPAL_ENABLE_NEGATIVE) && count($object->lines) > 0)) { if ($usercanvalidate) {