forked from Wavyzz/dolibarr
New: Add function dolGetFirstLastname
This commit is contained in:
@@ -146,8 +146,7 @@ $max=10;
|
|||||||
* Last modified donations
|
* Last modified donations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.societe, c.nom,";
|
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.societe, c.lastname, c.firstname, c.tms as datem, c.amount";
|
||||||
$sql.= " tms as datem, amount";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as c";
|
||||||
$sql.= " WHERE c.entity = ".$conf->entity;
|
$sql.= " WHERE c.entity = ".$conf->entity;
|
||||||
//$sql.= " AND c.fk_statut > 2";
|
//$sql.= " AND c.fk_statut > 2";
|
||||||
@@ -183,7 +182,7 @@ if ($resql)
|
|||||||
print '<td class="nobordernopadding">';
|
print '<td class="nobordernopadding">';
|
||||||
print $obj->societe;
|
print $obj->societe;
|
||||||
print ($obj->societe && $obj->nom?' / ':'');
|
print ($obj->societe && $obj->nom?' / ':'');
|
||||||
print $obj->nom;
|
print dolGetFirstLastname($obj->nom,$obj->firstname);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="110" class="nobordernopadding" nowrap="nowrap">';
|
||||||
$facturestatic->ref=$obj->facnumber;
|
$facturestatic->ref=$obj->facnumber;
|
||||||
$facturestatic->id=$obj->rowid;
|
$facturestatic->id=$obj->rowid;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
@@ -767,7 +767,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
|||||||
$commandestatic->ref=$obj->ref;
|
$commandestatic->ref=$obj->ref;
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="110" class="nobordernopadding" nowrap="nowrap">';
|
||||||
print $commandestatic->getNomUrl(1);
|
print $commandestatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
@@ -864,7 +864,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td width="100" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="110" class="nobordernopadding" nowrap="nowrap">';
|
||||||
$facturestatic->ref=$obj->facnumber;
|
$facturestatic->ref=$obj->facnumber;
|
||||||
$facturestatic->id=$obj->rowid;
|
$facturestatic->id=$obj->rowid;
|
||||||
$facturestatic->type=$obj->type;
|
$facturestatic->type=$obj->type;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
@@ -3638,6 +3638,21 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='')
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return firstname and lastname in correct order
|
||||||
|
*
|
||||||
|
* @param string $firstname Firstname
|
||||||
|
* @param string $lastname Lastname
|
||||||
|
* @return string Firstname + lastname or Lastname + firstname
|
||||||
|
*/
|
||||||
|
function dolGetFirstLastname($firstname,$lastname)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) return $firstname.' '.$lastname;
|
||||||
|
else return $lastname.' '.$firstname;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set event message in dol_events session
|
* Set event message in dol_events session
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user