diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php
index 7feb6078153..9ede4addb52 100644
--- a/htdocs/admin/fournisseur.php
+++ b/htdocs/admin/fournisseur.php
@@ -132,10 +132,12 @@ if ($_GET["action"] == 'specimenfacture') // For invoices
if ($_GET["action"] == 'set')
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES ('".$_GET["value"]."','".$_GET["type"]."',".$conf->entity.")";
- if ($db->query($sql))
+ $res=$db->query($sql);
+ if ($res)
{
}
+ else dol_print_error($db);
}
if ($_GET["action"] == 'del')
@@ -144,10 +146,12 @@ if ($_GET["action"] == 'del')
$sql.= " WHERE nom = '".$_GET["value"]."'";
$sql.= " AND type = '".$_GET["type"]."'";
$sql.= " AND entity = ".$conf->entity;
- if ($db->query($sql))
+ $db->query($sql);
+ if ($res)
{
}
+ else dol_print_error($db);
}
if ($_GET["action"] == 'setdoc')
@@ -348,7 +352,7 @@ print '
'.$langs->trans("Name").' | '."\n";
print ''.$langs->trans("Description").' | '."\n";
print ''.$langs->trans("Status").' | '."\n";
print ''.$langs->trans("Default").' | '."\n";
-print ''.$langs->trans("Info").' | ';
+print ''.$langs->trans("Info").' | ';
print ''."\n";
clearstatcache();
@@ -366,8 +370,9 @@ if (is_resource($handle))
$classname = substr($file, 0, dol_strlen($file) -12);
$var=!$var;
- print "\n | $name";
- print " | \n \n";
+ print " |
\n";
+ print "| ".$name." | \n";
+ print "\n";
require_once($dir.$file);
$module = new $classname($db,$specimenthirdparty);
print $module->description;
@@ -379,7 +384,7 @@ if (is_resource($handle))
print ' | '."\n";
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
{
- print '';
+ print '';
print img_picto($langs->trans("Enabled"),'on');
print '';
}
@@ -392,7 +397,7 @@ if (is_resource($handle))
else
{
print ' | '."\n";
- print ''.img_picto($langs->trans("Disabled"),'off').'';
+ print ''.img_picto($langs->trans("Disabled"),'off').'';
print " | ";
}
@@ -404,7 +409,7 @@ if (is_resource($handle))
}
else
{
- print ''.img_picto($langs->trans("Disabled"),'on').'';
+ print ''.img_picto($langs->trans("Disabled"),'on').'';
}
print '';
@@ -472,7 +477,7 @@ print ''.$langs->trans("Name").' | '."\n";
print ''.$langs->trans("Description").' | '."\n";
print ''.$langs->trans("Status").' | '."\n";
print ''.$langs->trans("Default").' | '."\n";
-print ''.$langs->trans("Info").' | ';
+print ''.$langs->trans("Info").' | ';
print '
'."\n";
clearstatcache();
@@ -489,8 +494,9 @@ if (is_resource($handle))
$classname = substr($file, 0, dol_strlen($file) -12);
$var=!$var;
- print "\n | $name";
- print " | \n \n";
+ print " |
\n";
+ print "| ".$name." | \n";
+ print "";
require_once($dir.$file);
$module = new $classname($db,$specimenthirdparty);
print $module->description;
@@ -502,7 +508,7 @@ if (is_resource($handle))
print " | \n";
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
{
- print '';
+ print '';
print img_picto($langs->trans("Enabled"),'on');
print '';
}
@@ -515,7 +521,7 @@ if (is_resource($handle))
else
{
print " | \n";
- print ''.img_picto($langs->trans("Disabled"),'off').'';
+ print ''.img_picto($langs->trans("Disabled"),'off').'';
print " | ";
}
@@ -527,7 +533,7 @@ if (is_resource($handle))
}
else
{
- print ''.img_picto($langs->trans("Disabled"),'on').'';
+ print ''.img_picto($langs->trans("Disabled"),'on').'';
}
print '';
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 957867375d6..b96e89ae481 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -470,8 +470,8 @@ class FormMail
if ($this->param["models"]=='facture_relance') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
if ($this->param["models"]=='propal_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendProposal"); }
if ($this->param["models"]=='order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendOrder"); }
- if ($this->param["models"]=='supplier_order_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
- if ($this->param["models"]=='supplier_facture_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
+ if ($this->param["models"]=='order_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
+ if ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
$defaultmessage=make_substitutions($defaultmessage,$this->substit,$langs);
if (isset($_POST["message"])) $defaultmessage=$_POST["message"];
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index 94d442e0213..99979b80b08 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -1466,7 +1466,7 @@ if ($id > 0 || ! empty($ref))
$formmail->substit['__ORDERREF__']=$commande->ref;
// Tableau des parametres complementaires
$formmail->param['action']='send';
- $formmail->param['models']='supplier_order_send';
+ $formmail->param['models']='order_supplier_send';
$formmail->param['orderid']=$commande->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$commande->id;
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 15145ebcca3..b7a27e82ca8 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -1859,7 +1859,7 @@ else
$formmail->substit['__FACREF__']=$fac->ref;
// Tableau des parametres complementaires
$formmail->param['action']='send';
- $formmail->param['models']='supplier_facture_send';
+ $formmail->param['models']='invoice_supplier_send';
$formmail->param['facid']=$fac->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?facid='.$fac->id;
diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php
index df002032eb5..99a2843fb44 100644
--- a/htdocs/includes/modules/modFournisseur.class.php
+++ b/htdocs/includes/modules/modFournisseur.class.php
@@ -89,7 +89,7 @@ class modFournisseur extends DolibarrModules
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "mod_commande_fournisseur_muguet";
$r++;
-
+
$this->const[$r][0] = "INVOICE_SUPPLIER_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "canelle";
@@ -207,7 +207,7 @@ class modFournisseur extends DolibarrModules
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'facture';
$this->rights[$r][5] = 'supprimer';
-
+
$this->rights[$r][0] = 1235;
$this->rights[$r][1] = 'Envoyer les factures par mail';
$this->rights[$r][2] = 'a';
@@ -273,7 +273,7 @@ class modFournisseur extends DolibarrModules
$sql = array(
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
- "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','supplier_order',".$conf->entity.")",
+ "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','order_supplier',".$conf->entity.")",
);
$this->load_datas();