diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 8bcabf7f17b..6d1e417f4ea 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1152,7 +1152,7 @@ class AccountLine extends CommonObject
if ($this->rappro)
{
// Protection to avoid any delete of consolidated lines
- $this->error="DeleteNotPossibleLineIsConsolidated";
+ $this->error="ErrorDeleteNotPossibleLineIsConsolidated";
return -1;
}
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index e89f2a273f8..a2640bcbc9c 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -313,17 +313,20 @@ class PaymentSocialContribution extends CommonObject
{
global $conf, $langs;
$error=0;
+
+ dol_syslog(get_class($this)."::delete");
$this->db->begin();
- if (! $error)
+ if ($this->bank_line > 0)
{
- $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url";
- $sql.= " WHERE type='payment_sc' AND url_id=".$this->id;
-
- dol_syslog(get_class($this)."::delete sql=".$sql);
- $resql = $this->db->query($sql);
- if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
+ $accline = new AccountLine($this->db);
+ $accline->fetch($this->bank_line);
+ $result = $accline->delete();
+ if($result < 0) {
+ $this->errors[] = $accline->error;
+ $error++;
+ }
}
if (! $error)
diff --git a/htdocs/projet/liste.php b/htdocs/projet/liste.php
index 39fcdb64a01..857d8949c9d 100644
--- a/htdocs/projet/liste.php
+++ b/htdocs/projet/liste.php
@@ -119,16 +119,23 @@ if ($resql)
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'
';
else print $langs->trans("ProjectsPublicDesc").'
';
}
+
+ $param='';
+ if ($mine) $param.='mode=mine';
+ if ($socid) $param.='&socid='.$socid;
+ if ($search_ref) $param.='&search_ref='.$search_ref;
+ if ($search_label) $param.='&search_label='.$search_label;
+ if ($search_societe) $param.='&search_societe='.$search_societe;
print '