NEW Update bank account when updating an invoice
Add the ability to update the bankaccount when updating an invoice
This commit is contained in:
parent
7e3a2d75bb
commit
a3f4066790
@ -422,6 +422,15 @@ class Invoices extends DolibarrApi
|
||||
$this->invoice->$field = $value;
|
||||
}
|
||||
|
||||
// update bank account
|
||||
if(!empty($this->invoice->fk_account))
|
||||
{
|
||||
if($this->invoice->setBankAccount($this->invoice->fk_account) == 0)
|
||||
{
|
||||
throw new RestException(400,$this->invoice->error);
|
||||
}
|
||||
}
|
||||
|
||||
if($this->invoice->update($id, DolibarrApiAccess::$user))
|
||||
return $this->get ($id);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user