NEW Option DOC_SHOW_FIRST_SALES_REP shows name of buyer or saler on PDF.
This commit is contained in:
parent
edbd92ee3e
commit
49258db58d
@ -1253,6 +1253,19 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R');
|
||||||
|
|
||||||
|
// Get contact
|
||||||
|
if (!empty($conf->global->DOC_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("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$posy+=2;
|
$posy+=2;
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
|
|||||||
@ -1557,6 +1557,19 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get contact
|
||||||
|
if (!empty($conf->global->DOC_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("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$posy+=1;
|
$posy+=1;
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
|
|||||||
@ -1453,6 +1453,19 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get contact
|
||||||
|
if (!empty($conf->global->DOC_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("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$posy+=2;
|
$posy+=2;
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
|
|||||||
@ -1105,7 +1105,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get contact
|
// Get contact
|
||||||
if (!empty($conf->global->SUPPLIER_ORDER_SHOW_FIRST_SALES_REP))
|
if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP))
|
||||||
{
|
{
|
||||||
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
|
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
|
||||||
if (count($arrayidcontact) > 0)
|
if (count($arrayidcontact) > 0)
|
||||||
|
|||||||
@ -1271,12 +1271,25 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierProposalDate")." : " . dol_print_date($object->date_livraison,"day",false,$outputlangs,true), '', 'R');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($object->thirdparty->code_client)
|
if ($object->thirdparty->code_fournisseur)
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=4;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get contact
|
||||||
|
if (!empty($conf->global->DOC_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+=2;
|
$posy+=2;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user