mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-23 09:13:16 +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:
@@ -877,6 +877,11 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$this->ref = $initialref;
|
||||
|
||||
if (! empty($this->linkedObjectsIds) && empty($this->linked_objects)) // To use new linkedObjectsIds instead of old linked_objects
|
||||
{
|
||||
$this->linked_objects = $this->linkedObjectsIds; // TODO Replace linked_objects with linkedObjectsIds
|
||||
}
|
||||
|
||||
// Add object linked
|
||||
if (! $error && $this->id && is_array($this->linked_objects) && ! empty($this->linked_objects))
|
||||
{
|
||||
@@ -889,7 +894,7 @@ class Commande extends CommonOrder
|
||||
$ret = $this->add_object_linked($origin, $origin_id);
|
||||
if (! $ret)
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -900,7 +905,7 @@ class Commande extends CommonOrder
|
||||
$ret = $this->add_object_linked($origin, $origin_id);
|
||||
if (! $ret)
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -1434,10 +1439,10 @@ class Commande extends CommonOrder
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::addline status of order must be Draft to allow use of ->addline()", LOG_ERR);
|
||||
return -3;
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user