Redundant code
This commit is contained in:
parent
89684748c5
commit
e3853a648f
@ -72,7 +72,6 @@ if ($action == 'remises')
|
||||
{
|
||||
if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_METHODE_FOR_DISCOUNT'];
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
@ -85,7 +84,6 @@ if ($action == 'typemarges')
|
||||
{
|
||||
if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->MARGIN_METHODE_FOR_DISCOUNT = $_POST['MARGIN_TYPE'];
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
@ -98,7 +96,6 @@ if ($action == 'contact')
|
||||
{
|
||||
if (dolibarr_set_const($db, 'AGENT_CONTACT_TYPE', $_POST['AGENT_CONTACT_TYPE'], 'chaine', 0, '', $conf->entity) > 0)
|
||||
{
|
||||
$conf->global->AGENT_CONTACT_TYPE = $_POST['AGENT_CONTACT_TYPE'];
|
||||
setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else
|
||||
|
||||
@ -237,12 +237,7 @@ if ($action == 'deltask')
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->PROJECT_ADDON_PDF = $value;
|
||||
}
|
||||
dolibarr_set_const($db, "PROJECT_ADDON_PDF",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
// On active le modele
|
||||
$ret = delDocumentModel($value, $type);
|
||||
|
||||
@ -165,10 +165,7 @@ if ($action == 'setdoc')
|
||||
|
||||
$db->begin();
|
||||
|
||||
if (dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
$conf->global->COMPANY_ADDON_PDF = $value;
|
||||
}
|
||||
dolibarr_set_const($db, "COMPANY_ADDON_PDF",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
// On active le modele
|
||||
$type='company';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user