Skip to content

Commit

Permalink
Merge pull request #8188 from atm-quentin/6.0_develop
Browse files Browse the repository at this point in the history
NEW Add sale representative einstein_pdf_modules
  • Loading branch information
eldy committed Feb 14, 2018
2 parents c28d872 + 144c139 commit 483bfb0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion htdocs/core/modules/commande/doc/pdf_einstein.modules.php
Expand Up @@ -1311,7 +1311,17 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="Order"
if ($showaddress)
{
// Sender properties
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
$carac_emetteur='';
// Add internal contact of proposal if defined
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
if (count($arrayidcontact) > 0)
{
$object->fetch_user($arrayidcontact[0]);
$labelbeforecontactname=($outputlangs->transnoentities("FromContactName")!='FromContactName'?$outputlangs->transnoentities("FromContactName"):$outputlangs->transnoentities("Name"));
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$labelbeforecontactname." ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
}

$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);

// Show sender
$posy=42+$top_shift;
Expand Down

0 comments on commit 483bfb0

Please sign in to comment.