Merge remote-tracking branch 'upstream/develop' into develop

This commit is contained in:
Philippe GRAND 2019-06-30 12:04:55 +02:00
commit 6d625d7d1e
67 changed files with 281 additions and 261 deletions

View File

@ -367,7 +367,6 @@ if ($nboftargetok) {
{ {
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; #print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
} }
print "\n"; print "\n";
if (! $ret) if (! $ret)
@ -382,11 +381,15 @@ if ($nboftargetok) {
} }
} }
} }
# Build xml check file # Build xml check file
#----------------------- #-----------------------
if ($CHOOSEDTARGET{'-CHKSUM'}) if ($CHOOSEDTARGET{'-CHKSUM'})
{ {
print "Go to directory $SOURCE\n";
$olddir=getcwd();
chdir("$SOURCE");
$ret=`git ls-files . --exclude-standard --others`; $ret=`git ls-files . --exclude-standard --others`;
if ($ret) if ($ret)
{ {

View File

@ -169,7 +169,7 @@ if ($action == 'delete')
if ($action == 'switch') if ($action == 'switch')
{ {
// On permute les valeur du champ box_order des 2 lignes de la table boxes // We switch values of field box_order for the 2 lines of table boxes
$db->begin(); $db->begin();
$objfrom=new ModeleBoxes($db); $objfrom=new ModeleBoxes($db);

View File

@ -183,9 +183,9 @@ class BOM extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }
@ -1084,9 +1084,9 @@ class BOMLine extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }

View File

@ -44,7 +44,7 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO
// View parameters // View parameters
$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes $conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Number max of lines to show in lists
$conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes $conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes
// Add hidden option to force decrease of stock whatever is user setup // Add hidden option to force decrease of stock whatever is user setup

View File

@ -415,7 +415,7 @@ class Propal extends CommonObject
* @param float $remise_percent Pourcentage de remise de la ligne * @param float $remise_percent Pourcentage de remise de la ligne
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param float $pu_ttc Prix unitaire TTC * @param float $pu_ttc Prix unitaire TTC
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits for type of lines
* @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used.
* @param int $rang Position of line * @param int $rang Position of line
* @param int $special_code Special code (also used by externals modules!) * @param int $special_code Special code (also used by externals modules!)
@ -1715,7 +1715,7 @@ class Propal extends CommonObject
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$line->fetch_optionals(); $line->fetch_optionals();
// multilangs // multilangs
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
$line = new Product($this->db); $line = new Product($this->db);

View File

@ -734,7 +734,7 @@ if ($socid > 0)
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
} }
// Remises liees a lignes de factures // Discount linked to invoice lines
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; $sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
$sql.= " rc.fk_facture_source,"; $sql.= " rc.fk_facture_source,";
@ -904,7 +904,7 @@ if ($socid > 0)
print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); print load_fiche_titre($langs->trans("SupplierDiscounts"), '', '');
} }
// Remises liees a lignes de factures // Discount linked to invoice lines
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,"; $sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
$sql.= " rc.fk_invoice_supplier_source,"; $sql.= " rc.fk_invoice_supplier_source,";

View File

@ -1312,7 +1312,7 @@ class Commande extends CommonOrder
* @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
* @param int $fk_product Id of product * @param int $fk_product Id of product
* @param float $remise_percent Percentage discount of the line * @param float $remise_percent Percentage discount of the line
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $fk_remise_except Id remise * @param int $fk_remise_except Id remise
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param float $pu_ttc Prix unitaire TTC * @param float $pu_ttc Prix unitaire TTC
@ -1985,7 +1985,7 @@ class Commande extends CommonOrder
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$line->fetch_optionals(); $line->fetch_optionals();
// multilangs // multilangs
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
$line = new Product($this->db); $line = new Product($this->db);

View File

