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;
|
||||
|
||||
@ -378,7 +390,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100;
|
||||
|
||||
$vatrate=(string) $object->lines[$i]->tva_tx;
|
||||
|
||||
|
||||
// Retrieve type from database for backward compatibility with old records
|
||||
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
|
||||
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
|
||||
|
||||
@ -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>
|
||||
@ -153,7 +153,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$outputlangs->load("products");
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
|
||||
// Loop on each lines to detect if there is at least one image to show
|
||||
$realpatharray=array();
|
||||
if (! empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE))
|
||||
@ -161,7 +161,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
{
|
||||
if (empty($object->lines[$i]->fk_product)) continue;
|
||||
|
||||
|
||||
$objphoto = new Product($this->db);
|
||||
$objphoto->fetch($object->lines[$i]->fk_product);
|
||||
|
||||
@ -185,7 +185,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
if ($conf->propal->dir_output)
|
||||
{
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
|
||||
// $deja_regle = 0;
|
||||
|
||||
// Definition of $dir and $file
|
||||
@ -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