mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 10:08:27 +01:00
Fixed [ bug #1642 ]: add a free line in contract
This commit is contained in:
@@ -536,10 +536,10 @@ else if ($action == 'addline' && $user->rights->contrat->creer)
|
|||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
$model=$object->modelpdf;
|
|
||||||
if (empty($model)) { $tmp=getListOfModels($db, 'contract'); $keys=array_keys($tmp); $model=$keys[0]; }
|
|
||||||
$ret = $object->fetch($id); // Reload to get new records
|
$ret = $object->fetch($id); // Reload to get new records
|
||||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
|
$object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($_POST ['prod_entry_mode']);
|
unset($_POST ['prod_entry_mode']);
|
||||||
|
|||||||
@@ -53,6 +53,18 @@ class pdf_strato extends ModelePDFContract
|
|||||||
var $marge_haute;
|
var $marge_haute;
|
||||||
var $marge_basse;
|
var $marge_basse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuer
|
||||||
|
* @var Societe
|
||||||
|
*/
|
||||||
|
public $emetteur;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recipient
|
||||||
|
* @var Societe
|
||||||
|
*/
|
||||||
|
public $recipient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@@ -581,17 +593,17 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->recipient = $object->client;
|
||||||
|
|
||||||
// Recipient name
|
// Recipient name
|
||||||
if (! empty($usecontact))
|
if (! empty($usecontact)) {
|
||||||
{
|
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||||
else $socname = $object->client->name;
|
else $socname = $object->client->name;
|
||||||
$this->recipient->name=$outputlangs->convToOutputCharset($socname);
|
$this->recipient->name = $outputlangs->convToOutputCharset($socname);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
$this->recipient->name = $outputlangs->convToOutputCharset($object->client->name);
|
||||||
$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');
|
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');
|
||||||
|
|||||||
Reference in New Issue
Block a user