Merge pull request #8069 from atm-maxime/fix_contrat_validate

Fix validate contrat was not using force_number parameter
This commit is contained in:
Laurent Destailleur 2018-01-20 12:33:50 +01:00 committed by GitHub
commit 1420149b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,7 +322,11 @@ class Contrat extends CommonObject
$result=$this->thirdparty->set_as_client();
// Define new ref
if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life
if ($force_number)
{
$num = $force_number;
}
else if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life
{
$num = $this->getNextNumRef($this->thirdparty);
}