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
This commit is contained in:
iouston 2020-11-27 14:31:14 +01:00 committed by GitHub
parent 7ebab06111
commit 59c40227ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
{