Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2019-12-09 13:05:16 +01:00
commit e8366efeec
11 changed files with 247 additions and 72 deletions

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -63,7 +63,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
if ($action == 'validate' && $user->rights->deplacement->creer)
{
$object->fetch($id);
if ($object->statut == 0)
if ($object->statut == Deplacement::STATUS_DRAFT)
{
$result = $object->setStatut(1);
if ($result > 0)
@ -81,9 +81,9 @@ if ($action == 'validate' && $user->rights->deplacement->creer)
elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer)
{
$object->fetch($id);
if ($object->statut == 1)
if ($object->statut == Deplacement::STATUS_VALIDATED)
{
$result = $object->setStatut(2);
$result = $object->setStatut(Deplacement::STATUS_REFUNDED);
if ($result > 0)
{
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
@ -116,14 +116,14 @@ elseif ($action == 'add' && $user->rights->deplacement->creer)
{
$error = 0;
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
$object->type = GETPOST('type', 'alpha');
$object->socid = GETPOST('socid', 'int');
$object->fk_user = GETPOST('fk_user', 'int');
$object->type = GETPOST('type', 'alpha');
$object->socid = (int) GETPOST('socid', 'int');
$object->fk_user = (int) GETPOST('fk_user', 'int');
$object->note_private = GETPOST('note_private', 'alpha');
$object->note_public = GETPOST('note_public', 'alpha');
$object->statut = 0;
$object->statut = Deplacement::STATUS_DRAFT;
if (!$object->date)
{
@ -178,8 +178,8 @@ elseif ($action == 'update' && $user->rights->deplacement->creer)
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
$object->type = GETPOST('type', 'alpha');
$object->socid = GETPOST('socid', 'int');
$object->fk_user = GETPOST('fk_user', 'int');
$object->socid = (int) GETPOST('socid', 'int');
$object->fk_user = (int) GETPOST('fk_user', 'int');
$object->note_private = GETPOST('note_private', 'alpha');
$object->note_public = GETPOST('note_public', 'alpha');
@ -523,7 +523,7 @@ elseif ($id)
print '<div class="tabsAction">';
if ($object->statut < 2) // if not refunded
if ($object->statut < Deplacement::STATUS_REFUNDED) // if not refunded
{
if ($user->rights->deplacement->creer)
{
@ -535,7 +535,7 @@ elseif ($id)
}
}
if ($object->statut == 0) // if draft
if ($object->statut == Deplacement::STATUS_DRAFT) // if draft
{
if ($user->rights->deplacement->creer)
{
@ -547,7 +547,7 @@ elseif ($id)
}
}
if ($object->statut == 1) // if validated
if ($object->statut == Deplacement::STATUS_VALIDATED) // if validated
{
if ($user->rights->deplacement->creer)
{

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -81,14 +82,40 @@ class Deplacement extends CommonObject
*/
public $fk_user;
public $km;
/**
* @var string km value formatted
*/
public $km;
/**
* @var int Thirdparty id
*/
public $socid;
public $statut; // 0=draft, 1=validated
/**
* @var int Status 0=draft, 1=validated, 2=Refunded
*/
public $statut;
public $extraparams=array();
public $statuts=array();
public $statuts_short=array();
/**
* Draft status
*/
const STATUS_DRAFT = 0;
/**
* Validated status
*/
const STATUS_VALIDATED = 1;
/**
* Refunded status
*/
const STATUS_REFUNDED = 2;
/**
* Constructor
*

View File

@ -8135,7 +8135,7 @@ function roundUpToNextMultiple($n, $x = 5)
function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '', $params = array())
{
$attr = array(
'class'=>'badge badge-status'.(!empty($mode) ? ' badge-'.$mode : '').(!empty($type) ? ' badge-'.$type : '').(empty($params['css']) ? '' : ' '.$params['css'])
'class'=>'badge '.(!empty($mode) ? ' badge-'.$mode : '').(!empty($type) ? ' badge-'.$type : '').(empty($params['css']) ? '' : ' '.$params['css'])
);
if (empty($html)) {
@ -8156,7 +8156,15 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '
// Override attr
if (!empty($params['attr']) && is_array($params['attr'])) {
foreach ($params['attr']as $key => $value) {
$attr[$key] = $value;
if ($key == 'class') {
$attr['class'] .= ' '.$value;
}
elseif ($key == 'classOverride') {
$attr['class'] = $value;
}
else {
$attr[$key] = $value;
}
}
}
@ -8263,6 +8271,8 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
elseif (empty($conf->global->MAIN_STATUS_USES_IMAGES) && !empty($displayMode)) {
$statusLabelShort = !empty($statusLabelShort) ? $statusLabelShort : $statusLabel;
$dolGetBadgeParams['attr']['class'] = 'badge-status';
if ($displayMode == 3) {
$return = dolGetBadge($statusLabel, '', $statusType, 'dot', $url, $dolGetBadgeParams);
}

View File

@ -121,14 +121,14 @@ class PaymentDonation extends CommonObject
}
// Clean parameters
if (isset($this->fk_donation)) $this->fk_donation=trim($this->fk_donation);
if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation;
if (isset($this->amount)) $this->amount=trim($this->amount);
if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment);
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
if (isset($this->note_public)) $this->note_public=trim($this->note_public);
if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank);
if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat);
if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif);
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
$totalamount = 0;
foreach ($this->amounts as $key => $value) // How payment is dispatch
@ -275,14 +275,14 @@ class PaymentDonation extends CommonObject
// Clean parameters
if (isset($this->fk_donation)) $this->fk_donation=trim($this->fk_donation);
if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation;
if (isset($this->amount)) $this->amount=trim($this->amount);
if (isset($this->fk_typepayment)) $this->fk_typepayment=trim($this->fk_typepayment);
if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment);
if (isset($this->note_public)) $this->note_public=trim($this->note_public);
if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank);
if (isset($this->fk_user_creat)) $this->fk_user_creat=trim($this->fk_user_creat);
if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif);
if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat;
if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
// Check parameters
// Put here code to add control on parameters values
@ -300,13 +300,16 @@ class PaymentDonation extends CommonObject
$sql.= " fk_bank=".(isset($this->fk_bank)?$this->fk_bank:"null").",";
$sql.= " fk_user_creat=".(isset($this->fk_user_creat)?$this->fk_user_creat:"null").",";
$sql.= " fk_user_modif=".(isset($this->fk_user_modif)?$this->fk_user_modif:"null")."";
$sql.= " WHERE rowid=".$this->id;
$sql.= " WHERE rowid=".(int) $this->id;
$this->db->begin();
dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $resql) {
$error++;
$this->errors[]="Error ".$this->db->lasterror();
}
if (! $error)
{
@ -358,7 +361,7 @@ class PaymentDonation extends CommonObject
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
$sql.= " WHERE type='payment_donation' AND url_id=".$this->id;
$sql.= " WHERE type='payment_donation' AND url_id=".(int) $this->id;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
@ -372,7 +375,10 @@ class PaymentDonation extends CommonObject
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $resql) {
$error++;
$this->errors[]="Error ".$this->db->lasterror();
}
}
if (! $error)
@ -609,7 +615,7 @@ class PaymentDonation extends CommonObject
public function update_fk_bank($id_bank)
{
// phpcs:enable
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_donation SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_donation SET fk_bank = ".(int) $id_bank." WHERE rowid = ".(int) $this->id;
dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG);
$result = $this->db->query($sql);

View File

@ -52,15 +52,15 @@ create table llx_societe
email varchar(128), --
socialnetworks text DEFAULT NULL, -- json with socialnetworks
skype varchar(255), --
twitter varchar(255), --
facebook varchar(255), --
linkedin varchar(255), --
instagram varchar(255), --
snapchat varchar(255), --
googleplus varchar(255), --
youtube varchar(255), --
whatsapp varchar(255), --
skype varchar(255), -- deprecated
twitter varchar(255), -- deprecated
facebook varchar(255), -- deprecated
linkedin varchar(255), -- deprecated
instagram varchar(255), -- deprecated
snapchat varchar(255), -- deprecated
googleplus varchar(255), -- deprecated
youtube varchar(255), -- deprecated
whatsapp varchar(255), -- deprecated
fk_effectif integer DEFAULT 0, --
fk_typent integer DEFAULT 0, --

View File

@ -120,7 +120,15 @@ class Mo extends CommonObject
public $qty;
public $fk_warehouse;
public $fk_soc;
/**
* @var string public note
*/
public $note_public;
/**
* @var string private note
*/
public $note_private;
/**
@ -245,7 +253,7 @@ class Mo extends CommonObject
// Insert lines in mrp_production table
if (! $error && $this->fk_bom > 0)
{
include_once DOL_DOCULENT_ROOT.'/bom/class/bom.class.php';
include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
$bom = new Bom($this->db);
$bom->fetch($this->fk_bom);
if ($bom->id > 0)

View File

@ -4,7 +4,7 @@
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -567,7 +567,7 @@ $morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY))
{
print '<tr class="morphy"><td class="titlefield">'.$langs->trans('Nature').' <FONT COLOR="red">*</FONT></td><td>'."\n";
print '<tr class="morphy"><td class="titlefield">'.$langs->trans('MemberNature').' <FONT COLOR="red">*</FONT></td><td>'."\n";
print $form->selectarray("morphy", $morphys, GETPOST('morphy'), 1);
print '</td></tr>'."\n";
}

View File

@ -82,7 +82,7 @@ abstract class ActionsCardCommon
public function assign_values(&$action, $id = 0, $ref = '')
{
// phpcs:enable
global $conf, $langs, $user, $mysoc, $canvas;
global $conf, $langs, $db, $user, $mysoc, $canvas;
global $form, $formadmin, $formcompany;
if ($action == 'add' || $action == 'update') $this->assign_post($action);

View File

@ -59,16 +59,51 @@ class Societe extends CommonObject
*/
public $fk_element = 'fk_soc';
/**
* @var string Fields for combobox
*/
public $fieldsforcombobox = 'nom,name_alias';
/**
* @var array List of child tables. To test if we can delete object.
*/
protected $childtables = array("supplier_proposal"=>'SupplierProposal', "propal"=>'Proposal', "commande"=>'Order', "facture"=>'Invoice', "facture_rec"=>'RecurringInvoiceTemplate', "contrat"=>'Contract', "fichinter"=>'Fichinter', "facture_fourn"=>'SupplierInvoice', "commande_fournisseur"=>'SupplierOrder', "projet"=>'Project', "expedition"=>'Shipment', "prelevement_lignes"=>'DirectDebitRecord');
protected $childtables = array(
"supplier_proposal" => 'SupplierProposal',
"propal" => 'Proposal',
"commande" => 'Order',
"facture" => 'Invoice',
"facture_rec" => 'RecurringInvoiceTemplate',
"contrat" => 'Contract',
"fichinter" => 'Fichinter',
"facture_fourn" => 'SupplierInvoice',
"commande_fournisseur" => 'SupplierOrder',
"projet" => 'Project',
"expedition" => 'Shipment',
"prelevement_lignes" => 'DirectDebitRecord',
);
/**
* @var array List of child tables. To know object to delete on cascade.
*/
protected $childtablesoncascade = array("societe_prices", "societe_log", "societe_address", "product_fournisseur_price", "product_customer_price_log", "product_customer_price", "socpeople", "adherent", "societe_account", "societe_rib", "societe_remise", "societe_remise_except", "societe_commerciaux", "categorie", "notify", "notify_def", "actioncomm");
protected $childtablesoncascade = array(
"societe_prices",
"societe_log",
"societe_address",
"product_fournisseur_price",
"product_customer_price_log",
"product_customer_price",
"socpeople",
"adherent",
"societe_account",
"societe_rib",
"societe_remise",
"societe_remise_except",
"societe_commerciaux",
"categorie",
"notify",
"notify_def",
"actioncomm",
);
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
@ -87,8 +122,6 @@ class Societe extends CommonObject
*/
public $restrictiononfksoc = 1;
// BEGIN MODULEBUILDER PROPERTIES
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
@ -123,7 +156,7 @@ class Societe extends CommonObject
public $nom;
/**
* @var string name
* @var string Thirdparty name
*/
public $name;
@ -133,6 +166,9 @@ class Societe extends CommonObject
*/
public $name_alias;
/**
* @var int Physical thirdparty not a company
*/
public $particulier;
/**
@ -140,7 +176,14 @@ class Societe extends CommonObject
*/
public $address;
/**
* @var string Zip code of thirdparty
*/
public $zip;
/**
* @var string Town of thirdparty
*/
public $town;
/**
@ -154,7 +197,15 @@ class Societe extends CommonObject
* @var int
*/
public $state_id;
/**
* @var string State code
*/
public $state_code;
/**
* @var string State name
*/
public $state;
/**
@ -162,11 +213,14 @@ class Societe extends CommonObject
* @var int
*/
public $region_code;
/**
* @var string Region name
*/
public $region;
/**
* State code
* @var string
* @var string State code
* @deprecated Use state_code instead
* @see $state_code
*/
@ -220,25 +274,27 @@ class Societe extends CommonObject
* @deprecated
*/
public $twitter;
/**
* Facebook username
* @var string
* @deprecated
*/
public $facebook;
/**
* LinkedIn username
* @var string
* @deprecated
*/
public $linkedin;
public $linkedin;
/**
* Webpage
* @var string
*/
public $url;
//! barcode
/**
* Barcode value
* @var string
@ -283,9 +339,16 @@ class Societe extends CommonObject
*/
public $idprof6;
/**
* @var string Prefix comm
*/
public $prefix_comm;
/**
* @var int Vat concerned
*/
public $tva_assuj = 1;
/**
* Intracommunitary VAT ID
* @var string
@ -298,8 +361,19 @@ class Societe extends CommonObject
public $localtax2_assuj;
public $localtax2_value;
/**
* @var string Manager
*/
public $managers;
/**
* @var float Capital
*/
public $capital;
/**
* @var int Type thirdparty
*/
public $typent_id = 0;
public $typent_code;
public $effectif;
@ -317,6 +391,9 @@ class Societe extends CommonObject
*/
public $fk_prospectlevel;
/**
* @var string second name
*/
public $name_bis;
//Log data
@ -326,6 +403,7 @@ class Societe extends CommonObject
* @var string
*/
public $date_modification;
/**
* User that made last update
* @var string
@ -351,11 +429,13 @@ class Societe extends CommonObject
* @var int
*/
public $client = 0;
/**
* 0=no prospect, 1=prospect
* @var int
*/
public $prospect = 0;
/**
* 0=no supplier, 1=supplier
* @var int
@ -416,6 +496,7 @@ class Societe extends CommonObject
* @var int
*/
public $stcomm_id;
/**
* Status prospect label
* @var int
@ -427,12 +508,20 @@ class Societe extends CommonObject
* @var int
*/
public $price_level;
/**
* @var string outstanding limit
*/
public $outstanding_limit;
/**
* Min order amounts
* @var string Min order amount
*/
public $order_min_amount;
/**
* @var string Supplier min order amount
*/
public $supplier_order_min_amount;
/**
@ -440,11 +529,13 @@ class Societe extends CommonObject
* @var int
*/
public $commercial_id;
/**
* Id of parent thirdparty (if one)
* @var int
*/
public $parent;
/**
* Default language code of thirdparty (en_US, ...)
* @var string
@ -456,7 +547,11 @@ class Societe extends CommonObject
*/
public $ref;
/**
* @var string Internal ref
*/
public $ref_int;
/**
* External user reference.
* This is to allow external systems to store their id and make self-developed synchronizing functions easier to
@ -485,22 +580,49 @@ class Societe extends CommonObject
*/
public $webservices_key;
/**
* @var string Logo
*/
public $logo;
/**
* @var string logo small
*/
public $logo_small;
/**
* @var string Logo mini
*/
public $logo_mini;
/**
* @var string Logo squarred
*/
public $logo_squarred;
/**
* @var string Logo squarred small
*/
public $logo_squarred_small;
/**
* @var string Logo squarred mini
*/
public $logo_squarred_mini;
public $array_options;
// Incoterms
/**
* @var int ID
* @var int ID Incoterms
*/
public $fk_incoterms;
/**
* @var string Incoterms Location
*/
public $location_incoterms;
/**
* @var string Incoterm label
*/
public $label_incoterms; //Used into tooltip
// Multicurrency
@ -509,12 +631,11 @@ class Societe extends CommonObject
*/
public $fk_multicurrency;
/**
* @var string Multicurrency code
*/
public $multicurrency_code;
// END MODULEBUILDER PROPERTIES
/**
* Constructor
*

View File

@ -239,7 +239,7 @@ $sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
$sql .= ", s.code_client";
$sql .= ", s.code_fournisseur";
$sql .= ", s.logo";
$sql .= ", s.canvas, s.tms as datem, s.status as status";
$sql .= ", s.canvas, s.tms as date_modification, s.status as status";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= ' WHERE s.entity IN ('.getEntity('societe').')';
@ -279,7 +279,7 @@ if ($result)
$thirdparty_static->client = $objp->client;
$thirdparty_static->fournisseur = $objp->fournisseur;
$thirdparty_static->logo = $objp->logo;
$thirdparty_static->datem = $db->jdate($objp->datem);
$thirdparty_static->date_modification = $db->jdate($objp->date_modification);
$thirdparty_static->status = $objp->status;
$thirdparty_static->code_client = $objp->code_client;
$thirdparty_static->code_fournisseur = $objp->code_fournisseur;
@ -313,7 +313,7 @@ if ($result)
print '</td>';
// Last modified date
print '<td class="right">';
print dol_print_date($thirdparty_static->datem, 'day');
print dol_print_date($thirdparty_static->date_modification, 'day');
print "</td>";
print '<td class="right nowrap">';
print $thirdparty_static->getLibStatut(3);

View File

@ -444,10 +444,10 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
'total' => $order->total_ttc,
'project_id' => $order->fk_project,
'date' => $order->date_commande ?dol_print_date($order->date_commande, 'dayrfc') : '',
'date_creation' => $invoice->date_creation ?dol_print_date($invoice->date_creation, 'dayhourrfc') : '',
'date_validation' => $invoice->date_validation ?dol_print_date($invoice->date_creation, 'dayhourrfc') : '',
'date_modification' => $invoice->datem ?dol_print_date($invoice->datem, 'dayhourrfc') : '',
'date' => $order->date ?dol_print_date($order->date, 'dayrfc') : '',
'date_creation' => $order->date_creation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
'date_validation' => $order->date_validation ?dol_print_date($order->date_creation, 'dayhourrfc') : '',
'date_modification' => $order->datem ?dol_print_date($order->datem, 'dayhourrfc') : '',
'remise' => $order->remise,
'remise_percent' => $order->remise_percent,
@ -476,13 +476,15 @@ function getOrder($authentication, $id = '', $ref = '', $ref_ext = '')
else
{
$error++;
$errorcode = 'NOT_FOUND'; $errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
$errorcode = 'NOT_FOUND';
$errorlabel = 'Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
}
}
else
{
$error++;
$errorcode = 'PERMISSION_DENIED'; $errorlabel = 'User does not have permission for this request';
$errorcode = 'PERMISSION_DENIED';
$errorlabel = 'User does not have permission for this request';
}
}
@ -552,7 +554,8 @@ function getOrdersForThirdParty($authentication, $idthirdparty)
if( $socid && ( $socid != $order->socid) )
{
$error++;
$errorcode='PERMISSION_DENIED'; $errorlabel=$order->socid.' User does not have permission for this request';
$errorcode='PERMISSION_DENIED';
$errorlabel=$order->socid.' User does not have permission for this request';
}
if(!$error)