forked from Wavyzz/dolibarr
NEW Update bank account when updating an order
Add the ability to update the bankaccount when updating an order
This commit is contained in:
@@ -418,6 +418,15 @@ class Orders extends DolibarrApi
|
||||
if ($this->commande->availability($this->commande->availability_id) < 0)
|
||||
throw new RestException(400, 'Error while updating availability');
|
||||
}
|
||||
// update bank account
|
||||
if(!empty($this->commande->fk_account))
|
||||
{
|
||||
if($this->commande->setBankAccount($this->commande->fk_account) == 0)
|
||||
{
|
||||
throw new RestException(400,$this->commande->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->commande->update(DolibarrApiAccess::$user) > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user