Browse Source

Allow creation of client

Laurent Destailleur 4 years ago
parent
commit
ad105e97d1
1 changed files with 7 additions and 0 deletions
  1. 7 0
      htdocs/emailcollector/class/emailcollector.class.php

+ 7 - 0
htdocs/emailcollector/class/emailcollector.class.php

@@ -1721,6 +1721,13 @@ class EmailCollector extends CommonObject
 										// Overwrite values with values extracted from source email
 										$errorforthisaction = $this->overwritePropertiesOfObject($thirdpartystatic, $operation['actionparam'], $messagetext, $subject, $header);
 
+										if ($thirdpartystatic->client && empty($thirdpartystatic->code_client)) {
+											$thirdpartystatic->code_client = 'auto';
+										}
+										if ($thirdpartystatic->fournisseur && empty($thirdpartystatic->code_fournisseur)) {
+											$thirdpartystatic->code_fournisseur = 'auto';
+										}
+
 										if ($errorforthisaction) {
 											$errorforactions++;
 										} else {