Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Jul 28, 2016
2 parents dfa33bf + 209bb21 commit 37a1b8c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion htdocs/fourn/class/fournisseur.commande.class.php
Expand Up @@ -2111,7 +2111,22 @@ public function setStatus($user,$status)
$resql = $this->db->query($sql);
if ($resql)
{
//TODO: Add trigger for status modification
// Trigger names for each status
$trigger_name[0] = 'DRAFT';
$trigger_name[1] = 'VALIDATED';
$trigger_name[2] = 'APPROVED';
$trigger_name[3] = 'ONPROCESS';
$trigger_name[4] = 'RECEIVED_PARTIALLY';
$trigger_name[5] = 'RECEIVED_ALL';
$trigger_name[6] = 'CANCELED';
$trigger_name[7] = 'CANCELED';
$trigger_name[8] = 'BILLED';
$trigger_name[9] = 'REFUSED';

// Call trigger
$result=$this->call_trigger("ORDER_SUPPLIER_STATUS_".$trigger_name[$status],$user);
if ($result < 0) { $error++; }
// End call triggers
}
else
{
Expand Down

0 comments on commit 37a1b8c

Please sign in to comment.