Fix: Regression
This commit is contained in:
parent
1c0303ea6b
commit
7db8c8aab9
@ -49,6 +49,8 @@ $langs->load('products');
|
|||||||
if (! empty($conf->margin->enabled))
|
if (! empty($conf->margin->enabled))
|
||||||
$langs->load('margins');
|
$langs->load('margins');
|
||||||
|
|
||||||
|
$error=0;
|
||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
@ -72,6 +74,8 @@ $object = new Propal($db);
|
|||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
if ($action != 'add')
|
||||||
{
|
{
|
||||||
$ret=$object->fetch($id, $ref);
|
$ret=$object->fetch($id, $ref);
|
||||||
if ($ret == 0)
|
if ($ret == 0)
|
||||||
@ -85,10 +89,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
setEventMessage($object->error, 'errors');
|
setEventMessage($object->error, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
else $object->fetch_thirdparty();
|
||||||
}
|
}
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$object->fetch_thirdparty();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user