Skip to content

Commit

Permalink
Fix backward compatibility for type of members
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 25, 2019
1 parent ca3988c commit 36f1527
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions htdocs/adherents/subscription.php
Expand Up @@ -667,7 +667,7 @@
*/
if ($action != 'addsubscription' && $action != 'create_thirdparty')
{
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.type,";
$sql.= " c.rowid as crowid, c.subscription,";
$sql.= " c.datec, c.fk_type as cfk_type,";
$sql.= " c.dateadh as dateh,";
Expand Down Expand Up @@ -705,26 +705,30 @@
print "</tr>\n";

$accountstatic=new Account($db);
$adh = new Adherent($db);
$adht = new AdherentType($db);

while ($i < $num)
{
$objp = $db->fetch_object($result);

$adh->id = $objp->rowid;
$adh->type = $obj->type;

$subscriptionstatic->ref=$objp->crowid;
$subscriptionstatic->id=$objp->crowid;

if ($objp->cfk_type > 0)
$typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid);
if ($typeid > 0)
{
$adht->fetch($objp->cfk_type);
$adht->fetch($typeid);
}

print '<tr class="oddeven">';
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
print '<td class="center">';
if ($objp->cfk_type > 0)
{
if ($typeid > 0) {
print $adht->getNomUrl(1);
}
print '</td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/subscription/card.php
Expand Up @@ -346,7 +346,7 @@
// Amount
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur">'.price($object->amount).'</td></tr>';

// Amount
// Label
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';

// Bank line
Expand Down

0 comments on commit 36f1527

Please sign in to comment.