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

Conflicts:
	htdocs/commande/class/commande.class.php
This commit is contained in:
Laurent Destailleur 2018-03-13 18:04:18 +01:00
commit ca809a11af
2 changed files with 9 additions and 3 deletions

View File

@ -3143,6 +3143,12 @@ class Commande extends CommonOrder
// End call triggers
}
if ($this->nb_expedition() != 0)
{
$this->errors[] = $langs->trans('SomeShipmentExists');
$error++;
}
if (! $error)
{
// Delete order details

View File

@ -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);