Plugin Directory

Changeset 3148276


Ignore:
Timestamp:
09/08/2024 08:18:21 PM (19 months ago)
Author:
melioze
Message:

Fix quote pdf generator

Location:
my-easy-compta
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • my-easy-compta/tags/1.1.0/includes/Modules/PDFGenerator.php

    r3148192 r3148276  
    537537        }
    538538        if ($this->siret) {
    539             $html .= '<b>SIRET : </b>' . $this->siret . '<br>';
     539            $html .= '<b>' . __('SIRET n°', 'my-easy-compta') . ' : </b>' . $this->siret . '<br>';
    540540        }
    541541        if ($this->tax_number) {
     
    553553
    554554        if ($client->phone && $this->show_phone == 1) {
    555             $html .= '<b>' . __('Phone', 'my-easy-compta') . ' : </b>' . $this->company_phone . '<br>';
     555            $html .= '<b>' . __('Phone', 'my-easy-compta') . ' : </b>' . $client->phone . '<br>';
    556556        }
    557557        if ($client->email && $this->show_email == 1) {
     
    559559        }
    560560        if ($client->siren_number && $this->show_siren == 1) {
    561             $html .= '<b>SIREN : </b>' . $client->siren_number . '<br>';
     561            $html .= '<b>' . __('SIREN n°', 'my-easy-compta') . ' : </b>' . $client->siren_number . '<br>';
    562562        }
    563563        if ($client->tax_number && $this->show_tax_number == 1) {
     
    568568        $tva_totaux = [];
    569569        foreach ($items as $item) {
    570             $discount_percentage = intval($encrypt->decrypt($item->discount));
    571             if ($discount_percentage > 0) {
    572                 $discount_exist = true;
     570            if ($type == 'invoice' || $type == 'credit_invoice') {
     571                $discount_percentage = intval($encrypt->decrypt($item->discount));
     572                if ($discount_percentage > 0) {
     573                    $discount_exist = true;
     574                }
     575            } else {
     576                $discount_percentage = intval($item->discount);
     577                if ($discount_percentage > 0) {
     578                    $discount_exist = true;
     579                }
    573580            }
    574581        }
  • my-easy-compta/trunk/includes/Modules/PDFGenerator.php

    r3148192 r3148276  
    537537        }
    538538        if ($this->siret) {
    539             $html .= '<b>SIRET : </b>' . $this->siret . '<br>';
     539            $html .= '<b>' . __('SIRET n°', 'my-easy-compta') . ' : </b>' . $this->siret . '<br>';
    540540        }
    541541        if ($this->tax_number) {
     
    553553
    554554        if ($client->phone && $this->show_phone == 1) {
    555             $html .= '<b>' . __('Phone', 'my-easy-compta') . ' : </b>' . $this->company_phone . '<br>';
     555            $html .= '<b>' . __('Phone', 'my-easy-compta') . ' : </b>' . $client->phone . '<br>';
    556556        }
    557557        if ($client->email && $this->show_email == 1) {
     
    559559        }
    560560        if ($client->siren_number && $this->show_siren == 1) {
    561             $html .= '<b>SIREN : </b>' . $client->siren_number . '<br>';
     561            $html .= '<b>' . __('SIREN n°', 'my-easy-compta') . ' : </b>' . $client->siren_number . '<br>';
    562562        }
    563563        if ($client->tax_number && $this->show_tax_number == 1) {
     
    568568        $tva_totaux = [];
    569569        foreach ($items as $item) {
    570             $discount_percentage = intval($encrypt->decrypt($item->discount));
    571             if ($discount_percentage > 0) {
    572                 $discount_exist = true;
     570            if ($type == 'invoice' || $type == 'credit_invoice') {
     571                $discount_percentage = intval($encrypt->decrypt($item->discount));
     572                if ($discount_percentage > 0) {
     573                    $discount_exist = true;
     574                }
     575            } else {
     576                $discount_percentage = intval($item->discount);
     577                if ($discount_percentage > 0) {
     578                    $discount_exist = true;
     579                }
    573580            }
    574581        }
Note: See TracChangeset for help on using the changeset viewer.