Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5ab8704aee
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user