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,19 +90,27 @@ 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");
// Call trigger if (! $notrigger)
$result=$this->call_trigger('COMPANY_RIB_CREATE',$user); {
if ($result < 0) $error++; // Call trigger
// End call triggers $result=$this->call_trigger('COMPANY_RIB_CREATE',$user);
if ($result < 0) $error++;
// End call triggers
if(! $error )
{
return 1;
}
else
{
return 0;
}
if(! $error ) }
{ else
return 1; {
} return 1;
else }
{
return 0;
}
} }
} }