mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/api/index.php htdocs/comm/propal/class/api_proposals.class.php htdocs/comm/propal/class/propal.class.php htdocs/compta/facture/class/api_invoices.class.php htdocs/core/actions_massactions.inc.php htdocs/core/actions_sendmails.inc.php
This commit is contained in:
@@ -52,9 +52,9 @@ class Orders extends DolibarrApi
|
||||
}
|
||||
|
||||
/**
|
||||
* Get properties of a commande object
|
||||
* Get properties of an order object
|
||||
*
|
||||
* Return an array with commande informations
|
||||
* Return an array with order informations
|
||||
*
|
||||
* @param int $id ID of order
|
||||
* @return array|mixed data without useless information
|
||||
@@ -176,7 +176,7 @@ class Orders extends DolibarrApi
|
||||
* Create order object
|
||||
*
|
||||
* @param array $request_data Request data
|
||||
* @return int ID of commande
|
||||
* @return int ID of order
|
||||
*/
|
||||
function post($request_data = NULL)
|
||||
{
|
||||
@@ -196,6 +196,7 @@ class Orders extends DolibarrApi
|
||||
}
|
||||
$this->commande->lines = $lines;
|
||||
}*/
|
||||
|
||||
if ($this->commande->create(DolibarrApiAccess::$user) < 0) {
|
||||
throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors));
|
||||
}
|
||||
@@ -236,8 +237,8 @@ class Orders extends DolibarrApi
|
||||
/**
|
||||
* Add a line to given order
|
||||
*
|
||||
* @param int $id Id of commande to update
|
||||
* @param array $request_data Orderline data
|
||||
* @param int $id Id of order to update
|
||||
* @param array $request_data OrderLine data
|
||||
*
|
||||
* @url POST {id}/lines
|
||||
*
|
||||
@@ -281,8 +282,9 @@ class Orders extends DolibarrApi
|
||||
$request_data->label,
|
||||
$request_data->array_options,
|
||||
$request_data->fk_unit,
|
||||
$this->element,
|
||||
$request_data->id
|
||||
$request_data->origin,
|
||||
$request_data->origin_id,
|
||||
$request_data->multicurrency_subprice
|
||||
);
|
||||
|
||||
if ($updateRes > 0) {
|
||||
@@ -295,9 +297,9 @@ class Orders extends DolibarrApi
|
||||
/**
|
||||
* Update a line to given order
|
||||
*
|
||||
* @param int $id Id of commande to update
|
||||
* @param int $id Id of order to update
|
||||
* @param int $lineid Id of line to update
|
||||
* @param array $request_data Orderline data
|
||||
* @param array $request_data OrderLine data
|
||||
*
|
||||
* @url PUT {id}/lines/{lineid}
|
||||
*
|
||||
@@ -310,7 +312,7 @@ class Orders extends DolibarrApi
|
||||
|
||||
$result = $this->commande->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Commande not found');
|
||||
throw new RestException(404, 'Order not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('commande',$this->commande->id)) {
|
||||
@@ -338,7 +340,8 @@ class Orders extends DolibarrApi
|
||||
$request_data->label,
|
||||
$request_data->special_code,
|
||||
$request_data->array_options,
|
||||
$request_data->fk_unit
|
||||
$request_data->fk_unit,
|
||||
$request_data->multicurrency_subprice
|
||||
);
|
||||
|
||||
if ($updateRes > 0) {
|
||||
@@ -399,7 +402,7 @@ class Orders extends DolibarrApi
|
||||
|
||||
$result = $this->commande->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Commande not found');
|
||||
throw new RestException(404, 'Order not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('commande',$this->commande->id)) {
|
||||
|
||||
Reference in New Issue
Block a user