';
- echo '
';
diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index 701d9c313..d3724e179 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -225,7 +225,7 @@ class Acc_Ledger extends jrn_def_sql
// Check return code
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]");
//////////////////////////////////////////////////
// Reverse in jrnx* tables
@@ -264,7 +264,7 @@ class Acc_Ledger extends jrn_def_sql
FROM quant_sold where j_id=$3", array($p_internal, $j_id, $row));
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"));
+ throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]");
$Res = $this->db->exec_sql("INSERT INTO quant_purchase(
qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat,
qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier,
@@ -275,7 +275,7 @@ class Acc_Ledger extends jrn_def_sql
FROM quant_purchase where j_id=$3", array($p_internal, $j_id, $row));
if ($Res == false)
- throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"));
+ throw new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]");
}
$sql = "insert into jrn (
jr_id,
diff --git a/include/class_document_type.php b/include/class_document_type.php
index d66e60db9..c674731b4 100644
--- a/include/class_document_type.php
+++ b/include/class_document_type.php
@@ -71,7 +71,7 @@ class Document_type
$tmp['dt_value'] = $r[$i]['dt_value'];
$tmp['dt_prefix'] = $r[$i]['dt_prefix'];
- $bt = new IButton('X' . $r[$i]['dt_id']);
+ $bt = new IButton('M' . $r[$i]['dt_id']);
$bt->label = _('Modifier');
$bt->javascript = "cat_doc_change('" . $r[$i]['dt_id'] . "','" . Dossier::id() . "');";
@@ -80,9 +80,8 @@ class Document_type
$bt = new IButton('X' . $r[$i]['dt_id']);
$bt->label = _('Effacer');
- $bt->javascript = "if (confirm('" . _('Vous confirmez') . "')==true) {";
- $bt->javascript.="cat_doc_remove('" . $r[$i]['dt_id'] . "','" . Dossier::id() . "');";
- $bt->javascript.='}';
+ $bt->javascript = "confirm_form('X{$r[$i]['dt_id']}','" . _('Vous confirmez') . "',";
+ $bt->javascript.="function () { cat_doc_remove('{$r[$i]['dt_id']}','" . Dossier::id() . "');})";
$tmp['js_remove'] = $bt->input();
diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php
index 4f2356bf7..495b91e64 100644
--- a/include/class_fiche_def.php
+++ b/include/class_fiche_def.php
@@ -766,17 +766,22 @@ $order
/* attributes */
$r.='