diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index a4ba25d7d1a..9111e4e7210 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -120,13 +120,13 @@ if ($action == 'del')
{
$type='order';
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
- $sql.= " WHERE nom = '".$db->escape($value)."'";
+ $sql.= " WHERE nom = '".$value."'";
$sql.= " AND type = '".$type."'";
$sql.= " AND entity = ".$conf->entity;
if ($db->query($sql))
{
- if ($conf->global->COMMANDE_ADDON_PDF == "$value") dolibarr_del_const($db, 'COMMANDE_ADDON_PDF',$conf->entity);
+
}
}
@@ -207,7 +207,22 @@ if ($action == 'set_COMMANDE_FREE_TEXT')
$mesg = "".$langs->trans("Error")."";
}
}
+/*
+if ($action == 'setvalidorder')
+{
+ dolibarr_set_const($db, "COMMANDE_VALID_AFTER_CLOSE_PROPAL",$_POST["validorder"],'chaine',0,'',$conf->entity);
+}
+if ($action == 'deliverycostline')
+{
+ dolibarr_set_const($db, "COMMANDE_ADD_DELIVERY_COST_LINE",$_POST["addline"],'chaine',0,'',$conf->entity);
+}
+
+if ($action == 'set_use_customer_contact_as_recipient')
+{
+ dolibarr_set_const($db, "COMMANDE_USE_CUSTOMER_CONTACT_AS_RECIPIENT",$_POST["use_customer_contact_as_recipient"],'chaine',0,'',$conf->entity);
+}
+*/
/*
* View
@@ -402,16 +417,16 @@ foreach ($conf->file->dol_document_root as $dirroot)
print "
\n";
if (in_array($name, $def))
{
- //if ($conf->global->COMMANDE_ADDON_PDF != "$name")
- //{
+ if ($conf->global->COMMANDE_ADDON_PDF != "$name")
+ {
print 'scandir.'&label='.urlencode($module->name).'">';
print img_picto($langs->trans("Activated"),'switch_on');
print '';
- //}
- //else
- //{
- // print img_picto($langs->trans("Activated"),'switch_on');
- //}
+ }
+ else
+ {
+ print img_picto($langs->trans("Activated"),'switch_on');
+ }
}
else
{
diff --git a/htdocs/admin/propale.php b/htdocs/admin/propale.php
index 2d80a71b387..10bc8630f03 100644
--- a/htdocs/admin/propale.php
+++ b/htdocs/admin/propale.php
@@ -193,12 +193,12 @@ if ($action == 'del')
{
$type='propal';
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
- $sql.= " WHERE nom = '".$db->escape($value)."'";
+ $sql.= " WHERE nom = '".$value."'";
$sql.= " AND type = '".$type."'";
$sql.= " AND entity = ".$conf->entity;
if ($db->query($sql))
{
- if ($conf->global->PROPALE_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROPALE_ADDON_PDF',$conf->entity);
+
}
}
@@ -209,7 +209,7 @@ if ($action == 'setdoc')
$db->begin();
- if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
+ if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
{
$conf->global->PROPALE_ADDON_PDF = $value;
}
@@ -438,16 +438,16 @@ foreach ($conf->file->dol_document_root as $dirroot)
print ' | '."\n";
if (in_array($name, $def))
{
- //if ($conf->global->PROPALE_ADDON_PDF != "$name")
- //{
+ if ($conf->global->PROPALE_ADDON_PDF != "$name")
+ {
print 'scandir.'&label='.urlencode($module->name).'">';
print img_picto($langs->trans("Activated"),'switch_on');
print '';
- //}
- //else
- //{
- // print img_picto($langs->trans("Activated"),'switch_on');
- //}
+ }
+ else
+ {
+ print img_picto($langs->trans("Activated"),'switch_on');
+ }
}
else
{
|