Skip to content
Snippets Groups Projects
Commit 5ab8704a authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

parents ea44e14b 248150dd
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->fk_facture=$discount->fk_facture;
$newdiscount1->fk_facture_line=$discount->fk_facture_line;
$newdiscount2->fk_facture_line=$discount->fk_facture_line;
if ($discount->description == '(CREDIT_NOTE)')
if ($discount->description == '(CREDIT_NOTE)' || $discount->description == '(DEPOSIT)')
{
$newdiscount1->description=$discount->description;
$newdiscount2->description=$discount->description;
......
......@@ -130,7 +130,9 @@ class CompanyBankAccount extends Account
*/
function update(User $user = null, $notrigger = 0)
{
global $conf;
global $conf;
$error = 0;
if (! $this->id)
{
......@@ -167,12 +169,33 @@ class CompanyBankAccount extends Account
$result = $this->db->query($sql);
if ($result)
{
return 1;
if (! $notrigger)
{
// Call trigger
$result=$this->call_trigger('COMPANY_RIB_MODIFY',$user);
if ($result < 0) $error++;
// End call triggers
if(! $error )
{
return 1;
}
else
{
return -1;
}
}
else
{
return 1;
}
}
else
{
dol_print_error($this->db);
return 0;
return -1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment