diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index bc2234e9d5c..547265098be 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -32,7 +32,8 @@ class Subscription extends CommonObject
{
public $element='subscription';
public $table_element='subscription';
-
+ public $picto='payment';
+
var $datec; // Date creation
var $datem; // Date modification
var $dateh; // Subscription start date (date subscription)
@@ -277,6 +278,31 @@ class Subscription extends CommonObject
}
+ /**
+ * Retourne le libelle du statut d'une adhesion
+ *
+ * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
+ * @return string Label
+ */
+ function getLibStatut($mode=0)
+ {
+ return '';
+ }
+
+ /**
+ * Renvoi le libelle d'un statut donne
+ *
+ * @param int $statut Id statut
+ * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
+ * @return string Label
+ */
+ function LibStatut($statut)
+ {
+ global $langs;
+ $langs->load("members");
+ return '';
+ }
+
/**
* Load information of the subscription object
*
diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index e70f737d126..d15bdd30fd9 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -792,7 +792,7 @@ if ($rowid > 0)
$sql.= " c.datef,";
$sql.= " c.fk_bank,";
$sql.= " b.rowid as bid,";
- $sql.= " ba.rowid as baid, ba.label, ba.bank";
+ $sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.accountancy_journal, ba.number";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
@@ -807,7 +807,7 @@ if ($rowid > 0)
$num = $db->num_rows($result);
$i = 0;
- print "
\n";
+ print ''."\n";
print '';
print '| '.$langs->trans("Ref").' | ';
@@ -841,6 +841,10 @@ if ($rowid > 0)
{
$accountstatic->label=$objp->label;
$accountstatic->id=$objp->baid;
+ $accountstatic->number=$objp->number;
+ $accountstatic->account_number=$objp->account_number;
+ $accountstatic->accountancy_journal=$objp->accountancy_journal;
+ $accountstatic->ref=$objp->ref;
print $accountstatic->getNomUrl(1);
}
else
diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php
index ce3baee712b..c8f68d2151c 100644
--- a/htdocs/adherents/subscription/card.php
+++ b/htdocs/adherents/subscription/card.php
@@ -40,6 +40,7 @@ $action=GETPOST("action",'alpha');
$rowid=GETPOST("rowid","int")?GETPOST("rowid","int"):GETPOST("id","int");
$typeid=GETPOST("typeid","int");
$cancel=GETPOST('cancel');
+$confirm=GETPOST('confirm');
if (! $user->rights->adherent->cotisation->lire)
accessforbidden();
@@ -62,10 +63,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include,
//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
-if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update' && ! $_POST["cancel"])
+if ($user->rights->adherent->cotisation->creer && $action == 'update' && ! $cancel)
{
// Charge objet actuel
- $result=$object->fetch($_POST["rowid"]);
+ $result=$object->fetch($rowid);
if ($result > 0)
{
$db->begin();
@@ -138,7 +139,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
}
}
-if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $user->rights->adherent->cotisation->creer)
+if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent->cotisation->creer)
{
$result=$object->fetch($rowid);
$result=$object->delete($user);
@@ -189,11 +190,11 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
- print "\n";
- print '';
-
$linkback = ''.$langs->trans("BackToList").'';
+ print "\n";
+ print '';
+
// Ref
print '| '.$langs->trans("Ref").' | ';
print '';
@@ -287,49 +288,50 @@ if ($rowid && $action != 'edit')
print ' |