NEW add triiger and event on totally received status
This commit is contained in:
parent
690a91d546
commit
9b1d800311
@ -640,9 +640,18 @@ class Reception extends CommonObject
|
||||
if ($status < 0) {
|
||||
$error++;
|
||||
} else {
|
||||
$ret = $this->setStatut($status, $this->origin_id, 'commande_fournisseur');
|
||||
if (!$ret) {
|
||||
$error++;
|
||||
$trigger_key = '';
|
||||
if ($status == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) {
|
||||
$ret = $this->commandeFournisseur->Livraison($user, dol_now(), 'tot', '');
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
$this->errors = array_merge($this->errors, $this->commandeFournisseur->errors);
|
||||
}
|
||||
} else {
|
||||
$ret = $this->setStatut($status, $this->origin_id, 'commande_fournisseur', $trigger_key);
|
||||
if ($ret < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user