2
0
forked from Wavyzz/dolibarr

Fixed [ bug #1642 ]: add a free line in contract

This commit is contained in:
Marcos García de La Fuente
2014-11-23 13:14:54 +01:00
parent 2a56a19b7d
commit 9f73277ef2
2 changed files with 21 additions and 9 deletions

View File

@@ -53,6 +53,18 @@ class pdf_strato extends ModelePDFContract
var $marge_haute;
var $marge_basse;
/**
* Issuer
* @var Societe
*/
public $emetteur;
/**
* Recipient
* @var Societe
*/
public $recipient;
/**
* Constructor
*
@@ -581,17 +593,17 @@ class pdf_strato extends ModelePDFContract
$result=$object->fetch_contact($arrayidcontact[0]);
}
$this->recipient = $object->client;
// Recipient name
if (! empty($usecontact))
{
if (! empty($usecontact)) {
// On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
else $socname = $object->client->name;
$this->recipient->name=$outputlangs->convToOutputCharset($socname);
$this->recipient->name = $outputlangs->convToOutputCharset($socname);
}
else
{
$this->recipient->name=$outputlangs->convToOutputCharset($object->client->name);
else {
$this->recipient->name = $outputlangs->convToOutputCharset($object->client->name);
}
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');