Fix backward compatibility for type of members

This commit is contained in:
Laurent Destailleur 2019-06-25 11:06:10 +02:00
parent ca3988ca73
commit 36f1527f76
2 changed files with 10 additions and 6 deletions

View File

@ -667,7 +667,7 @@ if ($rowid > 0)
*/
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,";
@ -705,26 +705,30 @@ if ($rowid > 0)
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>';

View File

@ -346,7 +346,7 @@ if ($rowid && $action != 'edit')
// 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