From 665526a6e7139a4b30a0db92fedbdb756aa7462d Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 24 Sep 2012 11:32:29 +0200 Subject: [PATCH] Fix: dol_trunk is too restrictive !!! change the resolution of your screen ! --- htdocs/adherents/index.php | 12 +++++++++--- htdocs/adherents/liste.php | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 6e8d797d4c2..3777c94f788 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -272,7 +272,7 @@ else */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname,"; +$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; @@ -303,9 +303,15 @@ if ($resql) $staticmember->id=$obj->rowid; $staticmember->lastname=$obj->lastname; $staticmember->firstname=$obj->firstname; + if (! empty($obj->fk_soc)) { + $staticmember->socid = $obj->fk_soc; + $staticmember->fetch_thirdparty(); + } else { + $staticmember->name=$obj->company; + } $staticmember->ref=$staticmember->getFullName($langs); print ''.$subscriptionstatic->getNomUrl(1).''; - print ''.$staticmember->getNomUrl(1,24,'subscription').''; + print ''.$staticmember->getNomUrl(1,32,'subscription').''; print ''.get_date_range($db->jdate($obj->date_start),$db->jdate($obj->date_end)).''; print ''.price($obj->cotisation).''; //print ''.$staticmember->LibStatut($obj->statut,($obj->cotisation=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''; @@ -336,7 +342,7 @@ foreach ($AdherentType as $key => $adhtype) { $var=!$var; print ""; - print ''.img_object($langs->trans("ShowType"),"group").' '.$adhtype->getNomUrl(0,dol_size(32)).''; + print ''.$adhtype->getNomUrl(1, dol_size(32)).''; print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).''; print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-$MemberUpToDate[$key] > 0) ? $MembersValidated[$key]-$MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).''; print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key]:'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,$now,3).''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index dbdb8174c6b..e2bf9a5dad7 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -237,7 +237,7 @@ if ($resql) print ''; $listetype=$membertypestatic->liste_array(); - print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 12); + print $form->selectarray("type", $listetype, $type, 1, 0, 0, '', 0, 32); print ''; print ' '; @@ -278,7 +278,7 @@ if ($resql) // Lastname if ($objp->societe != '') { - print "rowid\">".dol_trunc($memberstatic->getFullName($langs))." / ".dol_trunc($objp->societe,12)."\n"; + print "rowid\">".((! empty($obj->lastname) && ! empty($obj->firstname))?dol_trunc($memberstatic->getFullName($langs))." / ":'').dol_trunc($objp->societe,32)."\n"; } else { @@ -292,7 +292,7 @@ if ($resql) $membertypestatic->id=$objp->type_id; $membertypestatic->libelle=$objp->type; print ''; - print $membertypestatic->getNomUrl(1,12); + print $membertypestatic->getNomUrl(1,32); print ''; // Moral/Physique