Merge pull request #15563 from iouston/patch-14

Add PROPAL_ENABLE_NEGATIVE
This commit is contained in:
Laurent Destailleur 2020-11-28 13:35:57 +01:00 committed by GitHub
commit 6afe5919b9
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)
{