Merge pull request #23835 from muhalikin/patch-1
Fix Shipment Creation from Order via REST API
This commit is contained in:
commit
6a4f697013
@ -1053,6 +1053,7 @@ class Orders extends DolibarrApi
|
|||||||
}
|
}
|
||||||
$shipment = new Expedition($this->db);
|
$shipment = new Expedition($this->db);
|
||||||
$shipment->socid = $this->commande->socid;
|
$shipment->socid = $this->commande->socid;
|
||||||
|
$shipment->origin_id = $this->commande->id;
|
||||||
$result = $shipment->create(DolibarrApiAccess::$user);
|
$result = $shipment->create(DolibarrApiAccess::$user);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
throw new RestException(500, 'Error on creating expedition :'.$this->db->lasterror());
|
throw new RestException(500, 'Error on creating expedition :'.$this->db->lasterror());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user