Fix: [ bug #256 ] Delivery order SQL error

This commit is contained in:
Laurent Destailleur 2011-12-21 16:38:56 +01:00
parent b5f1038ebb
commit decf7e682f

View File

@ -36,6 +36,7 @@ if (!$user->admin)
$action=GETPOST("action");
// Shipment note
if ($action == 'activate_sending')
{
dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity);
@ -48,11 +49,13 @@ else if ($action == 'disable_sending')
Header("Location: confexped.php");
exit;
}
// Delivery note
else if ($action == 'activate_delivery')
{
dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1",'chaine',0,'',$conf->entity);
Header("Location: confexped.php");
exit;
dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); // We must also enable this
dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1",'chaine',0,'',$conf->entity);
Header("Location: confexped.php");
exit;
}
else if ($action == 'disable_delivery')
{