Fix: Unable to add lines in supplier orders

This commit is contained in:
Juanjo Menent 2014-07-04 10:04:30 +02:00
parent c1d33af50d
commit 47cff4d407

View File

@ -1753,24 +1753,20 @@ elseif (! empty($object->id))
} }
// Form to add new line // Form to add new line
if ($object->statut == 0 && $user->rights->fournisseur->commande->creer && $action <> 'edit_line') if ($object->statut == 0 && $user->rights->fournisseur->commande->creer && $action != 'edit_line')
{ {
// Add free products/services form // Add free products/services form
global $forceall, $senderissupplier, $dateSelector; global $forceall, $senderissupplier, $dateSelector;
$forceall=1; $senderissupplier=1; $dateSelector=0; $forceall=1; $senderissupplier=1; $dateSelector=0;
if ($object->statut == 0 && $user->rights->propal->creer)
{ $var = true;
if ($action != 'editline')
{
$var = true;
// Add free products/services // Add free products/services
$object->formAddObjectLine(1, $societe, $mysoc); $object->formAddObjectLine(1, $societe, $mysoc);
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
}
}
} }
print '</table>'; print '</table>';