Update accountancycategory.class.php

This commit is contained in:
Frédéric FRANCE 2018-09-09 13:47:12 +02:00 committed by GitHub
parent f0950e4cfb
commit fdd24a5a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,10 +195,10 @@ class AccountancyCategory // extends CommonObject
{ {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category"); $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category");
if (! $notrigger)
{
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//if (! $notrigger)
//{
// // Call triggers // // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; // include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
@ -206,7 +206,7 @@ class AccountancyCategory // extends CommonObject
// $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf); // $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; } // if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers // // End call triggers
} //}
} }
// Commit or rollback // Commit or rollback
@ -333,19 +333,18 @@ class AccountancyCategory // extends CommonObject
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) if (! $error)
{
if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//if (! $notrigger)
//{
// // Call triggers // // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; // include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db); // $interface=new Interfaces($this->db);
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); // $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; } // if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers // // End call triggers
} //}
} }
// Commit or rollback // Commit or rollback
@ -389,19 +388,18 @@ class AccountancyCategory // extends CommonObject
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) if (! $error)
{
if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action call a trigger. // want this action call a trigger.
//if (! $notrigger)
//{
// // Call triggers // // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; // include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db); // $interface=new Interfaces($this->db);
// $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); // $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; } // if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers // // End call triggers
} //}
} }
// Commit or rollback // Commit or rollback