diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index aafd77731e4..c7fbe35af09 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -24,7 +24,7 @@
/**
\file htdocs/adherents/card_subscriptions.php
\ingroup adherent
- \brief Page d'ajout, edition, suppression d'une adhésion
+ \brief Onglet d'ajout, edition, suppression des adhésions d'un adhérent
\version $Revision$
*/
@@ -54,6 +54,8 @@ $action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
$typeid=isset($_GET["typeid"])?$_GET["typeid"]:$_POST["typeid"];
+if (! $user->rights->adherent->cotisation->lire)
+ accessforbidden();
/*
diff --git a/htdocs/adherents/cotisation.class.php b/htdocs/adherents/cotisation.class.php
index f60471ca124..3e5e94fc849 100644
--- a/htdocs/adherents/cotisation.class.php
+++ b/htdocs/adherents/cotisation.class.php
@@ -160,7 +160,7 @@ class Cotisation
*/
function fetch($rowid)
{
- $sql="SELECT fk_adherent, datec, tms, dateadh, cotisation, note, fk_bank";
+ $sql="SELECT rowid, fk_adherent, datec, tms, dateadh, cotisation, note, fk_bank";
$sql.=" FROM ".MAIN_DB_PREFIX."cotisation";
$sql.=" WHERE rowid=".$rowid;
@@ -173,6 +173,8 @@ class Cotisation
$obj = $this->db->fetch_object($resql);
$this->id = $obj->rowid;
+ $this->ref = $obj->rowid;
+
$this->fk_adherent = $obj->fk_adherent;
$this->datec = $obj->datec;
$this->datem = $obj->tms;
@@ -238,8 +240,8 @@ class Cotisation
$result='';
-// $lien = '';
-// $lienfin='';
+ $lien = '';
+ $lienfin='';
$picto='payment';
$label=$langs->trans("ShowSubscription");
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index 1b2c1c0e434..f3061b64eae 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -61,6 +61,9 @@ $date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_selec
// en banque mais on va mettre le solde banque direct a la valeur apres toutes les adhésions.
$allowinsertbankafter=0;
+if (! $user->rights->adherent->cotisation->lire)
+ accessforbidden();
+
/*
* Actions
diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php
index 92e016e1d93..d88a00868bf 100644
--- a/htdocs/adherents/fiche_subscription.php
+++ b/htdocs/adherents/fiche_subscription.php
@@ -277,7 +277,7 @@ if ($rowid && $action != 'edit')
//$formquestion=array();
//$formquestion['text']=''.$langs->trans("ThisWillAlsoDeleteBankRecord").'';
$text=$langs->trans("ConfirmDeleteSubscription");
- if ($conf->global->ADHERENT_BANK_USE) $text.='
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
+ if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE) $text.='
'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
$html->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion);
print '
';
}
diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php
index 530174fff83..98512683067 100644
--- a/htdocs/includes/modules/modAdherent.class.php
+++ b/htdocs/includes/modules/modAdherent.class.php
@@ -177,7 +177,7 @@ class modAdherent extends DolibarrModules
$r++;
$this->rights[$r][0] = 79;
- $this->rights[$r][1] = 'Créer/modifier les cotisations';
+ $this->rights[$r][1] = 'Créer/modifier/supprimer les cotisations';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'cotisation';
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index 60e63247942..a3ba6642975 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -102,3 +102,4 @@ BankChecks=Bank cheques
BankChecksToReceipt=Cheques waiting for deposit
DeleteTransaction=Delete transaction
ConfirmDeleteTransaction=Are you sure you want to delete this transaction ?
+ThisWillAlsoDeleteBankRecord=This will also delete generated bank transactions
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index bcba2547359..e757f46b8cf 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -2,6 +2,7 @@
MembersArea=Members area
PublicMembersArea=Public members area
MemberCard=Member card
+SubscriptionCard=Subscription card
Member=Member
Members=Members
MembersTickets=Members Tickets
@@ -87,6 +88,8 @@ ResiliateMember=Resiliate a member
ConfirmResiliateMember=Are you sure you want to resiliate this member ?
DeleteMember=Delete a member
ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions) ?
+DeleteSubscription=Delete a subscription
+ConfirmDeleteSubscription=Are you sure you want to delete this subscription ?
Filehtpasswd=htpasswd file
ValidateMember=Validate a member
ConfirmValidateMember=Are you sure you want to validate this member ?
diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang
index 5d6e8d0f0f7..1b7da7c1114 100644
--- a/htdocs/langs/fr_FR/banks.lang
+++ b/htdocs/langs/fr_FR/banks.lang
@@ -101,4 +101,5 @@ DeleteCheckReceipt=Supprimer ce bordereau de remise ?
BankChecks=Chèques
BankChecksToReceipt=Chèques à déposer
DeleteTransaction=Supprimer la transaction
-ConfirmDeleteTransaction=Etes Vous sur de vouloir supprimer cette transaction ?
+ConfirmDeleteTransaction=Etes-vous sur de vouloir supprimer cette transaction ?
+ThisWillAlsoDeleteBankRecord=Ceci supprimera aussi les écritures banquaires générées
diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang
index 76dbfdac891..6aac57aeb94 100644
--- a/htdocs/langs/fr_FR/members.lang
+++ b/htdocs/langs/fr_FR/members.lang
@@ -2,6 +2,7 @@
MembersArea=Espace adhérents
PublicMembersArea=Espace public des adhérents
MemberCard=Fiche adhérent
+SubscriptionCard=Fiche adhésion
Member=Adhérent
Members=Adhérents
MembersTickets=Etiquettes d'adhérents
@@ -87,6 +88,8 @@ ResiliateMember=R
ConfirmResiliateMember=Etes-vous sûr de vouloir résilier cet adhérent ?
DeleteMember=Effacer un membre
ConfirmDeleteMember=Etes-vous sûr de vouloir effacer ce membre (Effacer un membre efface aussi toutes ses cotisations) ?
+DeleteSubscription=Effacer une adhésion
+ConfirmDeleteSubscription=Etes-vous sûr de vouloir effacer cette adhésion ?
Filehtpasswd=Fichier htpasswd
ValidateMember=Valider un adhérent
ConfirmValidateMember=Etes-vous sûr de vouloir valider cet adhérent ?