Skip to content

Commit

Permalink
Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/commande/class/commande.class.php
  • Loading branch information
eldy committed Mar 13, 2018
2 parents f885360 + 6b2490f commit ca809a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -3143,6 +3143,12 @@ function delete($user, $notrigger=0)
// End call triggers
}

if ($this->nb_expedition() != 0)
{
$this->errors[] = $langs->trans('SomeShipmentExists');
$error++;
}

if (! $error)
{
// Delete order details
Expand Down
6 changes: 3 additions & 3 deletions htdocs/societe/card.php
Expand Up @@ -74,7 +74,9 @@
// 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'));
Expand Down Expand Up @@ -118,8 +120,6 @@

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);
Expand Down

0 comments on commit ca809a1

Please sign in to comment.