Fix backward compatibility for type of members
This commit is contained in:
parent
ca3988ca73
commit
36f1527f76
@ -667,7 +667,7 @@ if ($rowid > 0)
|
|||||||
*/
|
*/
|
||||||
if ($action != 'addsubscription' && $action != 'create_thirdparty')
|
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.rowid as crowid, c.subscription,";
|
||||||
$sql.= " c.datec, c.fk_type as cfk_type,";
|
$sql.= " c.datec, c.fk_type as cfk_type,";
|
||||||
$sql.= " c.dateadh as dateh,";
|
$sql.= " c.dateadh as dateh,";
|
||||||
@ -705,26 +705,30 @@ if ($rowid > 0)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$accountstatic=new Account($db);
|
$accountstatic=new Account($db);
|
||||||
|
$adh = new Adherent($db);
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$adh->id = $objp->rowid;
|
||||||
|
$adh->type = $obj->type;
|
||||||
|
|
||||||
$subscriptionstatic->ref=$objp->crowid;
|
$subscriptionstatic->ref=$objp->crowid;
|
||||||
$subscriptionstatic->id=$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 '<tr class="oddeven">';
|
||||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
|
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($objp->cfk_type > 0)
|
if ($typeid > 0) {
|
||||||
{
|
|
||||||
print $adht->getNomUrl(1);
|
print $adht->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -346,7 +346,7 @@ if ($rowid && $action != 'edit')
|
|||||||
// Amount
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td class="valeur">'.price($object->amount).'</td></tr>';
|
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>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur">'.$object->note.'</td></tr>';
|
||||||
|
|
||||||
// Bank line
|
// Bank line
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user