mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: Use correct order of firstname and lastname.
This commit is contained in:
parent
ba2df8ac08
commit
29536ecbd8
|
|
@ -544,8 +544,6 @@ class Adherent extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
$this->fullname=trim($this->nom.' '.$this->prenom);
|
||||
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
$this->use_webcal=($conf->global->PHPWEBCALENDAR_MEMBERSTATUS=='always'?1:0);
|
||||
|
|
@ -973,7 +971,6 @@ class Adherent extends CommonObject
|
|||
$this->civilite_id = $obj->civilite;
|
||||
$this->prenom = $obj->prenom;
|
||||
$this->nom = $obj->nom;
|
||||
$this->fullname = trim($obj->nom.' '.$obj->prenom);
|
||||
$this->login = $obj->login;
|
||||
$this->pass = $obj->pass;
|
||||
$this->societe = $obj->societe;
|
||||
|
|
@ -1709,23 +1706,42 @@ class Adherent extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Return full name of member
|
||||
* \return string Full name
|
||||
* \brief Return full name (civility+' '+name+' '+lastname)
|
||||
* \param langs Language object for translation of civility
|
||||
* \param option 0=No option, 1=Add civility
|
||||
* \param nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
|
||||
* \return string String with full name
|
||||
*/
|
||||
function getFullname($outputlangs)
|
||||
function getFullName($langs,$option=0,$nameorder=-1)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($this->nom && $this->prenom)
|
||||
$ret='';
|
||||
if ($option && $this->civilite_id)
|
||||
{
|
||||
if (! empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) return $this->nom.' '.$this->prenom;
|
||||
else return $this->prenom.' '.$this->nom;
|
||||
if ($langs->transnoentitiesnoconv("Civility".$this->civilite_id)!="Civility".$this->civilite_id) $ret.=$langs->transnoentitiesnoconv("Civility".$this->civilite_id).' ';
|
||||
else $ret.=$this->civilite_id.' ';
|
||||
}
|
||||
if ($this->nom) return $this->nom;
|
||||
if ($this->prenom) return $this->prenom;
|
||||
return '';
|
||||
|
||||
// If order not defined, we use the setup
|
||||
if ($nameorder < 0) $nameorder=(! $conf->global->MAIN_FIRSTNAME_NAME_POSITION);
|
||||
|
||||
if ($nameorder)
|
||||
{
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
}
|
||||
return trim($ret);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libelle de civilite du contact
|
||||
* \return string Nom traduit de la civilite
|
||||
|
|
@ -1949,7 +1965,6 @@ class Adherent extends CommonObject
|
|||
$this->civilite_id = 0;
|
||||
$this->nom = 'DOLIBARR';
|
||||
$this->prenom = 'SPECIMEN';
|
||||
$this->fullname=trim($this->nom.' '.$this->prenom);
|
||||
$this->login='dolibspec';
|
||||
$this->pass='dolibspec';
|
||||
$this->societe = 'Societe ABC';
|
||||
|
|
@ -2016,8 +2031,10 @@ class Adherent extends CommonObject
|
|||
// Object classes
|
||||
$info["objectclass"]=explode(',',$conf->global->LDAP_MEMBER_OBJECT_CLASS);
|
||||
|
||||
$this->fullname=$this->getFullName($langs);
|
||||
|
||||
// Member
|
||||
if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->nom && $conf->global->LDAP_MEMBER_FIELD_NAME) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
|
||||
if ($this->prenom && $conf->global->LDAP_MEMBER_FIELD_FIRSTNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
|
||||
if ($this->login && $conf->global->LDAP_MEMBER_FIELD_LOGIN) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ if ($_POST['action'] == 'setsocid')
|
|||
$thirdparty=new Societe($db);
|
||||
$thirdparty->fetch($_POST["socid"]);
|
||||
$error++;
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->fullname,$othermember->login,$thirdparty->nom).'</div>';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorMemberIsAlreadyLinkedToThisThirdParty",$othermember->getFullName($langs),$othermember->login,$thirdparty->nom).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +231,6 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
|
|||
$adh->civilite_id = trim($_POST["civilite_id"]);
|
||||
$adh->prenom = trim($_POST["prenom"]);
|
||||
$adh->nom = trim($_POST["nom"]);
|
||||
$adh->fullname = trim($adh->prenom.' '.$adh->nom);
|
||||
$adh->login = trim($_POST["login"]);
|
||||
$adh->pass = trim($_POST["pass"]);
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
|||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td class="valeur" colspan="2">'.$subscription->ref.' </td></tr>';
|
||||
|
||||
// Member
|
||||
$adh->ref=$adh->fullname;
|
||||
$adh->ref=$adh->getFullName($langs);
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Member").'</td><td class="valeur" colspan="3">'.$adh->getNomUrl(1,0,'subscription').'</td>';
|
||||
print '</tr>';
|
||||
|
|
@ -313,7 +313,7 @@ if ($rowid && $action != 'edit')
|
|||
print '</td></tr>';
|
||||
|
||||
// Member
|
||||
$adh->ref=$adh->fullname;
|
||||
$adh->ref=$adh->getFullName($langs);
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Member").'</td><td class="valeur" colspan="3">'.$adh->getNomUrl(1,0,'subscription').'</td>';
|
||||
print '</tr>';
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ if ($conf->global->PRELEVEMENT_USER > 0)
|
|||
{
|
||||
$cuser = new User($db);
|
||||
$cuser->fetch($conf->global->PRELEVEMENT_USER);
|
||||
print $cuser->fullname;
|
||||
print $cuser->getFullName($langs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1734,7 +1734,7 @@ if ($id > 0 || ! empty($ref))
|
|||
$formmail = new FormMail($db);
|
||||
$formmail->fromtype = 'user';
|
||||
$formmail->fromid = $user->id;
|
||||
$formmail->fromname = $user->fullname;
|
||||
$formmail->fromname = $user->getFullName($langs);
|
||||
$formmail->frommail = $user->email;
|
||||
$formmail->withfrom=1;
|
||||
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
||||
|
|
|
|||
|
|
@ -2251,7 +2251,7 @@ else
|
|||
$formmail = new FormMail($db);
|
||||
$formmail->fromtype = 'user';
|
||||
$formmail->fromid = $user->id;
|
||||
$formmail->fromname = $user->fullname;
|
||||
$formmail->fromname = $user->getFullName($langs);
|
||||
$formmail->frommail = $user->email;
|
||||
$formmail->withfrom=1;
|
||||
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ if ($result)
|
|||
$author=new User($db);
|
||||
$author->fetch($objp->fk_user_author);
|
||||
print '<td colspan="4"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$author->id.'">';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</a></td>';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$author->getFullName($langs).'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class ComptaJournalPaiement
|
|||
|
||||
function GeneratePdf($user, $dir, $excid, $excref)
|
||||
{
|
||||
global $conf;
|
||||
global $conf,$langs;
|
||||
|
||||
$date = strftime("%Y%m",time());
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ class ComptaJournalPaiement
|
|||
|
||||
$this->pdf->SetTitle("Journal des paiements");
|
||||
$this->pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$this->pdf->SetAuthor($user->fullname);
|
||||
$this->pdf->SetAuthor($user->getFullName($langs));
|
||||
|
||||
$this->pdf->SetMargins(10, 10, 10);
|
||||
$this->pdf->SetAutoPageBreak(1,10);
|
||||
|
|
|
|||
|
|
@ -44,222 +44,221 @@ class ComptaJournalVente {
|
|||
|
||||
function GeneratePdf($user, $dir, $excid, $excref)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$date = strftime("%Y%m",time());
|
||||
|
||||
$file = $dir . "JournalVente".$excref . ".pdf";
|
||||
|
||||
if (file_exists($dir))
|
||||
{
|
||||
$pdf = new ComptaJournalPdf('P','mm','A4');
|
||||
$pdf->AliasNbPages();
|
||||
$pdf = new ComptaJournalPdf('P','mm','A4');
|
||||
$pdf->AliasNbPages();
|
||||
|
||||
$pdf->Open();
|
||||
$pdf->AddPage();
|
||||
$pdf->Open();
|
||||
$pdf->AddPage();
|
||||
|
||||
$this->tab_top = 90;
|
||||
$this->tab_height = 90;
|
||||
$this->tab_top = 90;
|
||||
$this->tab_height = 90;
|
||||
|
||||
$pdf->SetTitle("Journal des ventes");
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($user->fullname);
|
||||
$pdf->SetTitle("Journal des ventes");
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($user->getFullName($langs));
|
||||
|
||||
$pdf->SetMargins(10, 10, 10);
|
||||
$pdf->SetAutoPageBreak(1,10);
|
||||
$pdf->SetMargins(10, 10, 10);
|
||||
$pdf->SetAutoPageBreak(1,10);
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
$pdf->SetFont('Arial','', 9);
|
||||
|
||||
$pdf->SetXY (10, 10 );
|
||||
$nexY = $pdf->GetY();
|
||||
$pdf->SetXY (10, 10 );
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$sql = "SELECT f.rowid as facid, f.facnumber, f.datef as dp";
|
||||
$sql .= " , f.total_ttc as amount, f.tva";
|
||||
$sql .= " , s.nom, s.code_compta";
|
||||
$sql .= " , l.price, l.tva_tx";
|
||||
$sql .= " , c.numero, f.increment";
|
||||
$sql .= " , l.rowid as lrowid";
|
||||
$sql = "SELECT f.rowid as facid, f.facnumber, f.datef as dp";
|
||||
$sql .= " , f.total_ttc as amount, f.tva";
|
||||
$sql .= " , s.nom, s.code_compta";
|
||||
$sql .= " , l.price, l.tva_tx";
|
||||
$sql .= " , c.numero, f.increment";
|
||||
$sql .= " , l.rowid as lrowid";
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
|
||||
|
||||
$sql .= " WHERE f.rowid = l.fk_facture ";
|
||||
$sql .= " AND s.rowid = f.fk_soc";
|
||||
$sql .= " AND f.fk_statut = 1 ";
|
||||
$sql .= " AND l.fk_code_ventilation <> 0 ";
|
||||
$sql .= " AND l.fk_export_compta <> 0";
|
||||
$sql .= " AND c.rowid = l.fk_code_ventilation";
|
||||
$sql .= " WHERE f.rowid = l.fk_facture ";
|
||||
$sql .= " AND s.rowid = f.fk_soc";
|
||||
$sql .= " AND f.fk_statut = 1 ";
|
||||
$sql .= " AND l.fk_code_ventilation <> 0 ";
|
||||
$sql .= " AND l.fk_export_compta <> 0";
|
||||
$sql .= " AND c.rowid = l.fk_code_ventilation";
|
||||
|
||||
$sql .= " AND l.fk_export_compta = ".$excid;
|
||||
$sql .= " AND l.fk_export_compta = ".$excid;
|
||||
|
||||
$sql .= " ORDER BY date_format(f.datef,'%Y%m%d') ASC, f.rowid, l.rowid";
|
||||
$sql .= " ORDER BY date_format(f.datef,'%Y%m%d') ASC, f.rowid, l.rowid";
|
||||
|
||||
$oldate = '';
|
||||
$oldfac = '';
|
||||
$oldate = '';
|
||||
$oldfac = '';
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var = True;
|
||||
$journ = 'VI';
|
||||
$hligne = 5;
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var = True;
|
||||
$journ = 'VI';
|
||||
$hligne = 5;
|
||||
|
||||
$wc = array(0,14,6,16,16,90,16,12,4,16);
|
||||
$wc = array(0,14,6,16,16,90,16,12,4,16);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
if ($oldate <> strftime("%d%m%Y",$this->db->jdate($obj->dp)))
|
||||
{
|
||||
if ($oldate <> strftime("%d%m%Y",$this->db->jdate($obj->dp)))
|
||||
{
|
||||
|
||||
$journal = "Journal $journ du ".strftime('%A, %e %B %G',$this->db->jdate($obj->dp));
|
||||
$total_credit = 0 ;
|
||||
$total_debit = 0 ;
|
||||
$pdf->SetFont('Arial','B',10);
|
||||
$journal = "Journal $journ du ".strftime('%A, %e %B %G',$this->db->jdate($obj->dp));
|
||||
$total_credit = 0 ;
|
||||
$total_debit = 0 ;
|
||||
$pdf->SetFont('Arial','B',10);
|
||||
|
||||
$pdf->cell(10,$hligne,"$journal");
|
||||
$pdf->ln();
|
||||
$pdf->cell(10,$hligne,"$journal");
|
||||
$pdf->ln();
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetFont('Arial','',9);
|
||||
|
||||
$pdf->cell($wc[1],$hligne,'Date');
|
||||
$pdf->cell($wc[2],$hligne,'');
|
||||
$pdf->cell($wc[3],$hligne,'Compte');
|
||||
$pdf->cell($wc[4],$hligne,'Tiers');
|
||||
$pdf->cell($wc[5],$hligne,'Libell<6C>');
|
||||
$pdf->cell($wc[6],$hligne,'Facture');
|
||||
$pdf->cell($wc[7],$hligne,'Montant',0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,'');
|
||||
$pdf->cell($wc[9],$hligne,'Echeance',0,0,'R');
|
||||
$pdf->cell($wc[1],$hligne,'Date');
|
||||
$pdf->cell($wc[2],$hligne,'');
|
||||
$pdf->cell($wc[3],$hligne,'Compte');
|
||||
$pdf->cell($wc[4],$hligne,'Tiers');
|
||||
$pdf->cell($wc[5],$hligne,'Libell<6C>');
|
||||
$pdf->cell($wc[6],$hligne,'Facture');
|
||||
$pdf->cell($wc[7],$hligne,'Montant',0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,'');
|
||||
$pdf->cell($wc[9],$hligne,'Echeance',0,0,'R');
|
||||
|
||||
$pdf->ln();
|
||||
$pdf->ln();
|
||||
|
||||
$oldate = strftime("%d%m%Y",$this->db->jdate($obj->dp));
|
||||
}
|
||||
$oldate = strftime("%d%m%Y",$this->db->jdate($obj->dp));
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
$socnom = $obj->nom;
|
||||
$libelle = "Facture";
|
||||
$amount = abs($obj->amount);
|
||||
$price = abs(price($obj->price));
|
||||
$tva = abs($obj->tva);
|
||||
/*
|
||||
*
|
||||
*/
|
||||
$socnom = $obj->nom;
|
||||
$libelle = "Facture";
|
||||
$amount = abs($obj->amount);
|
||||
$price = abs(price($obj->price));
|
||||
$tva = abs($obj->tva);
|
||||
|
||||
$facnumber = $obj->facnumber;
|
||||
if (strlen(trim($obj->increment)) > 0)
|
||||
{
|
||||
$facnumber = $obj->increment;
|
||||
}
|
||||
$facnumber = $obj->facnumber;
|
||||
if (strlen(trim($obj->increment)) > 0)
|
||||
{
|
||||
$facnumber = $obj->increment;
|
||||
}
|
||||
|
||||
if (strlen($obj->nom) > 31)
|
||||
{
|
||||
$socnom = substr($obj->nom, 0 , 31);
|
||||
}
|
||||
if (strlen($obj->nom) > 31)
|
||||
{
|
||||
$socnom = substr($obj->nom, 0 , 31);
|
||||
}
|
||||
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetFont('Arial','',9);
|
||||
|
||||
if ($obj->amount >= 0)
|
||||
{
|
||||
$d = "D";
|
||||
$c = "C";
|
||||
if ($obj->amount >= 0)
|
||||
{
|
||||
$d = "D";
|
||||
$c = "C";
|
||||
|
||||
$credit = '';
|
||||
$debit = $amount;
|
||||
$total_debit = $total_debit + $debit;
|
||||
$grand_total_debit = $grand_total_debit + $debit;
|
||||
$credit = '';
|
||||
$debit = $amount;
|
||||
$total_debit = $total_debit + $debit;
|
||||
$grand_total_debit = $grand_total_debit + $debit;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$d = "C";
|
||||
$c = "D";
|
||||
}
|
||||
else
|
||||
{
|
||||
$d = "C";
|
||||
$c = "D";
|
||||
|
||||
$credit = $amount;
|
||||
$debit = '';
|
||||
$total_credit = $total_credit + $credit;
|
||||
$grand_total_credit = $grand_total_credit + $credit;
|
||||
}
|
||||
$credit = $amount;
|
||||
$debit = '';
|
||||
$total_credit = $total_credit + $credit;
|
||||
$grand_total_credit = $grand_total_credit + $credit;
|
||||
}
|
||||
|
||||
if ($oldfac <> $obj->facid)
|
||||
{
|
||||
$oldfac = $obj->facid;
|
||||
if ($oldfac <> $obj->facid)
|
||||
{
|
||||
$oldfac = $obj->facid;
|
||||
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,'41100000');
|
||||
$pdf->cell($wc[4],$hligne,$obj->code_compta);
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$amount,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$d);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,'41100000');
|
||||
$pdf->cell($wc[4],$hligne,$obj->code_compta);
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$amount,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$d);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,'4457119');
|
||||
$pdf->cell($wc[4],$hligne,'');
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$tva,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$c);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
}
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,'4457119');
|
||||
$pdf->cell($wc[4],$hligne,'');
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$tva,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$c);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
}
|
||||
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,$obj->numero);
|
||||
$pdf->cell($wc[4],$hligne,'');
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$price,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$c);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
|
||||
$pdf->cell($wc[2],$hligne,'VI');
|
||||
$pdf->cell($wc[3],$hligne,$obj->numero);
|
||||
$pdf->cell($wc[4],$hligne,'');
|
||||
$pdf->cell($wc[5],$hligne,$socnom .' '.$libelle);
|
||||
$pdf->cell($wc[6],$hligne,$facnumber);
|
||||
$pdf->cell($wc[7],$hligne,$price,0,0,'R');
|
||||
$pdf->cell($wc[8],$hligne,$c);
|
||||
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
|
||||
$pdf->ln();
|
||||
|
||||
$i++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$pdf->Close();
|
||||
$pdf->Close();
|
||||
|
||||
$pdf->Output($file);
|
||||
$pdf->Output($file);
|
||||
|
||||
$result = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result -1;
|
||||
}
|
||||
$result = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = -2;
|
||||
$result = -2;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -3426,7 +3426,7 @@ else
|
|||
$formmail = new FormMail($db);
|
||||
$formmail->fromtype = 'user';
|
||||
$formmail->fromid = $user->id;
|
||||
$formmail->fromname = $user->fullname;
|
||||
$formmail->fromname = $user->getFullName($langs);
|
||||
$formmail->frommail = $user->email;
|
||||
$formmail->withfrom=1;
|
||||
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ if ($_GET["action"] == 'create')
|
|||
print '<textarea class="flat" name="note" wrap="soft" cols="60" rows="'.ROWS_4.'"></textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->fullname."</td></tr>";
|
||||
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
|
||||
|
||||
print "<tr><td>".$langs->trans("PaymentConditions")."</td><td>";
|
||||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$facture->id,$facture->cond_reglement_id,'none');
|
||||
|
|
@ -357,7 +357,7 @@ else
|
|||
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$fac->id,$fac->cond_reglement_id,'none');
|
||||
print "</td></tr>";
|
||||
|
||||
print "<tr><td>".$langs->trans("Author")."</td><td colspan=\"3\">$author->fullname</td>";
|
||||
print "<tr><td>".$langs->trans("Author")."</td><td colspan=\"3\">".$author->getFullName($langs)."</td>";
|
||||
|
||||
if ($fac->remise_percent > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,10 +170,12 @@ class RejetPrelevement
|
|||
|
||||
/**
|
||||
* \brief Envoi mail
|
||||
*
|
||||
* \param fac Invoice object
|
||||
*/
|
||||
function _send_email($fac)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$userid = 0;
|
||||
|
||||
$sql = "SELECT fk_user_demande";
|
||||
|
|
@ -207,8 +209,8 @@ class RejetPrelevement
|
|||
require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
|
||||
$subject = "Prelevement rejete";
|
||||
$sendto = $emuser->fullname." <".$emuser->email.">";
|
||||
$from = $this->user->fullname." <".$this->user->email.">";
|
||||
$sendto = $emuser->getFullName($langs)." <".$emuser->email.">";
|
||||
$from = $this->user->getFullName($langs)." <".$this->user->email.">";
|
||||
$msgishtml=0;
|
||||
|
||||
$arr_file = array();
|
||||
|
|
@ -217,7 +219,7 @@ class RejetPrelevement
|
|||
|
||||
$message = "Bonjour,\n";
|
||||
$message .= "\nLe prelevement de la facture ".$fac->ref." pour le compte de la societe ".$soc->nom." d'un montant de ".price($fac->total_ttc)." a ete rejete par la banque.";
|
||||
$message .= "\n\n--\n".$this->user->fullname;
|
||||
$message .= "\n\n--\n".$this->user->getFullName($langs);
|
||||
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,
|
||||
$arr_file,$arr_mime,$arr_name,
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ if ($_GET["id"])
|
|||
|
||||
print '<tr><td width="20%">Date Transmission / Par</td><td>';
|
||||
print dol_print_date($bon->date_trans,'dayhour');
|
||||
print ' par '.$muser->fullname.'</td></tr>';
|
||||
print ' / '.$muser->getFullName($langs).'</td></tr>';
|
||||
print '<tr><td width="20%">Methode Transmission</td><td>';
|
||||
print $bon->methodes_trans[$bon->method_trans];
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -263,8 +263,10 @@ class Contact extends CommonObject
|
|||
// Object classes
|
||||
$info["objectclass"]=explode(',',$conf->global->LDAP_CONTACT_OBJECT_CLASS);
|
||||
|
||||
// Champs
|
||||
if ($this->getFullName($langs) && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->getFullName($langs);
|
||||
$this->fullname=$this->getFullName($langs);
|
||||
|
||||
// Fields
|
||||
if ($this->fullname && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->name && $conf->global->LDAP_CONTACT_FIELD_NAME) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->name;
|
||||
if ($this->firstname && $conf->global->LDAP_CONTACT_FIELD_FIRSTNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
||||
|
||||
|
|
@ -786,9 +788,9 @@ class Contact extends CommonObject
|
|||
|
||||
/**
|
||||
* \brief Return full name (civility+' '+name+' '+lastname)
|
||||
* \param langs Lang object for translation of civility
|
||||
* \param langs Language object for translation of civility
|
||||
* \param option 0=No option, 1=Add civility
|
||||
* \param nameorder 0=Lastname+Firstname, 1=Firstname+Lastname
|
||||
* \param nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
|
||||
* \return string String with full name
|
||||
*/
|
||||
function getFullName($langs,$option=0,$nameorder=-1)
|
||||
|
|
|
|||
|
|
@ -2084,7 +2084,7 @@ class Form
|
|||
//print $this->cache_contacts[$selected];
|
||||
$contact=new Contact($this->db);
|
||||
$contact->fetch($selected);
|
||||
print $contact->nom.' '.$contact->prenom;
|
||||
print $contact->getFullName($langs);
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1422,7 +1422,7 @@ if ($id > 0 || ! empty($ref))
|
|||
$formmail = new FormMail($db);
|
||||
$formmail->fromtype = 'user';
|
||||
$formmail->fromid = $user->id;
|
||||
$formmail->fromname = $user->fullname;
|
||||
$formmail->fromname = $user->getFullName($langs);
|
||||
$formmail->frommail = $user->email;
|
||||
$formmail->withfrom=1;
|
||||
$formmail->withto=empty($_POST["sendto"])?1:$_POST["sendto"];
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class CommActionRapport
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($this->title));
|
||||
$pdf->SetSubject($outputlangs->convToOutputCharset($this->subject));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeywords($outputlangs->convToOutputCharset($this->title." ".$this->subject));
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||
$pdf->SetTitle($outputlangs->transnoentities("CheckReceipt")." ".$number);
|
||||
$pdf->SetSubject($outputlangs->transnoentities("CheckReceipt"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->transnoentities("CheckReceipt")." ".$number);
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($com->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($com->ref)." ".$outputlangs->transnoentities("Order"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($com->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($com->ref)." ".$outputlangs->transnoentities("Order"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
|
||||
$this->db = $db;
|
||||
$this->name = "quevedo";
|
||||
$this->description =$langs->trans('PDFQuevedoDescription');
|
||||
$this->description =$langs->trans('PDFQuevedoDescription');
|
||||
|
||||
// Dimension page pour format A4
|
||||
$this->type = 'pdf';
|
||||
|
|
@ -180,7 +180,7 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($com->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($com->ref)." ".$outputlangs->transnoentities("Order"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -279,14 +279,14 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
$tvaligne=$com->lignes[$i]->total_tva;
|
||||
|
||||
|
||||
$localtax1ligne=$com->lignes[$i]->total_localtax1;
|
||||
$localtax2ligne=$com->lignes[$i]->total_localtax2;
|
||||
|
||||
|
||||
$vatrate=(string) $com->lignes[$i]->tva_tx;
|
||||
$localtax1rate=(string) $com->lignes[$i]->localtax1_tx;
|
||||
$localtax2rate=(string) $com->lignes[$i]->localtax2_tx;
|
||||
|
||||
|
||||
if (($com->lignes[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
$this->tva[$vatrate] += $tvaligne;
|
||||
$this->localtax1[$localtax1rate]+=$localtax1ligne;
|
||||
|
|
@ -613,7 +613,7 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
|
||||
// Total LocalTax2
|
||||
if ($conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
|
|
@ -632,10 +632,10 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -645,22 +645,22 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT1ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Local tax 2
|
||||
foreach( $this->localtax2 as $tvakey => $tvaval )
|
||||
{
|
||||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -670,11 +670,11 @@ class pdf_quevedo extends ModelePDFCommandes
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT2ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$useborder=0;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Sending"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Sending"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||
$pdf->SetXY($blSocX2,$blSocY+20);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Deliverer")." ".$outputlangs->convToOutputCharset($livreur->fullname), '' , 'L');
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Deliverer")." ".$outputlangs->convToOutputCharset($livreur->getFullName($outputlangs)), '' , 'L');
|
||||
|
||||
|
||||
/**********************************/
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Sending"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($fac->ref)." ".$outputlangs->transnoentities("Sending"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($fac->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($fac->ref)." ".$outputlangs->transnoentities("Invoice"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class pdf_lince extends ModelePDFFactures
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($fac->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($fac->ref)." ".$outputlangs->transnoentities("Invoice"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -286,16 +286,16 @@ class pdf_lince extends ModelePDFFactures
|
|||
$tvaligne=$fac->lignes[$i]->total_tva;
|
||||
$localtax1ligne=$fac->lignes[$i]->total_localtax1;
|
||||
$localtax2ligne=$fac->lignes[$i]->total_localtax2;
|
||||
|
||||
|
||||
if ($fac->remise_percent) $tvaligne-=($tvaligne*$fac->remise_percent)/100;
|
||||
if ($fac->remise_percent) $localtax1ligne-=($localtax1ligne*$fac->remise_percent)/100;
|
||||
if ($fac->remise_percent) $localtax2ligne-=($localtax2ligne*$fac->remise_percent)/100;
|
||||
|
||||
|
||||
|
||||
|
||||
$vatrate=(string) $fac->lignes[$i]->tva_tx;
|
||||
$localtax1rate=(string) $fac->lignes[$i]->localtax1_tx;
|
||||
$localtax2rate=(string) $fac->lignes[$i]->localtax2_tx;
|
||||
|
||||
|
||||
if (($fac->lignes[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
$this->tva[$vatrate] += $tvaligne;
|
||||
$this->localtax1[$localtax1rate]+=$localtax1ligne;
|
||||
|
|
@ -763,7 +763,7 @@ class pdf_lince extends ModelePDFFactures
|
|||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
|
||||
// Total LocalTax2
|
||||
if ($conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
|
|
@ -782,10 +782,10 @@ class pdf_lince extends ModelePDFFactures
|
|||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -795,22 +795,22 @@ class pdf_lince extends ModelePDFFactures
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT1ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Local tax 2
|
||||
foreach( $this->localtax2 as $tvakey => $tvaval )
|
||||
{
|
||||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -820,11 +820,11 @@ class pdf_lince extends ModelePDFFactures
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT2ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($fac->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Invoice"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($fac->ref)." ".$outputlangs->transnoentities("Invoice"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("DeliveryOrder"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||
$pdf->SetFont('Arial','B',9);
|
||||
|
||||
// Add list of linked orders
|
||||
// TODO mutualiser
|
||||
// TODO mutualiser
|
||||
$object->load_object_linked();
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("DeliveryOrder"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -544,7 +544,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||
$pdf->SetTextColor(0,0,60);
|
||||
|
||||
// Add list of linked orders
|
||||
// TODO mutualiser
|
||||
// TODO mutualiser
|
||||
$object->load_object_linked();
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ class pdf_standard {
|
|||
$pdf->SetTitle($outputlangs->transnoentities('MembersCards'));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("MembersCards"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->transnoentities('MembersCards')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->nom));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Project"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("Project"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($propale->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($propale->ref)." ".$outputlangs->transnoentities("CommercialProposal"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -856,7 +856,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->fullname);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs));
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($propale->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($propale->ref)." ".$outputlangs->transnoentities("CommercialProposal"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -519,7 +519,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->fullname);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs));
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
|
||||
$this->franchise=!$mysoc->tva_assuj;
|
||||
|
||||
|
||||
// Recupere emmetteur
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
|
||||
|
|
@ -180,7 +180,7 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($propale->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($propale->ref)." ".$outputlangs->transnoentities("CommercialProposal"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
@ -293,21 +293,21 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$tvaligne=$propale->lignes[$i]->total_tva;
|
||||
$localtax1ligne=$propale->lignes[$i]->total_localtax1;
|
||||
$localtax2ligne=$propale->lignes[$i]->total_localtax2;
|
||||
|
||||
|
||||
if ($propale->remise_percent) $tvaligne-=($tvaligne*$propale->remise_percent)/100;
|
||||
if ($propale->remise_percent) $localtax1ligne-=($localtax1ligne*$propale->remise_percent)/100;
|
||||
if ($propale->remise_percent) $localtax2ligne-=($localtax2ligne*$propale->remise_percent)/100;
|
||||
|
||||
|
||||
$vatrate=(string) $propale->lignes[$i]->tva_tx;
|
||||
$localtax1rate=(string) $propale->lignes[$i]->localtax1_tx;
|
||||
$localtax2rate=(string) $propale->lignes[$i]->localtax2_tx;
|
||||
|
||||
|
||||
if (($propale->lignes[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
|
||||
|
||||
$this->tva[$vatrate] += $tvaligne;
|
||||
$this->localtax1[$localtax1rate]+=$localtax1ligne;
|
||||
$this->localtax2[$localtax2rate]+=$localtax2ligne;
|
||||
|
||||
|
||||
$nexY+=2; // Passe espace entre les lignes
|
||||
|
||||
// Cherche nombre de lignes a venir pour savoir si place suffisante
|
||||
|
|
@ -622,7 +622,7 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -644,7 +644,7 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
|
||||
// Total LocalTax2
|
||||
if ($conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
|
|
@ -663,10 +663,10 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -676,22 +676,22 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT1ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Local tax 2
|
||||
foreach( $this->localtax2 as $tvakey => $tvaval )
|
||||
{
|
||||
if ($tvakey>0) // On affiche pas taux 0
|
||||
{
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
|
|
@ -701,12 +701,12 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
$totalvat =$outputlangs->transnoentities("TotalLT2ES").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -945,7 +945,7 @@ class pdf_propale_roig extends ModelePDFPropales
|
|||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_user($arrayidcontact[0]);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->fullname);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs));
|
||||
}
|
||||
|
||||
$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class pdf_paiement
|
|||
$pdf->SetTitle($outputlangs->transnoentities("Payments"));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Payments"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
//$pdf->SetKeyWords();
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$pdf->SetTitle($outputlangs->convToOutputCharset($com->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("Order"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($com->ref)." ".$outputlangs->transnoentities("Order"));
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ class InterfaceActionsAuto
|
|||
$object->actiontypecode='AC_OTH';
|
||||
$object->actionmsg2=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$object->actionmsg=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ class InterfaceActionsAuto
|
|||
$object->actiontypecode='AC_OTH';
|
||||
$object->actionmsg2=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$object->actionmsg=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day');
|
||||
|
|
@ -441,7 +441,7 @@ class InterfaceActionsAuto
|
|||
$object->actiontypecode='AC_OTH';
|
||||
$object->actionmsg2=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$object->actionmsg=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
|
||||
|
|
@ -459,7 +459,7 @@ class InterfaceActionsAuto
|
|||
$object->actiontypecode='AC_OTH';
|
||||
$object->actionmsg2=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$object->actionmsg=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class InterfaceNotification
|
|||
$filepdf = $conf->fournisseur->dir_output . '/commande/' . $ref . '/' . $ref . '.pdf';
|
||||
if (! file_exists($filepdf)) $filepdf='';
|
||||
$mesg = $langs->transnoentitiesnoconv("Hello").",\n\n";
|
||||
$mesg.= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy",$object->ref,$user->fullname);
|
||||
$mesg.= $langs->transnoentitiesnoconv("EMailTextOrderApprovedBy",$object->ref,$user->getFullName($langs));
|
||||
$mesg.= "\n\n".$langs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
|
||||
$notify = new Notify($this->db);
|
||||
|
|
@ -188,7 +188,7 @@ class InterfaceNotification
|
|||
$filepdf = $conf->fournisseur->dir_output . '/commande/' . $ref . '/' . $ref . '.pdf';
|
||||
if (! file_exists($filepdf)) $filepdf='';
|
||||
$mesg = $langs->transnoentitiesnoconv("Hello").",\n\n";
|
||||
$mesg.= $langs->transnoentitiesnoconv("EMailTextOrderRefusedBy",$object->ref,$user->fullname);
|
||||
$mesg.= $langs->transnoentitiesnoconv("EMailTextOrderRefusedBy",$object->ref,$user->getFullName($langs));
|
||||
$mesg.= "\n\n".$langs->transnoentitiesnoconv("Sincerely").".\n\n";
|
||||
|
||||
$notify = new Notify($this->db);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ if (file_exists(DOL_DOCUMENT_ROOT.'/logo.png'))
|
|||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Informations").'</td></tr>';
|
||||
print '<tr '.$bc[false].'>';
|
||||
$userstring=$user->fullname;
|
||||
$userstring=$user->getFullName($langs);
|
||||
print '<td nowrap>'.$langs->trans("User").'</td><td>'.$userstring.'</td></tr>';
|
||||
print '<tr '.$bc[true].'>';
|
||||
print '<td nowrap>'.$langs->trans("PreviousConnexion").'</td><td>';
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ if ($_GET["action"] == 'create')
|
|||
print '</td>';
|
||||
}
|
||||
|
||||
print "<td>".$langs->trans("Author")."</td><td>$author->fullname</td>\n";
|
||||
print "<td>".$langs->trans("Author")."</td><td>".$author->getFullName($langs)."</td>\n";
|
||||
|
||||
if ($commande->note)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -945,7 +945,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
|||
$logintext.=$menutop->atarget?(' target="'.$menutop->atarget.'"'):'';
|
||||
$logintext.='>'.$user->login.'</a>';
|
||||
$loginhtmltext.='<u>'.$langs->trans("User").'</u>';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->fullname;
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->getFullName($langs);
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin);
|
||||
$type=($user->societe_id?$langs->trans("External"):$langs->trans("Internal"));
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class InterfacePhenixsynchro
|
|||
$langs->load("other");
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
if ($object->type_id == 5 && $object->contact->fullname)
|
||||
if ($object->type_id == 5 && $object->contact->getFullName($langs))
|
||||
{
|
||||
$libellecal =$langs->transnoentities("TaskRDVWith",$object->contact->getFullName($langs))."\n";
|
||||
$libellecal.=$object->note;
|
||||
|
|
@ -296,7 +296,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -324,7 +324,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||
$this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day');
|
||||
|
|
@ -340,7 +340,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -354,7 +354,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ class InterfacePhenixsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ if ($_REQUEST["amount"] == 'membersubscription')
|
|||
|
||||
$amount=$subscription->total_ttc;
|
||||
|
||||
$newtag='MID='.$member->id.'.M='.strtr($member->fullname,"-"," ");
|
||||
$newtag='MID='.$member->id.'.M='.strtr($member->getFullName($langs),"-"," ");
|
||||
if (! empty($_REQUEST["tag"])) { $tag=$_REQUEST["tag"]; $newtag.='.TAG='.$_REQUEST["tag"]; }
|
||||
$newtag=dol_string_unaccent($newtag);
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ if ($_REQUEST["amount"] == 'membersubscription')
|
|||
// Debitor
|
||||
$var=!$var;
|
||||
print '<tr><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Member");
|
||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><b>'.$member->fullname.'</b>';
|
||||
print '</td><td class="CTableRow'.($var?'1':'2').'"><b>'.$member->getFullName($langs).'</b>';
|
||||
|
||||
// Object
|
||||
$var=!$var;
|
||||
|
|
|
|||
|
|
@ -1449,7 +1449,7 @@ else
|
|||
$result=$adh->fetch('','',$soc->id);
|
||||
if ($result > 0)
|
||||
{
|
||||
$adh->ref=$adh->fullname;
|
||||
$adh->ref=$adh->getFullName($langs);
|
||||
print $adh->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ class User extends CommonObject
|
|||
$this->nom = $obj->name;
|
||||
$this->prenom = $obj->firstname;
|
||||
|
||||
$this->fullname = trim($this->prenom . ' ' . $this->nom);
|
||||
$this->login = $obj->login;
|
||||
$this->pass_indatabase = $obj->pass;
|
||||
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
||||
|
|
@ -973,7 +972,6 @@ class User extends CommonObject
|
|||
// Clean parameters
|
||||
$this->nom = trim($this->nom);
|
||||
$this->prenom = trim($this->prenom);
|
||||
$this->fullname = $this->prenom." ".$this->nom;
|
||||
$this->login = trim($this->login);
|
||||
$this->pass = trim($this->pass);
|
||||
$this->office_phone = trim($this->office_phone);
|
||||
|
|
@ -1325,7 +1323,7 @@ class User extends CommonObject
|
|||
$url = "http://".$_SERVER["HTTP_HOST"].DOL_URL_ROOT;
|
||||
$mesg.= 'Click here to go to Dolibarr: '.$url."\n\n";
|
||||
$mesg.= "--\n";
|
||||
$mesg.= $user->fullname; // Username that make then sending
|
||||
$mesg.= $user->getFullName($langs); // Username that make then sending
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1464,10 +1462,11 @@ class User extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||
* \param withpicto Inclut le picto dans le lien
|
||||
* \param option Sur quoi pointe le lien
|
||||
* \return string Chaine avec URL
|
||||
* \brief Return a link to the user card (with optionnaly the picto)
|
||||
* \param withpicto Include picto in link
|
||||
* \param option On what the link point to
|
||||
* \return string String with URL
|
||||
* \remarks Use this->id,this->nom, this->prenom
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='')
|
||||
{
|
||||
|
|
@ -1485,7 +1484,7 @@ class User extends CommonObject
|
|||
}
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowUser"),'user').$lienfin.' ');
|
||||
$result.=$lien.$this->nom.' '.$this->prenom.$lienfin;
|
||||
$result.=$lien.$this->getFullName($langs).$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
@ -1515,6 +1514,44 @@ class User extends CommonObject
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return full name (civility+' '+name+' '+lastname)
|
||||
* \param langs Language object for translation of civility
|
||||
* \param option 0=No option, 1=Add civility
|
||||
* \param nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname
|
||||
* \return string String with full name
|
||||
*/
|
||||
function getFullName($langs,$option=0,$nameorder=-1)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$ret='';
|
||||
if ($option && $this->civilite_id)
|
||||
{
|
||||
if ($langs->transnoentitiesnoconv("Civility".$this->civilite_id)!="Civility".$this->civilite_id) $ret.=$langs->transnoentitiesnoconv("Civility".$this->civilite_id).' ';
|
||||
else $ret.=$this->civilite_id.' ';
|
||||
}
|
||||
|
||||
// If order not defined, we use the setup
|
||||
if ($nameorder < 0) $nameorder=(! $conf->global->MAIN_FIRSTNAME_NAME_POSITION);
|
||||
|
||||
if ($nameorder)
|
||||
{
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->nom) $ret.=$this->nom;
|
||||
if ($this->prenom && $this->nom) $ret.=' ';
|
||||
if ($this->prenom) $ret.=$this->prenom;
|
||||
}
|
||||
|
||||
return trim($ret);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libelle du statut d'un user (actif, inactif)
|
||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
|
||||
|
|
@ -1607,8 +1644,10 @@ class User extends CommonObject
|
|||
// Object classes
|
||||
$info["objectclass"]=explode(',',$conf->global->LDAP_USER_OBJECT_CLASS);
|
||||
|
||||
$this->fullname=$this->getFullName($langs);
|
||||
|
||||
// Champs
|
||||
if ($this->fullname && $conf->global->LDAP_FIELD_FULLNAME) $info[$conf->global->LDAP_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->fullname && $conf->global->LDAP_FIELD_FULLNAME) $info[$conf->global->LDAP_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->nom && $conf->global->LDAP_FIELD_NAME) $info[$conf->global->LDAP_FIELD_NAME] = $this->nom;
|
||||
if ($this->prenom && $conf->global->LDAP_FIELD_FIRSTNAME) $info[$conf->global->LDAP_FIELD_FIRSTNAME] = $this->prenom;
|
||||
if ($this->login && $conf->global->LDAP_FIELD_LOGIN) $info[$conf->global->LDAP_FIELD_LOGIN] = $this->login;
|
||||
|
|
@ -1677,7 +1716,6 @@ class User extends CommonObject
|
|||
|
||||
$this->nom='DOLIBARR';
|
||||
$this->prenom='SPECIMEN';
|
||||
$this->fullname=trim($this->prenom.' '.$this->nom);
|
||||
$this->note='This is a note';
|
||||
$this->email='email@specimen.com';
|
||||
$this->office_phone='0999999999';
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class InterfaceWebcalsynchro
|
|||
$langs->load("other");
|
||||
|
||||
// Initialisation donnees (date,duree,texte,desc)
|
||||
if ($object->type_id == 5 && $object->contact->fullname)
|
||||
if ($object->type_id == 5 && $object->contact->getFullName($langs))
|
||||
{
|
||||
$libellecal =$langs->transnoentities("TaskRDVWith",$object->contact->getFullName($langs))."\n";
|
||||
$libellecal.=$object->note;
|
||||
|
|
@ -273,7 +273,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -287,7 +287,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -301,7 +301,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
|
||||
$this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day');
|
||||
|
|
@ -317,7 +317,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -331,7 +331,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
@ -345,7 +345,7 @@ class InterfaceWebcalsynchro
|
|||
$this->duree=0;
|
||||
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
|
||||
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->getFullName($langs);
|
||||
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
|
||||
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ if ($resql)
|
|||
exit;
|
||||
}
|
||||
|
||||
print $langs->transnoentities("UpdateMember")." rowid=".$member->id." ".$member->fullname;
|
||||
print $langs->transnoentities("UpdateMember")." rowid=".$member->id." ".$member->getFullName($langs);
|
||||
|
||||
$oldobject=$member;
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ if ($result >= 0)
|
|||
// Propriete membre
|
||||
$member->prenom=$ldapuser[$conf->global->LDAP_FIELD_FIRSTNAME];
|
||||
$member->nom=$ldapuser[$conf->global->LDAP_FIELD_NAME];
|
||||
$member->fullname=($ldapuser[$conf->global->LDAP_FIELD_FULLNAME] ? $ldapuser[$conf->global->LDAP_FIELD_FULLNAME] : trim($member->prenom." ".$member->nom));
|
||||
$member->login=$ldapuser[$conf->global->LDAP_FIELD_LOGIN];
|
||||
$member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD];
|
||||
|
||||
|
|
@ -221,7 +220,7 @@ if ($result >= 0)
|
|||
$member->typeid=$typeid;
|
||||
|
||||
// Creation membre
|
||||
print $langs->transnoentities("MemberCreate").' # '.$key.': login='.$member->login.', fullname='.$member->fullname;
|
||||
print $langs->transnoentities("MemberCreate").' # '.$key.': login='.$member->login.', fullname='.$member->getFullName($langs);
|
||||
print ', datec='.$member->datec;
|
||||
$member_id=$member->create($user);
|
||||
if ($member_id > 0)
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ if ($resql)
|
|||
$fuser = new User($db);
|
||||
$fuser->fetch($obj->rowid);
|
||||
|
||||
print $langs->trans("UpdateUser")." rowid=".$fuser->id." ".$fuser->fullname;
|
||||
print $langs->trans("UpdateUser")." rowid=".$fuser->id." ".$fuser->getFullName($langs);
|
||||
|
||||
$oldobject=$fuser;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user