2
0
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:
Neil Orley
2017-12-19 14:16:51 +01:00
parent a3f4066790
commit 171e388f6d

View File

@@ -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)
{