add condition

add condition check for $notrigger
This commit is contained in:
dolibarr95 2017-03-15 10:37:08 +01:00 committed by GitHub
parent 688073dc18
commit 0721e6af42

View File

@ -90,6 +90,8 @@ class CompanyBankAccount extends Account
{ {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib"); $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_rib");
if (! $notrigger)
{
// Call trigger // Call trigger
$result=$this->call_trigger('COMPANY_RIB_CREATE',$user); $result=$this->call_trigger('COMPANY_RIB_CREATE',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
@ -105,6 +107,12 @@ class CompanyBankAccount extends Account
} }
} }
else
{
return 1;
}
}
} }
else else
{ {