NEW Update bank account when updating an order
Add the ability to update the bankaccount when updating an order
This commit is contained in:
parent
a3f4066790
commit
171e388f6d
@ -418,6 +418,15 @@ class Orders extends DolibarrApi
|
|||||||
if ($this->commande->availability($this->commande->availability_id) < 0)
|
if ($this->commande->availability($this->commande->availability_id) < 0)
|
||||||
throw new RestException(400, 'Error while updating availability');
|
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)
|
if ($this->commande->update(DolibarrApiAccess::$user) > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user