NEW Option SUPPLIER_ORDER_SHOW_FIRST_SALES_REP shows name of buyer on PO

This commit is contained in:
Laurent Destailleur 2016-08-01 11:16:22 +02:00
parent 79222c732d
commit edbd92ee3e
2 changed files with 14 additions and 0 deletions

View File

@ -1104,6 +1104,19 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
}
// Get contact
if (!empty($conf->global->SUPPLIER_ORDER_SHOW_FIRST_SALES_REP))
{
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
if (count($arrayidcontact) > 0)
{
$usertmp=new User($this->db);
$usertmp->fetch($arrayidcontact[0]);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(190, 3, $langs->trans("BuyerName")." : ".$usertmp->getFullName($langs), '', 'R');
}
}
$posy+=1;
$pdf->SetTextColor(0,0,60);

View File

@ -41,3 +41,4 @@ SupplierReputation=Supplier reputation
DoNotOrderThisProductToThisSupplier=Do not order
NotTheGoodQualitySupplier=Wrong quality
ReputationForThisProduct=Reputation
BuyerName=Buyer name