New: Add option MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE
This commit is contained in:
parent
699a079ed7
commit
1ebd56c4ee
@ -15,6 +15,7 @@ For users:
|
||||
- New: Improved Opensurvey module and added options to disable comments and disable
|
||||
public votes
|
||||
- New: The box "balance of bank accounts" show all opened accounts.
|
||||
- New: Add option MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE.
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
|
||||
@ -244,12 +244,24 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
// Affiche notes
|
||||
if (! empty($object->note_public))
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
{
|
||||
// Get first sale rep
|
||||
if (is_object($object->thirdparty))
|
||||
{
|
||||
$salereparray=$object->thirdparty->getSalesRepresentatives($user);
|
||||
$salerepobj=new User($this->db);
|
||||
$salerepobj->fetch($salereparray[0]['id']);
|
||||
if (! empty($salerepobj->signature)) $notetoshow=dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||
}
|
||||
}
|
||||
if ($notetoshow)
|
||||
{
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
|
||||
@ -244,12 +244,24 @@ class pdf_proforma extends ModelePDFCommandes
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
// Affiche notes
|
||||
if (! empty($object->note_public))
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
{
|
||||
// Get first sale rep
|
||||
if (is_object($object->thirdparty))
|
||||
{
|
||||
$salereparray=$object->thirdparty->getSalesRepresentatives($user);
|
||||
$salerepobj=new User($this->db);
|
||||
$salerepobj->fetch($salereparray[0]['id']);
|
||||
if (! empty($salerepobj->signature)) $notetoshow=dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||
}
|
||||
}
|
||||
if ($notetoshow)
|
||||
{
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
|
||||
@ -245,12 +245,24 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
// Affiche notes
|
||||
if (! empty($object->note_public))
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
{
|
||||
// Get first sale rep
|
||||
if (is_object($object->thirdparty))
|
||||
{
|
||||
$salereparray=$object->thirdparty->getSalesRepresentatives($user);
|
||||
$salerepobj=new User($this->db);
|
||||
$salerepobj->fetch($salereparray[0]['id']);
|
||||
if (! empty($salerepobj->signature)) $notetoshow=dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||
}
|
||||
}
|
||||
if ($notetoshow)
|
||||
{
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -270,12 +270,24 @@ class pdf_azur extends ModelePDFPropales
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
// Affiche notes
|
||||
if (! empty($object->note_public))
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
|
||||
{
|
||||
// Get first sale rep
|
||||
if (is_object($object->thirdparty))
|
||||
{
|
||||
$salereparray=$object->thirdparty->getSalesRepresentatives($user);
|
||||
$salerepobj=new User($this->db);
|
||||
$salerepobj->fetch($salereparray[0]['id']);
|
||||
if (! empty($salerepobj->signature)) $notetoshow=dol_concatdesc($notetoshow, $salerepobj->signature);
|
||||
}
|
||||
}
|
||||
if ($notetoshow)
|
||||
{
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
|
||||
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user