diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 1f7d5f19b58..93d50e43639 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -340,6 +340,12 @@ if ($result)
print $langs->trans("Payment");
print '';
}
+ else if ($links[$key]['type']=='payment_supplier') {
+ print '';
+ print img_object($langs->trans('ShowPayment'),'payment').' ';
+ print $langs->trans("Payment");
+ print '';
+ }
else if ($links[$key]['type']=='company') {
print '';
print img_object($langs->trans('ShowCustomer'),'company').' ';
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index c27c0aab872..3f99b5480d4 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -147,7 +147,7 @@ if ($action == 'add_paiement')
$paiement_id,
DOL_URL_ROOT.'/fourn/paiement/fiche.php?id=',
'(paiement)',
- 'payment');
+ 'payment_supplier');
$acc->add_url_line($bank_line_id,
$fac->fournisseur->id,
DOL_URL_ROOT.'/fourn/fiche.php?socid=',
diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php
index 901d11b98a4..fe6466c7952 100644
--- a/htdocs/fourn/facture/paiementfourn.class.php
+++ b/htdocs/fourn/facture/paiementfourn.class.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004-2006 Laurent Destailleur
* Copyright (C) 2005 Marc Barilley / Ocebo
*
* This program is free software; you can redistribute it and/or modify
@@ -240,7 +240,7 @@ class PaiementFourn
}
// Vérifier si paiement ne porte pas sur ecriture bancaire rapprochée
- // Si c'est le cas, on refuse le paiement
+ // Si c'est le cas, on refuse le delete
if ($bank_line_id)
{
$accline = new AccountLine($this->db,$bank_line_id);
diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php
index 96d26ecc86e..f32f008d6bf 100644
--- a/htdocs/fourn/paiement/fiche.php
+++ b/htdocs/fourn/paiement/fiche.php
@@ -1,6 +1,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo
+ * Copyright (C) 2006 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,6 +45,7 @@ $mesg='';
/*
* Actions
*/
+
if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->facture->creer)
{
$db->begin();
@@ -54,7 +56,7 @@ if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user-
if ($result > 0)
{
$db->commit();
- Header('Location: /fourn/facture/paiement.php');
+ Header('Location: '.DOL_URL_ROOT.'/fourn/facture/paiement.php');
exit;
}
else
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index 20ab24dcfa4..714d35bae82 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -118,4 +118,7 @@ drop table if exists llx_soc_recontact;
update llx_const set name='MAIN_SIZE_LISTE_LIMIT' where name='SIZE_LISTE_LIMIT';
update llx_const set name='SOCIETE_FISCAL_MONTH_START' where name='FISCAL_MONTH_START';
-alter table llx_paiementfourn add statut smallint(6) NOT NULL DEFAULT 0;
\ No newline at end of file
+alter table llx_paiementfourn add statut smallint(6) NOT NULL DEFAULT 0;
+
+
+update llx_bank_url set type = 'payment_supplier' where label = '(paiement)' and type='payment' and url like '%/fourn/%';