Update api_orders.class.php
This commit is contained in:
parent
68ccbac49c
commit
3bc9c49307
@ -547,7 +547,7 @@ class Orders extends DolibarrApi
|
|||||||
* @param int $rowid Row key of the contact in the array contact_ids.
|
* @param int $rowid Row key of the contact in the array contact_ids.
|
||||||
* @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER).
|
* @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER).
|
||||||
*
|
*
|
||||||
* @url DELETE {id}/contact/{rowid}/{type}
|
* @url DELETE {id}/contact/{contactid}/{type}
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
@ -555,7 +555,7 @@ class Orders extends DolibarrApi
|
|||||||
* @throws RestException 404
|
* @throws RestException 404
|
||||||
* @throws RestException 500
|
* @throws RestException 500
|
||||||
*/
|
*/
|
||||||
public function deleteContact($id, $rowid, $type)
|
public function deleteContact($id, $contactid, $type)
|
||||||
{
|
{
|
||||||
if (!DolibarrApiAccess::$user->rights->commande->creer) {
|
if (!DolibarrApiAccess::$user->rights->commande->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -573,7 +573,7 @@ class Orders extends DolibarrApi
|
|||||||
$contacts = $this->commande->liste_contact();
|
$contacts = $this->commande->liste_contact();
|
||||||
|
|
||||||
foreach ($contacts as $contact) {
|
foreach ($contacts as $contact) {
|
||||||
if ($contact['id'] == $rowid && $contact['code'] == $type) {
|
if ($contact['id'] == $contactid && $contact['code'] == $type) {
|
||||||
$result = $this->commande->delete_contact($contact['rowid']);
|
$result = $this->commande->delete_contact($contact['rowid']);
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user