mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-05 16:42:53 +01:00
Clean code
This commit is contained in:
@@ -160,8 +160,6 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
$this->franchise=!$mysoc->tva_assuj;
|
||||
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (empty($this->emetteur->country_code)) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default, if was not defined
|
||||
@@ -678,13 +676,13 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
global $conf, $mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj))
|
||||
{
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
|
||||
@@ -160,8 +160,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
$this->franchise=!$mysoc->tva_assuj;
|
||||
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (empty($this->emetteur->country_code)) $this->emetteur->country_code=substr($langs->defaultlang, -2); // By default, if was not defined
|
||||
@@ -877,13 +875,13 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
*/
|
||||
protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && $this->franchise == 1)
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj))
|
||||
{
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
|
||||
Reference in New Issue
Block a user