Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop#2

This commit is contained in:
lmarcouiller 2020-12-01 16:00:37 +01:00
commit dbe59adb9a
2 changed files with 10 additions and 10 deletions

View File

@ -3115,10 +3115,10 @@ class Societe extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Returns if a profid sould be verified * Returns if a profid sould be verified to be unique
* *
* @param int $idprof 1,2,3,4,5,6 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm,5=idprof5,6=idprof6) * @param int $idprof 1,2,3,4,5,6 (Example: 1=siren, 2=siret, 3=naf, 4=rcs/rm, 5=eori, 6=idprof6)
* @return boolean true , false * @return boolean true if the ID must be unique
*/ */
public function id_prof_verifiable($idprof) public function id_prof_verifiable($idprof)
{ {
@ -3128,22 +3128,22 @@ class Societe extends CommonObject
switch ($idprof) switch ($idprof)
{ {
case 1: case 1:
$ret = (!$conf->global->SOCIETE_IDPROF1_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF1_UNIQUE) ? false : true);
break; break;
case 2: case 2:
$ret = (!$conf->global->SOCIETE_IDPROF2_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF2_UNIQUE) ? false : true);
break; break;
case 3: case 3:
$ret = (!$conf->global->SOCIETE_IDPROF3_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF3_UNIQUE) ? false : true);
break; break;
case 4: case 4:
$ret = (!$conf->global->SOCIETE_IDPROF4_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF4_UNIQUE) ? false : true);
break; break;
case 5: case 5:
$ret = (!$conf->global->SOCIETE_IDPROF5_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF5_UNIQUE) ? false : true);
break; break;
case 6: case 6:
$ret = (!$conf->global->SOCIETE_IDPROF6_UNIQUE ?false:true); $ret = (empty($conf->global->SOCIETE_IDPROF6_UNIQUE) ? false : true);
break; break;
default: default:
$ret = false; $ret = false;

View File

@ -583,7 +583,7 @@ if ($action == "delete") {
// We delete the lines // We delete the lines
$resdeletelines = 1; $resdeletelines = 1;
foreach($invoice->lines as $line) { foreach ($invoice->lines as $line) {
$tmpres = $invoice->deleteline($line->id); $tmpres = $invoice->deleteline($line->id);
if ($tmpres < 0) { if ($tmpres < 0) {
$resdeletelines = 0; $resdeletelines = 0;