Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
0258d3aeeb
@ -164,6 +164,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
// Properties for links to other objects
|
||||
var $fk_element; // Id of record
|
||||
var $elementid; // Id of record alternative for API
|
||||
var $elementtype; // Type of record. This if property ->element of object linked to.
|
||||
|
||||
// Ical
|
||||
@ -550,7 +551,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= " a.fk_user_author, a.fk_user_mod,";
|
||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.fk_element as elementid, a.elementtype,";
|
||||
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,";
|
||||
$sql.= " s.nom as socname,";
|
||||
@ -624,7 +625,8 @@ class ActionComm extends CommonObject
|
||||
$this->societe->id = $obj->fk_soc; // deprecated
|
||||
$this->contact->id = $obj->fk_contact; // deprecated
|
||||
|
||||
$this->fk_element = $obj->fk_element;
|
||||
$this->fk_element = $obj->elementid;
|
||||
$this->elementid = $obj->elementid;
|
||||
$this->elementtype = $obj->elementtype;
|
||||
|
||||
$this->fetchResources();
|
||||
|
||||
@ -3135,6 +3135,12 @@ class Commande extends CommonOrder
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
if ($this->nb_expedition() != 0)
|
||||
{
|
||||
$this->errors[] = $langs->trans('SomeShipmentExists');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete order details
|
||||
|
||||
@ -1137,9 +1137,12 @@ foreach ($listofreferent as $key => $value)
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else // error
|
||||
else
|
||||
{
|
||||
print $elementarray;
|
||||
if (! is_array($elementarray)) // error
|
||||
{
|
||||
print $elementarray;
|
||||
}
|
||||
}
|
||||
print "</table>";
|
||||
print "<br>\n";
|
||||
|
||||
@ -74,7 +74,9 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('thirdpartycard','globalcard'));
|
||||
|
||||
if ($action == 'view' && $object->fetch($socid)<=0)
|
||||
if ($socid > 0) $object->fetch($socid);
|
||||
|
||||
if (! ($object->id > 0) && $action == 'view')
|
||||
{
|
||||
$langs->load("errors");
|
||||
print($langs->trans('ErrorRecordNotFound'));
|
||||
@ -118,8 +120,6 @@ if (empty($reshook))
|
||||
|
||||
if ($action == 'confirm_merge' && $confirm == 'yes' && $user->rights->societe->creer)
|
||||
{
|
||||
$object->fetch($socid);
|
||||
|
||||
$error = 0;
|
||||
$soc_origin_id = GETPOST('soc_origin', 'int');
|
||||
$soc_origin = new Societe($db);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user