@ -510,7 +510,7 @@ class FactureRec extends CommonInvoice
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Recupere les lignes de factures predefinies dans this->lines * Get lines of template invoices into this->lines
* *
* @return int 1 if OK, < 0 if KO * @return int 1 if OK, < 0 if KO
*/ */
@ -876,7 +876,7 @@ class FactureRec extends CommonInvoice
* @param int $fk_product Product/Service ID predefined * @param int $fk_product Product/Service ID predefined
* @param double $remise_percent Percentage discount of the line * @param double $remise_percent Percentage discount of the line
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $fk_remise_except Id remise * @param int $fk_remise_except Id remise
* @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note) * @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
@ -1807,7 +1807,7 @@ class FactureLigneRec extends CommonInvoiceLine
/** /**
* Recupere les lignes de factures predefinies dans this->lines * Get line of template invoice
* *
* @param int $rowid Id of invoice * @param int $rowid Id of invoice
* @return int 1 if OK, < 0 if KO * @return int 1 if OK, < 0 if KO

View File

@ -917,7 +917,7 @@ class Facture extends CommonInvoice
$facture->origin = $this->origin; $facture->origin = $this->origin;
$facture->origin_id = $this->origin_id; $facture->origin_id = $this->origin_id;
$facture->lines = $this->lines; // Tableau des lignes de factures $facture->lines = $this->lines; // Array of lines of invoice
$facture->products = $this->lines; // Tant que products encore utilise $facture->products = $this->lines; // Tant que products encore utilise
$facture->situation_counter = $this->situation_counter; $facture->situation_counter = $this->situation_counter;
$facture->situation_cycle_ref=$this->situation_cycle_ref; $facture->situation_cycle_ref=$this->situation_cycle_ref;
@ -1563,7 +1563,7 @@ class Facture extends CommonInvoice
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$line->fetch_optionals(); $line->fetch_optionals();
// multilangs // multilangs
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
$line = new Product($this->db); $line = new Product($this->db);
@ -2661,7 +2661,7 @@ class Facture extends CommonInvoice
* @param int $date_start Date start of service * @param int $date_start Date start of service
* @param int $date_end Date end of service * @param int $date_end Date end of service
* @param int $ventil Code of dispatching into accountancy * @param int $ventil Code of dispatching into accountancy
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $fk_remise_except Id discount used * @param int $fk_remise_except Id discount used
* @param string $price_base_type 'HT' or 'TTC' * @param string $price_base_type 'HT' or 'TTC'
* @param double $pu_ttc Unit price with tax (> 0 even for credit note) * @param double $pu_ttc Unit price with tax (> 0 even for credit note)

View File

@ -156,7 +156,7 @@ $sql.= " AND pl.fk_prelevement_bons = p.rowid";
$sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND f.fk_soc = s.rowid";
$sql.= " AND pf.fk_facture = f.rowid"; $sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.entity IN (".getEntity('invoice').")"; $sql.= " AND f.entity IN (".getEntity('invoice').")";
if ($prev_id) $sql.= " AND p.rowid=".$prev_id; if ($object->id > 0) $sql.= " AND p.rowid=".$object->id;
if ($socid) $sql.= " AND s.rowid = ".$socid; if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= $db->order($sortfield, $sortorder); $sql.= $db->order($sortfield, $sortorder);

View File

@ -1096,8 +1096,6 @@ $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db); if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db);
$objectlignestatic=new ContratLigne($db);
// Load object modContract // Load object modContract
$module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_serpis'); $module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_serpis');
if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php')

View File

@ -832,7 +832,7 @@ class Contrat extends CommonObject
// Retreive all extrafields for contract // Retreive all extrafields for contract
// fetch optionals attributes and labels // fetch optionals attributes and labels
$line->fetch_optionals(); $line->fetch_optionals();
// multilangs // multilangs
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
$line = new Product($this->db); $line = new Product($this->db);
@ -1361,7 +1361,7 @@ class Contrat extends CommonObject
* @param int $date_end Date de fin prevue * @param int $date_end Date de fin prevue
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param float $pu_ttc Prix unitaire TTC * @param float $pu_ttc Prix unitaire TTC
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $fk_fournprice Fourn price id * @param int $fk_fournprice Fourn price id
* @param int $pa_ht Buying price HT * @param int $pa_ht Buying price HT
* @param array $array_options extrafields array * @param array $array_options extrafields array
@ -1579,7 +1579,7 @@ class Contrat extends CommonObject
* @param int|string $date_debut_reel Date de debut reelle * @param int|string $date_debut_reel Date de debut reelle
* @param int|string $date_fin_reel Date de fin reelle * @param int|string $date_fin_reel Date de fin reelle
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $fk_fournprice Fourn price id * @param int $fk_fournprice Fourn price id
* @param int $pa_ht Buying price HT * @param int $pa_ht Buying price HT
* @param array $array_options extrafields array * @param array $array_options extrafields array
@ -2542,7 +2542,7 @@ class Contrat extends CommonObject
/** /**
* Classe permettant la gestion des lignes de contrats * Class to manage lines of contracts
*/ */
class ContratLigne extends CommonObjectLine class ContratLigne extends CommonObjectLine
{ {

View File

@ -84,7 +84,7 @@ class box_services_contracts extends ModeleBoxes
if ($user->rights->service->lire && $user->rights->contrat->lire) if ($user->rights->service->lire && $user->rights->contrat->lire)
{ {
$contractstatic=new Contrat($db); $contractstatic=new Contrat($db);
$contratlignestatic=new ContratLigne($db); $contractlinestatic=new ContratLigne($db);
$thirdpartytmp = new Societe($db); $thirdpartytmp = new Societe($db);
$productstatic = new Product($db); $productstatic = new Product($db);
@ -116,13 +116,13 @@ class box_services_contracts extends ModeleBoxes
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
$datem=$db->jdate($objp->datem); $datem=$db->jdate($objp->datem);
$contratlignestatic->id=$objp->cdid; $contractlinestatic->id=$objp->cdid;
$contratlignestatic->fk_contrat=$objp->rowid; $contractlinestatic->fk_contrat=$objp->rowid;
$contratlignestatic->label=$objp->label; $contractlinestatic->label=$objp->label;
$contratlignestatic->description=$objp->description; $contractlinestatic->description=$objp->description;
$contratlignestatic->type=$objp->type; $contractlinestatic->type=$objp->type;
$contratlignestatic->product_id=$objp->product_id; $contractlinestatic->product_id=$objp->product_id;
$contratlignestatic->product_ref=$objp->product_ref; $contractlinestatic->product_ref=$objp->product_ref;
$contractstatic->statut=$objp->contract_status; $contractstatic->statut=$objp->contract_status;
$contractstatic->id=$objp->rowid; $contractstatic->id=$objp->rowid;
@ -153,7 +153,7 @@ class box_services_contracts extends ModeleBoxes
if ($resultd) if ($resultd)
{ {
$objtp = $db->fetch_object($resultd); $objtp = $db->fetch_object($resultd);
if ($objtp->label != '') $contratlignestatic->label = $objtp->label; if ($objtp->label != '') $contractlinestatic->label = $objtp->label;
} }
} }
@ -215,7 +215,7 @@ class box_services_contracts extends ModeleBoxes
$this->info_box_contents[$i][] = array( $this->info_box_contents[$i][] = array(
'td' => 'class="right" width="18"', 'td' => 'class="right" width="18"',
'text' => $contratlignestatic->LibStatut($objp->statut, 3) 'text' => $contractlinestatic->LibStatut($objp->statut, 3)
); );
$i++; $i++;

View File

@ -286,8 +286,7 @@ class CMailFile
// We now define $this->headers and $this->message // We now define $this->headers and $this->message
$this->headers = $smtp_headers . $mime_headers; $this->headers = $smtp_headers . $mime_headers;
// On nettoie le header pour qu'il ne se termine pas par un retour chariot. // On nettoie le header pour qu'il ne se termine pas par un retour chariot.
// Ceci evite aussi les lignes vides en fin qui peuvent etre interpretees // This avoid also empty lines at end that can be interpreted as mail injection by email servers.
// comme des injections mail par les serveurs de messagerie.
$this->headers = preg_replace("/([\r\n]+)$/i", "", $this->headers); $this->headers = preg_replace("/([\r\n]+)$/i", "", $this->headers);
//$this->message = $this->eol.'This is a message with multiple parts in MIME format.'.$this->eol; //$this->message = $this->eol.'This is a message with multiple parts in MIME format.'.$this->eol;

View File

@ -101,11 +101,11 @@ interface Database
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Return the number of lines in the result of a request INSERT, DELETE or UPDATE
* *
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return int Nombre de lignes * @return int Number of lines
* @see num_rows * @see num_rows()
*/ */
public function affected_rows($resultset); public function affected_rows($resultset);
// phpcs:enable // phpcs:enable

View File

@ -523,10 +523,10 @@ class DoliDBMssql extends DoliDB
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Return the number of lines in the result of a request INSERT, DELETE or UPDATE
* *
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return int Nombre de lignes * @return int Number of lines
* @see num_rows() * @see num_rows()
*/ */
public function affected_rows($resultset) public function affected_rows($resultset)

View File

@ -363,10 +363,10 @@ class DoliDBMysqli extends DoliDB
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Return the number of lines in the result of a request INSERT, DELETE or UPDATE
* *
* @param mysqli_result $resultset Curseur de la requete voulue * @param mysqli_result $resultset Curseur de la requete voulue
* @return int Nombre de lignes * @return int Number of lines
* @see num_rows() * @see num_rows()
*/ */
public function affected_rows($resultset) public function affected_rows($resultset)

View File

@ -617,11 +617,11 @@ class DoliDBPgsql extends DoliDB
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Return the number of lines in the result of a request INSERT, DELETE or UPDATE
* *
* @param resource $resultset Result set of request * @param resource $resultset Result set of request
* @return int Nb of lines * @return int Nb of lines
* @see num_rows * @see num_rows()
*/ */
public function affected_rows($resultset) public function affected_rows($resultset)
{ {

View File

@ -1435,16 +1435,16 @@ function dol_meta_create($object)
if (is_dir($dir)) if (is_dir($dir))
{ {
$nblignes = count($object->lines); $nblines = count($object->lines);
$client = $object->thirdparty->name . " " . $object->thirdparty->address . " " . $object->thirdparty->zip . " " . $object->thirdparty->town; $client = $object->thirdparty->name . " " . $object->thirdparty->address . " " . $object->thirdparty->zip . " " . $object->thirdparty->town;
$meta = "REFERENCE=\"" . $object->ref . "\" $meta = "REFERENCE=\"" . $object->ref . "\"
DATE=\"" . dol_print_date($object->date, '') . "\" DATE=\"" . dol_print_date($object->date, '') . "\"
NB_ITEMS=\"" . $nblignes . "\" NB_ITEMS=\"" . $nblines . "\"
CLIENT=\"" . $client . "\" CLIENT=\"" . $client . "\"
AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\" AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\"
AMOUNT=\"" . $object->total_ttc . "\"\n"; AMOUNT=\"" . $object->total_ttc . "\"\n";
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
//Pour les articles //Pour les articles
$meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\" $meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\"

View File

@ -2045,10 +2045,10 @@ function pdf_getTotalQty($object, $type, $outputlangs)
global $hookmanager; global $hookmanager;
$total=0; $total=0;
$nblignes=count($object->lines); $nblines=count($object->lines);
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->special_code != 3) if ($object->lines[$i]->special_code != 3)
{ {

View File

@ -111,7 +111,7 @@ class pdf_ban extends ModeleBankAccountDoc
if ($conf->bank->dir_output) if ($conf->bank->dir_output)
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblines = count($object->lines); // This is set later with array of tasks
// Definition of $dir and $file // Definition of $dir and $file
if ($object->specimen) if ($object->specimen)
@ -275,6 +275,7 @@ class pdf_ban extends ModeleBankAccountDoc
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show table for lines * Show table for lines
* *
@ -287,13 +288,15 @@ class pdf_ban extends ModeleBankAccountDoc
* @param int $hidebottom Hide bottom bar of array * @param int $hidebottom Hide bottom bar of array
* @return void * @return void
*/ */
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
{ {
// phpcs:enable
global $conf,$mysoc; global $conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show top header of page. * Show top header of page.
* *
@ -303,9 +306,10 @@ class pdf_ban extends ModeleBankAccountDoc
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return void
*/ */
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $langs,$conf,$mysoc; global $langs,$conf,$mysoc;
// phpcs:enable
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -380,6 +384,7 @@ class pdf_ban extends ModeleBankAccountDoc
*/ */
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show footer of page. Need this->emetteur object * Show footer of page. Need this->emetteur object
* *
@ -389,9 +394,11 @@ class pdf_ban extends ModeleBankAccountDoc
* @param int $hidefreetext 1=Hide free text * @param int $hidefreetext 1=Hide free text
* @return integer * @return integer
*/ */
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{ {
// phpcs:enable
global $conf; global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
//return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); //return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
} }

View File

@ -114,7 +114,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
if (! empty($conf->bank->dir_output)) if (! empty($conf->bank->dir_output))
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblines = count($object->lines); // This is set later with array of tasks
// Definition of $dir and $file // Definition of $dir and $file
if ($object->specimen) if ($object->specimen)
@ -418,6 +418,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show table for lines * Show table for lines
* *
@ -430,15 +431,17 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param int $hidebottom Hide bottom bar of array * @param int $hidebottom Hide bottom bar of array
* @return void * @return void
*/ */
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
{ {
// phpcs:enable
global $conf,$mysoc; global $conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Show miscellaneous information (payment mode, payment term, ...) * Show miscellaneous information (payment mode, payment term, ...)
* *
@ -448,7 +451,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Langs object * @param Translate $outputlangs Langs object
* @return void * @return void
*/ */
private function _tableau_info(&$pdf, $object, $posy, $outputlangs) protected function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{ {
// phpcs:enable // phpcs:enable
global $conf, $mysoc; global $conf, $mysoc;
@ -475,7 +478,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Show area for the customer to sign * Show area for the customer to sign
* *
@ -485,7 +489,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Objet langs * @param Translate $outputlangs Objet langs
* @return int Position pour suite * @return int Position pour suite
*/ */
private function _signature_area(&$pdf, $object, $posy, $outputlangs) protected function _signature_area(&$pdf, $object, $posy, $outputlangs)
{ {
// phpcs:enable // phpcs:enable
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -517,6 +521,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show top header of page. * Show top header of page.
* *
@ -526,8 +531,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return void
*/ */
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs) protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
// phpcs:enable
global $langs,$conf,$mysoc; global $langs,$conf,$mysoc;
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -609,6 +615,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
*/ */
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Show footer of page. Need this->emetteur object * Show footer of page. Need this->emetteur object
* *
@ -618,9 +625,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param int $hidefreetext 1=Hide free text * @param int $hidefreetext 1=Hide free text
* @return integer * @return integer
*/ */
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{ {
// phpcs:enable
global $conf; global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
} }

View File

@ -219,7 +219,7 @@ class pdf_einstein extends ModelePDFCommandes
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -228,7 +228,7 @@ class pdf_einstein extends ModelePDFCommandes
// Load translation files required by the page // Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
$nblignes = count($object->lines); $nblines = count($object->lines);
if ($conf->commande->dir_output) if ($conf->commande->dir_output)
{ {
@ -308,7 +308,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -400,7 +400,7 @@ class pdf_einstein extends ModelePDFCommandes
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -429,7 +429,7 @@ class pdf_einstein extends ModelePDFCommandes
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -540,7 +540,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->tva[$vatrate] += $tvaligne; $this->tva[$vatrate] += $tvaligne;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));

View File

@ -194,7 +194,7 @@ class pdf_eratosthene extends ModelePDFCommandes
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -203,7 +203,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Translations // Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
$nblignes = count($object->lines); $nblines = count($object->lines);
$hidetop=0; $hidetop=0;
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
@ -217,7 +217,7 @@ class pdf_eratosthene extends ModelePDFCommandes
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -541,7 +541,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Loop on each lines // Loop on each lines
$pageposbeforeprintlines=$pdf->getPage(); $pageposbeforeprintlines=$pdf->getPage();
$pagenb = $pageposbeforeprintlines; $pagenb = $pageposbeforeprintlines;
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -599,7 +599,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -738,7 +738,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$this->tva[$vatrate] += $tvaligne; $this->tva[$vatrate] += $tvaligne;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -747,7 +747,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -168,7 +168,7 @@ class pdf_espadon extends ModelePdfExpedition
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
@ -176,7 +176,7 @@ class pdf_espadon extends ModelePdfExpedition
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -254,7 +254,7 @@ class pdf_espadon extends ModelePdfExpedition
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -404,7 +404,7 @@ class pdf_espadon extends ModelePdfExpedition
$nexY = $tab_top + $this->tabTitleHeight + 2; $nexY = $tab_top + $this->tabTitleHeight + 2;
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -464,7 +464,7 @@ class pdf_espadon extends ModelePdfExpedition
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -548,7 +548,7 @@ class pdf_espadon extends ModelePdfExpedition
if ($weighttxt && $voltxt) $nexY+=2; if ($weighttxt && $voltxt) $nexY+=2;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80)));

View File

@ -222,7 +222,7 @@ class pdf_merou extends ModelePdfExpedition
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format, 'mm', 'l'); $pdf=pdf_getInstance($this->format, 'mm', 'l');
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -347,7 +347,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0); $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0);
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -356,7 +356,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -197,7 +197,7 @@ class pdf_rouget extends ModelePdfExpedition
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
@ -205,7 +205,7 @@ class pdf_rouget extends ModelePdfExpedition
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -283,7 +283,7 @@ class pdf_rouget extends ModelePdfExpedition
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -423,7 +423,7 @@ class pdf_rouget extends ModelePdfExpedition
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -481,7 +481,7 @@ class pdf_rouget extends ModelePdfExpedition
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -563,7 +563,7 @@ class pdf_rouget extends ModelePdfExpedition
if ($weighttxt && $voltxt) $nexY+=2; if ($weighttxt && $voltxt) $nexY+=2;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));

View File

@ -220,7 +220,7 @@ class pdf_standard extends ModeleExpenseReport
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks")); $outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks"));
$nblignes = count($object->lines); $nblines = count($object->lines);
if ($conf->expensereport->dir_output) { if ($conf->expensereport->dir_output) {
// Definition of $dir and $file // Definition of $dir and $file
@ -351,7 +351,7 @@ class pdf_standard extends ModeleExpenseReport
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) { for ($i = 0 ; $i < $nblines ; $i++) {
$pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage
$pdf->SetTextColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0);
@ -374,7 +374,7 @@ class pdf_standard extends ModeleExpenseReport
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) { if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) {
// There is no space left for total+free text // There is no space left for total+free text
if ($i == ($nblignes-1)) { if ($i == ($nblines-1)) {
// No more lines, and no space left to show total, so we create a new page // No more lines, and no space left to show total, so we create a new page
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -401,7 +401,7 @@ class pdf_standard extends ModeleExpenseReport
//$nblineFollowComment = 1; //$nblineFollowComment = 1;
// Cherche nombre de lignes a venir pour savoir si place suffisante // Cherche nombre de lignes a venir pour savoir si place suffisante
// if ($i < ($nblignes - 1)) // If it's not last line // if ($i < ($nblines - 1)) // If it's not last line
// { // {
// //Fetch current description to know on which line the next one should be placed // //Fetch current description to know on which line the next one should be placed
// $follow_comment = $object->lines[$i]->comments; // $follow_comment = $object->lines[$i]->comments;

View File

@ -235,7 +235,9 @@ class pdf_crabe extends ModelePDFFactures
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null'));
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -244,13 +246,13 @@ class pdf_crabe extends ModelePDFFactures
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE))
{ {
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -317,7 +319,7 @@ class pdf_crabe extends ModelePDFFactures
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblines = count($object->lines);
$nbpayments = count($object->getListOfPayments()); $nbpayments = count($object->getListOfPayments());
// Create pdf instance // Create pdf instance
@ -358,7 +360,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -465,7 +467,7 @@ class pdf_crabe extends ModelePDFFactures
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -521,7 +523,7 @@ class pdf_crabe extends ModelePDFFactures
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -650,7 +652,7 @@ class pdf_crabe extends ModelePDFFactures
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -659,7 +661,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -209,7 +209,7 @@ class pdf_sponge extends ModelePDFFactures
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -218,7 +218,7 @@ class pdf_sponge extends ModelePDFFactures
// Translations // Translations
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies"));
$nblignes = count($object->lines); $nblines = count($object->lines);
$hidetop=0; $hidetop=0;
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
@ -232,7 +232,7 @@ class pdf_sponge extends ModelePDFFactures
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -330,7 +330,7 @@ class pdf_sponge extends ModelePDFFactures
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblines = count($object->lines);
$nbpayments = count($object->getListOfPayments()); $nbpayments = count($object->getListOfPayments());
// Create pdf instance // Create pdf instance
@ -572,7 +572,7 @@ class pdf_sponge extends ModelePDFFactures
// Loop on each lines // Loop on each lines
$pageposbeforeprintlines=$pdf->getPage(); $pageposbeforeprintlines=$pdf->getPage();
$pagenb = $pageposbeforeprintlines; $pagenb = $pageposbeforeprintlines;
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
@ -630,7 +630,7 @@ class pdf_sponge extends ModelePDFFactures
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -782,7 +782,7 @@ class pdf_sponge extends ModelePDFFactures
$nexY = max($nexY, $posYAfterImage); $nexY = max($nexY, $posYAfterImage);
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -791,7 +791,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -216,7 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
// Create pdf instance // Create pdf instance
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
@ -274,7 +274,7 @@ class pdf_soleil extends ModelePDFFicheinter
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);

View File

@ -479,7 +479,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -172,7 +172,7 @@ class pdf_standard extends ModelePDFProduct
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
$nblignes = count($object->lines); $nblines = count($object->lines);
if ($conf->product->dir_output) if ($conf->product->dir_output)
{ {
@ -346,7 +346,7 @@ class pdf_standard extends ModelePDFProduct
// Loop on each lines // Loop on each lines
/* /*
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
@ -375,7 +375,7 @@ class pdf_standard extends ModelePDFProduct
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('','',true); $pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct
$this->tva[$vatrate] += $tvaligne; $this->tva[$vatrate] += $tvaligne;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));

View File

@ -188,7 +188,7 @@ class pdf_baleine extends ModelePDFProjects
if ($conf->projet->dir_output) if ($conf->projet->dir_output)
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblines = count($object->lines); // This is set later with array of tasks
$objectref = dol_sanitizeFileName($object->ref); $objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->projet->dir_output; $dir = $conf->projet->dir_output;
@ -250,7 +250,7 @@ class pdf_baleine extends ModelePDFProjects
} }
$object->lines=$tasksarray; $object->lines=$tasksarray;
$nblignes=count($object->lines); $nblines=count($object->lines);
$pdf->Open(); $pdf->Open();
$pagenb=0; $pagenb=0;
@ -287,7 +287,7 @@ class pdf_baleine extends ModelePDFProjects
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top -= 2; $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);
@ -313,7 +313,7 @@ class pdf_baleine extends ModelePDFProjects
$nexY = $tab_top + $heightoftitleline + 1; $nexY = $tab_top + $heightoftitleline + 1;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -352,7 +352,7 @@ class pdf_baleine extends ModelePDFProjects
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -428,7 +428,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C');
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -437,7 +437,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -160,7 +160,7 @@ class pdf_beluga extends ModelePDFProjects
if ($conf->projet->dir_output) if ($conf->projet->dir_output)
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblines = count($object->lines); // This is set later with array of tasks
$objectref = dol_sanitizeFileName($object->ref); $objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->projet->dir_output; $dir = $conf->projet->dir_output;
@ -223,7 +223,7 @@ class pdf_beluga extends ModelePDFProjects
} }
$object->lines=$tasksarray; $object->lines=$tasksarray;
$nblignes=count($object->lines); $nblines=count($object->lines);
$pdf->Open(); $pdf->Open();
$pagenb=0; $pagenb=0;
@ -260,7 +260,7 @@ class pdf_beluga extends ModelePDFProjects
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top -= 2; $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);
@ -642,7 +642,7 @@ class pdf_beluga extends ModelePDFProjects
} }
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -120,7 +120,7 @@ class pdf_timespent extends ModelePDFProjects
if ($conf->projet->dir_output) if ($conf->projet->dir_output)
{ {
//$nblignes = count($object->lines); // This is set later with array of tasks //$nblines = count($object->lines); // This is set later with array of tasks
$objectref = dol_sanitizeFileName($object->ref); $objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->projet->dir_output; $dir = $conf->projet->dir_output;
@ -181,7 +181,7 @@ class pdf_timespent extends ModelePDFProjects
} }
$object->lines=$tasksarray; $object->lines=$tasksarray;
$nblignes=count($object->lines); $nblines=count($object->lines);
$pdf->Open(); $pdf->Open();
$pagenb=0; $pagenb=0;
@ -218,7 +218,7 @@ class pdf_timespent extends ModelePDFProjects
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top -= 2; $tab_top -= 2;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);
@ -244,7 +244,7 @@ class pdf_timespent extends ModelePDFProjects
$nexY = $tab_top + $heightoftitleline + 1; $nexY = $tab_top + $heightoftitleline + 1;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -283,7 +283,7 @@ class pdf_timespent extends ModelePDFProjects
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -359,7 +359,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C');
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -368,7 +368,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -218,7 +218,7 @@ class pdf_azur extends ModelePDFPropales
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -227,7 +227,7 @@ class pdf_azur extends ModelePDFPropales
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
@ -235,7 +235,7 @@ class pdf_azur extends ModelePDFPropales
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -362,7 +362,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -470,7 +470,7 @@ class pdf_azur extends ModelePDFPropales
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -527,7 +527,7 @@ class pdf_azur extends ModelePDFPropales
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -640,7 +640,7 @@ class pdf_azur extends ModelePDFPropales
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -649,7 +649,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -193,7 +193,7 @@ class pdf_cyan extends ModelePDFPropales
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -206,7 +206,7 @@ class pdf_cyan extends ModelePDFPropales
$outputlangs->load("propal"); $outputlangs->load("propal");
$outputlangs->load("products"); $outputlangs->load("products");
$nblignes = count($object->lines); $nblines = count($object->lines);
$hidetop=0; $hidetop=0;
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
@ -220,7 +220,7 @@ class pdf_cyan extends ModelePDFPropales
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -557,7 +557,7 @@ class pdf_cyan extends ModelePDFPropales
// Loop on each lines // Loop on each lines
$pageposbeforeprintlines=$pdf->getPage(); $pageposbeforeprintlines=$pdf->getPage();
$pagenb = $pageposbeforeprintlines; $pagenb = $pageposbeforeprintlines;
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -617,7 +617,7 @@ class pdf_cyan extends ModelePDFPropales
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -755,7 +755,7 @@ class pdf_cyan extends ModelePDFPropales
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -764,7 +764,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -131,7 +131,7 @@ class pdf_squille extends ModelePdfReception
$outputlangs->load("receptions"); $outputlangs->load("receptions");
$outputlangs->load("productbatch"); $outputlangs->load("productbatch");
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
@ -139,7 +139,7 @@ class pdf_squille extends ModelePdfReception
{ {
$objphoto = new Product($this->db); $objphoto = new Product($this->db);
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -217,7 +217,7 @@ class pdf_squille extends ModelePdfReception
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblignes with the new facture lines content after hook // Set nblignes with the new facture lines content after hook
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); $default_font_size = pdf_getPDFFontSize($outputlangs);
@ -357,7 +357,7 @@ class pdf_squille extends ModelePdfReception
$fk_commandefourndet=0; $fk_commandefourndet=0;
$totalOrdered=0; $totalOrdered=0;
// Loop on each lines // Loop on each lines
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -416,7 +416,7 @@ class pdf_squille extends ModelePdfReception
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -496,7 +496,7 @@ class pdf_squille extends ModelePdfReception
if ($weighttxt && $voltxt) $nexY+=2; if ($weighttxt && $voltxt) $nexY+=2;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));

View File

@ -201,7 +201,7 @@ class pdf_standard extends ModelePDFStock
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
$nblignes = count($object->lines); $nblines = count($object->lines);
if ($conf->stock->dir_output) if ($conf->stock->dir_output)
{ {
@ -323,8 +323,8 @@ class pdf_standard extends ModelePDFStock
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
$nblignes = $num; $nblines = $num;
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
@ -372,7 +372,7 @@ class pdf_standard extends ModelePDFStock
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -452,7 +452,7 @@ class pdf_standard extends ModelePDFStock
$totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); $totalvaluesell+=price2num($pricemin*$objp->value, 'MT');
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -550,7 +550,7 @@ class pdf_standard extends ModelePDFStock
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);
@ -576,7 +576,7 @@ class pdf_standard extends ModelePDFStock
// Loop on each lines // Loop on each lines
/* /*
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
@ -605,7 +605,7 @@ class pdf_standard extends ModelePDFStock
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('','',true); $pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -644,7 +644,7 @@ class pdf_standard extends ModelePDFStock
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R');
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -653,7 +653,7 @@ class pdf_standard extends ModelePDFStock
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -331,7 +331,7 @@ class pdf_stdmovement extends ModelePDFMovement
* END TODO * END TODO
**/ **/
//$nblignes = count($object->lines); //$nblines = count($object->lines);
if ($conf->stock->dir_output) if ($conf->stock->dir_output)
{ {
@ -481,8 +481,8 @@ class pdf_stdmovement extends ModelePDFMovement
{ {
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$i = 0; $i = 0;
$nblignes = $num; $nblines = $num;
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
@ -530,7 +530,7 @@ class pdf_stdmovement extends ModelePDFMovement
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -639,9 +639,9 @@ class pdf_stdmovement extends ModelePDFMovement
$totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); $totalvaluesell+=price2num($pricemin*$objp->value, 'MT');
$nexY+=3.5; // Passe espace entre les lignes $nexY+=3.5; // Add space between lines
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -650,7 +650,7 @@ class pdf_stdmovement extends ModelePDFMovement
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)
@ -724,7 +724,7 @@ class pdf_stdmovement extends ModelePDFMovement
complete_substitutions_array($substitutionarray, $outputlangs, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
$tab_top = 88; $tab_top = 88;
$pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFont('', '', $default_font_size - 1);

View File

@ -199,7 +199,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$hookmanager,$nblines;
// Get source company // Get source company
if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
@ -259,7 +259,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
@ -296,7 +296,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -370,7 +370,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -397,7 +397,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -495,7 +495,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->localtax2[$localtax2rate]+=$localtax2ligne; $this->localtax2[$localtax2rate]+=$localtax2ligne;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -504,7 +504,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -185,7 +185,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; global $user,$langs,$conf,$hookmanager,$mysoc,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -194,7 +194,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Load translation files required by the page // Load translation files required by the page
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products"));
$nblignes = count($object->lines); $nblines = count($object->lines);
$hidetop=0; $hidetop=0;
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
@ -205,7 +205,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$realpatharray=array(); $realpatharray=array();
if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE))
{ {
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -284,7 +284,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
@ -496,7 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Loop on each lines // Loop on each lines
$pageposbeforeprintlines=$pdf->getPage(); $pageposbeforeprintlines=$pdf->getPage();
$pagenb = $pageposbeforeprintlines; $pagenb = $pageposbeforeprintlines;
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -553,7 +553,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -689,7 +689,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80)));
@ -698,7 +698,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -213,7 +213,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; global $user,$langs,$conf,$hookmanager,$mysoc,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -222,13 +222,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Load translation files required by the page // Load translation files required by the page
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE))
{ {
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -307,7 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
@ -344,7 +344,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -418,7 +418,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -481,7 +481,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -591,7 +591,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -600,7 +600,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -264,7 +264,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
global $action; global $action;
$reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$nblignes = count($object->lines); $nblines = count($object->lines);
$pdf=pdf_getInstance($this->format); $pdf=pdf_getInstance($this->format);
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
@ -325,7 +325,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -354,7 +354,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$posyafter=$pdf->GetY(); $posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -412,7 +412,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -421,7 +421,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -209,7 +209,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
@ -218,13 +218,13 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Load traductions files requiredby by page // Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
$nblignes = count($object->lines); $nblines = count($object->lines);
// Loop on each lines to detect if there is at least one image to show // Loop on each lines to detect if there is at least one image to show
$realpatharray=array(); $realpatharray=array();
if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE)) if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE))
{ {
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if (empty($object->lines[$i]->fk_product)) continue; if (empty($object->lines[$i]->fk_product)) continue;
@ -333,7 +333,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
@ -403,7 +403,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$nexY = $tab_top + 7; $nexY = $tab_top + 7;
// Loop on each lines // Loop on each lines
for ($i = 0 ; $i < $nblignes ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
$curY = $nexY; $curY = $nexY;
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
@ -469,7 +469,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{ {
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
{ {
$pdf->AddPage('', '', true); $pdf->AddPage('', '', true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx); if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@ -587,7 +587,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
// Add line // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{ {
$pdf->setPage($pageposafter); $pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
@ -596,7 +596,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetLineStyle(array('dash'=>0)); $pdf->SetLineStyle(array('dash'=>0));
} }
$nexY+=2; // Passe espace entre les lignes $nexY+=2; // Add space between lines
// Detect if some page were added automatically and output _tableau for past pages // Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter) while ($pagenb < $pageposafter)

View File

@ -148,10 +148,10 @@ class TraceableDB extends DoliDB
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE * Return the number o flines into the result of a request INSERT, DELETE or UPDATE
* *
* @param resource $resultset Curseur de la requete voulue * @param resource $resultset Curseur de la requete voulue
* @return int Nombre de lignes * @return int Number of lines
* @see num_rows() * @see num_rows()
*/ */
public function affected_rows($resultset) public function affected_rows($resultset)

View File

@ -209,9 +209,9 @@ class EmailCollector extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }

View File

@ -164,11 +164,11 @@ class EmailCollectorAction extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }
} }
} }

View File

@ -133,9 +133,9 @@ class EmailCollectorFilter extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }

View File

@ -347,7 +347,7 @@ class Expedition extends CommonObject
dol_syslog(get_class($this)."::create", LOG_DEBUG); dol_syslog(get_class($this)."::create", LOG_DEBUG);
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
// Insertion des lignes // Insert of lines
$num=count($this->lines); $num=count($this->lines);
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
{ {
@ -2355,7 +2355,7 @@ class Expedition extends CommonObject
/** /**
* Classe de gestion des lignes de bons d'expedition * Classe to manage lines of shipment
*/ */
class ExpeditionLigne extends CommonObjectLine class ExpeditionLigne extends CommonObjectLine
{ {

View File

@ -2112,16 +2112,16 @@ class ExpenseReport extends CommonObject
dol_syslog(get_class($this)."::periode_existe sql=".$sql); dol_syslog(get_class($this)."::periode_existe sql=".$sql);
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) { if ($result) {
$num_lignes = $this->db->num_rows($result); $i = 0; $num_rows = $this->db->num_rows($result); $i = 0;
if ($num_lignes>0) if ($num_rows > 0)
{ {
$date_d_form = $date_debut; $date_d_form = $date_debut;
$date_f_form = $date_fin; $date_f_form = $date_fin;
$existe = false; $existe = false;
while ($i < $num_lignes) while ($i < $num_rows)
{ {
$objp = $this->db->fetch_object($result); $objp = $this->db->fetch_object($result);
@ -2175,8 +2175,8 @@ class ExpenseReport extends CommonObject
$result = $this->db->query($sql); $result = $this->db->query($sql);
if($result) if($result)
{ {
$num_lignes = $this->db->num_rows($result); $i = 0; $num_rows = $this->db->num_rows($result); $i = 0;
while ($i < $num_lignes) while ($i < $num_rows)
{ {
$objp = $this->db->fetch_object($result); $objp = $this->db->fetch_object($result);
array_push($users_validator, $objp->fk_user); array_push($users_validator, $objp->fk_user);

View File

@ -183,7 +183,7 @@ if ($action == 'add') {
$newfichinterid = $newinter->create($user); $newfichinterid = $newinter->create($user);
if ($newfichinterid > 0) { if ($newfichinterid > 0) {
// on ajoute les lignes de détail ensuite // Now we add line of details
foreach ($object->lines as $ficheinterligne) foreach ($object->lines as $ficheinterligne)
$newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, ''); $newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, '');

View File

@ -679,9 +679,8 @@ if (empty($reshook))
} }
/* /*
* Ordonnancement des lignes * Set position of lines
*/ */
elseif ($action == 'up' && $user->rights->ficheinter->creer) elseif ($action == 'up' && $user->rights->ficheinter->creer)
{ {
$object->line_up($lineid); $object->line_up($lineid);

View File

@ -312,7 +312,7 @@ class PaiementFourn extends Paiement
/** /**
* Supprime un paiement ainsi que les lignes qu'il a genere dans comptes * Delete a payment and lines generated into accounts
* Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse
* Si le paiement porte sur au moins une facture a "payee", on refuse * Si le paiement porte sur au moins une facture a "payee", on refuse
* *

View File

@ -1415,7 +1415,7 @@ if (empty($reshook))
$totalpaye = $object->getSommePaiement(); $totalpaye = $object->getSommePaiement();
$resteapayer = $object->total_ttc - $totalpaye; $resteapayer = $object->total_ttc - $totalpaye;
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees // We check that lines of invoices are exported in accountancy
//$ventilExportCompta = $object->getVentilExportCompta(); //$ventilExportCompta = $object->getVentilExportCompta();
// On verifie si aucun paiement n'a ete effectue // On verifie si aucun paiement n'a ete effectue

View File

@ -1899,8 +1899,8 @@ class Holiday extends CommonObject
$result = $this->db->query($sql); $result = $this->db->query($sql);
if($result) if($result)
{ {
$num_lignes = $this->db->num_rows($result); $i = 0; $num_rows = $this->db->num_rows($result); $i = 0;
while ($i < $num_lignes) while ($i < $num_rows)
{ {
$objp = $this->db->fetch_object($result); $objp = $this->db->fetch_object($result);
array_push($users_validator, $objp->fk_user); array_push($users_validator, $objp->fk_user);

View File

@ -942,7 +942,7 @@ class Livraison extends CommonObject
{ {
$objSourceLine = $this->db->fetch_object($resultSourceLine); $objSourceLine = $this->db->fetch_object($resultSourceLine);
// Recupere les lignes de la source deja livrees // Get lines of sources alread delivered
$sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty"; $sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty";
$sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as ld, ".MAIN_DB_PREFIX."livraison as l,"; $sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as ld, ".MAIN_DB_PREFIX."livraison as l,";
$sql.= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c"; $sql.= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c";

View File

@ -225,9 +225,9 @@ class MyObject extends CommonObject
// Translate some data of arrayofkeyval // Translate some data of arrayofkeyval
foreach($this->fields as $key => $val) foreach($this->fields as $key => $val)
{ {
if (is_array($this->fields[$key]['arrayofkeyval'])) if (is_array($val['arrayofkeyval']))
{ {
foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) foreach($val['arrayofkeyval'] as $key2 => $val2)
{ {
$this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2);
} }

View File

@ -42,7 +42,7 @@ $object=new Opensurveysondage($db);
$result=$object->fetch(0, $numsondage); $result=$object->fetch(0, $numsondage);
if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage); if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage);
$nblignes=$object->fetch_lines(); $nblines=$object->fetch_lines();
/* /*
@ -108,7 +108,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout
$testmodifier = false; $testmodifier = false;
$testligneamodifier = false; $testligneamodifier = false;
$ligneamodifier = -1; $ligneamodifier = -1;
for ($i=0; $i<$nblignes; $i++) for ($i=0; $i<$nblines; $i++)
{ {
if (isset($_POST['modifierligne'.$i])) if (isset($_POST['modifierligne'.$i]))
{ {
@ -271,7 +271,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D")
} }
// Delete line // Delete line
for ($i = 0; $i < $nblignes; $i++) for ($i = 0; $i < $nblines; $i++)
{ {
if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox
{ {
@ -916,7 +916,7 @@ while ($compteur < $num)
} }
//demande de confirmation pour modification de ligne //demande de confirmation pour modification de ligne
for ($i=0; $i<$nblignes; $i++) for ($i=0; $i<$nblines; $i++)
{ {
if (isset($_POST["modifierligne".$i])) if (isset($_POST["modifierligne".$i]))
{ {

View File

@ -4084,7 +4084,11 @@ class Product extends CommonObject
} }
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
$linkclose.= ' class="classfortooltip"'; $linkclose.= ' class="nowraponall classfortooltip"';
}
else
{
$linkclose = ' class="nowraponall"';
} }
if ($option == 'supplier' || $option == 'category') { if ($option == 'supplier' || $option == 'category') {
@ -4106,7 +4110,7 @@ class Product extends CommonObject
} }
} }
$linkstart = '<a class="nowraponall" href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';

View File

@ -783,10 +783,9 @@ SCRIPT;
// Suppliers list title // Suppliers list title
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
if ($object->isProduct()) $nblignefour=4;
else $nblignefour=4;
$param="&id=".$object->id; $param="&id=".$object->id;
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);

View File

@ -42,7 +42,7 @@ if (GETPOST('sondage'))
$object=new Opensurveysondage($db); $object=new Opensurveysondage($db);
$result=$object->fetch(0, $numsondage); $result=$object->fetch(0, $numsondage);
$nblignes=$object->fetch_lines(); $nblines=$object->fetch_lines();
//If the survey has not yet finished, then it can be modified //If the survey has not yet finished, then it can be modified
$canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); $canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED);
@ -184,7 +184,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout
$testmodifier = false; $testmodifier = false;
$testligneamodifier = false; $testligneamodifier = false;
$ligneamodifier = -1; $ligneamodifier = -1;
for ($i=0; $i<$nblignes; $i++) for ($i=0; $i < $nblines; $i++)
{ {
if (isset($_POST['modifierligne'.$i])) if (isset($_POST['modifierligne'.$i]))
{ {
@ -557,7 +557,7 @@ while ($compteur < $num)
} }
//demande de confirmation pour modification de ligne //demande de confirmation pour modification de ligne
for ($i=0; $i<$nblignes; $i++) for ($i=0; $i < $nblines; $i++)
{ {
if (isset($_POST["modifierligne".$i])) if (isset($_POST["modifierligne".$i]))
{ {

View File

@ -259,7 +259,7 @@ class Reception extends CommonObject
dol_syslog(get_class($this)."::create", LOG_DEBUG); dol_syslog(get_class($this)."::create", LOG_DEBUG);
if ($this->db->query($sql)) if ($this->db->query($sql))
{ {
// Insertion des lignes // Insert of lines
$num=count($this->lines); $num=count($this->lines);
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
{ {

View File

@ -899,7 +899,7 @@ class Dolresource extends CommonObject
/** /**
* Load in cache resource type code (setup in dictionary) * Load in cache resource type code (setup in dictionary)
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function load_cache_code_type_resource() public function load_cache_code_type_resource()
{ {

View File

@ -377,7 +377,7 @@ class SupplierProposal extends CommonObject
* @param double $remise_percent Percentage discount of the line * @param double $remise_percent Percentage discount of the line
* @param string $price_base_type HT or TTC * @param string $price_base_type HT or TTC
* @param double $pu_ttc Prix unitaire TTC * @param double $pu_ttc Prix unitaire TTC
* @param int $info_bits Bits de type de lignes * @param int $info_bits Bits of type of lines
* @param int $type Type of line (product, service) * @param int $type Type of line (product, service)
* @param int $rang Position of line * @param int $rang Position of line
* @param int $special_code Special code (also used by externals modules!) * @param int $special_code Special code (also used by externals modules!)

View File

@ -1034,7 +1034,7 @@ class Ticket extends CommonObject
/** /**
* Charge dans cache la liste des types de tickets (paramétrable dans dictionnaire) * Charge dans cache la liste des types de tickets (paramétrable dans dictionnaire)
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function loadCacheTypesTickets() public function loadCacheTypesTickets()
{ {
@ -1074,7 +1074,7 @@ class Ticket extends CommonObject
/** /**
* Charge dans cache la liste des catégories de tickets (paramétrable dans dictionnaire) * Charge dans cache la liste des catégories de tickets (paramétrable dans dictionnaire)
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function loadCacheCategoriesTickets() public function loadCacheCategoriesTickets()
{ {
@ -1114,7 +1114,7 @@ class Ticket extends CommonObject
/** /**
* Charge dans cache la liste des sévérité de tickets (paramétrable dans dictionnaire) * Charge dans cache la liste des sévérité de tickets (paramétrable dans dictionnaire)
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function loadCacheSeveritiesTickets() public function loadCacheSeveritiesTickets()
{ {
@ -1561,7 +1561,7 @@ class Ticket extends CommonObject
/** /**
* Charge la liste des actions sur le ticket * Charge la liste des actions sur le ticket
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function loadCacheLogsTicket() public function loadCacheLogsTicket()
{ {
@ -1662,7 +1662,7 @@ class Ticket extends CommonObject
/** /**
* Charge la liste des messages sur le ticket * Charge la liste des messages sur le ticket
* *
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko * @return int Number of lines loaded, 0 if already loaded, <0 if KO
*/ */
public function loadCacheMsgsTicket() public function loadCacheMsgsTicket()
{ {