>
diff --git a/htdocs/core/class/actions_commonobject.class.php b/htdocs/core/class/actions_commonobject.class.php
index 16f57077c73..1d6fd8cd5cd 100644
--- a/htdocs/core/class/actions_commonobject.class.php
+++ b/htdocs/core/class/actions_commonobject.class.php
@@ -69,6 +69,8 @@ class ActionsCommonObject
$num = count($this->object->lines);
$var = true;
$i = 0;
+
+ var_dump($this->object);
foreach ($this->object->lines as $line)
{
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index dd8cc722265..9009e708f09 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -229,11 +229,11 @@ class Translate {
{
if ($usecachekey) $tabtranslatedomain=array(); // To save lang content in cache
- while ($ligne = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents
+ while ($line = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents
{
- if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#")
+ if ($line[0] != "\n" && $line[0] != " " && $line[0] != "#")
{
- $tab=explode('=',$ligne,2);
+ $tab=explode('=',$line,2);
$key=trim($tab[0]);
//print "Domain=$domain, found a string for $tab[0] with value $tab[1] ";
if (empty($this->tab_translate[$key]) && isset($tab[1]))
@@ -519,6 +519,7 @@ class Translate {
/**
* Return list of all available languages
* @param langdir Directory to scan
+ * @param maxlength Max length for each value in combo box (will be truncated)
* @return array List of languages
*/
function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0)
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index b59c0a34e14..9fdf688dfa5 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -50,7 +50,6 @@ class Expedition extends CommonObject
var $modelpdf;
var $origin;
var $origin_id;
- var $lignes=array(); // TODO deprecated
var $lines=array();
var $expedition_method_id;
var $statut;
@@ -77,7 +76,7 @@ class Expedition extends CommonObject
function Expedition($DB)
{
$this->db = $DB;
- $this->lignes = array();
+ $this->lines = array();
$this->products = array();
// List of long language codes for status
@@ -158,9 +157,9 @@ class Expedition extends CommonObject
if ($this->db->query($sql))
{
// Insertion des lignes
- for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
{
- if (! $this->create_line($this->lignes[$i]->entrepot_id, $this->lignes[$i]->origin_line_id, $this->lignes[$i]->qty) > 0)
+ if (! $this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty) > 0)
{
$error++;
}
@@ -410,9 +409,9 @@ class Expedition extends CommonObject
dol_syslog("Expedition::valid movement index ".$i);
$obj = $this->db->fetch_object($resql);
- if ($this->lignes[$i]->fk_product > 0 && $this->lignes[$i]->product_type == 0)
+ if ($this->lines[$i]->fk_product > 0 && $this->lines[$i]->product_type == 0)
{
- //var_dump($this->lignes[$i]);
+ //var_dump($this->lines[$i]);
$mouvS = new MouvementStock($this->db);
// We decrement stock of product (and sub-products)
// We use warehouse selected for each line
@@ -529,14 +528,14 @@ class Expedition extends CommonObject
*/
function addline( $entrepot_id, $id, $qty )
{
- $num = sizeof($this->lignes);
+ $num = sizeof($this->lines);
$line = new ExpeditionLigne($this->db);
$line->entrepot_id = $entrepot_id;
$line->origin_line_id = $id;
$line->qty = $qty;
- $this->lignes[$num] = $line;
+ $this->lines[$num] = $line;
}
/**
@@ -783,7 +782,6 @@ class Expedition extends CommonObject
$line->volume = $obj->volume;
$line->volume_units = $obj->volume_units;
- $this->lignes[$i] = $line; // TODO deprecated
$this->lines[$i] = $line;
$i++;
@@ -920,15 +918,15 @@ class Expedition extends CommonObject
$xnbp = 0;
while ($xnbp < $nbp)
{
- $ligne=new ExpeditionLigne($this->db);
- $ligne->desc=$langs->trans("Description")." ".$xnbp;
- $ligne->libelle=$langs->trans("Description")." ".$xnbp;
- $ligne->qty=10;
- $ligne->qty_asked=5;
- $ligne->qty_shipped=4;
- $ligne->fk_product=$this->commande->lignes[$xnbp]->fk_product;
+ $line=new ExpeditionLigne($this->db);
+ $line->desc=$langs->trans("Description")." ".$xnbp;
+ $line->libelle=$langs->trans("Description")." ".$xnbp;
+ $line->qty=10;
+ $line->qty_asked=5;
+ $line->qty_shipped=4;
+ $line->fk_product=$this->commande->lines[$xnbp]->fk_product;
- $this->lignes[]=$ligne;
+ $this->lines[]=$line;
$xnbp++;
}
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 57b194d35aa..44aabdc8363 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -98,7 +98,7 @@ if ($_POST["action"] == 'add')
$expedition->tracking_number = $_POST["tracking_number"];
//var_dump($_POST);exit;
- for ($i = 0 ; $i < sizeof($object->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($object->lines) ; $i++)
{
$qty = "qtyl".$i;
if ($_POST[$qty] > 0)
@@ -447,8 +447,8 @@ if ($_GET["action"] == 'create')
*/
print '';
- //$lignes = $object->fetch_lines(1);
- $numAsked = sizeof($object->lignes);
+ //$lines = $object->fetch_lines(1);
+ $numAsked = sizeof($object->lines);
/* Lecture des expeditions deja effectuees */
$object->loadExpeditions();
@@ -654,8 +654,8 @@ else
dol_print_error($db,$expedition->error);
exit -1;
}
- $lignes = $expedition->lignes;
- $num_prod = sizeof($lignes);
+ $lines = $expedition->lines;
+ $num_prod = sizeof($lines);
if ($expedition->id > 0)
{
@@ -723,30 +723,30 @@ else
{
$weightUnit=0;
$volumeUnit=0;
- if (! empty($lignes[$i]->weight_units)) $weightUnit = $lignes[$i]->weight_units;
- if (! empty($lignes[$i]->volume_units)) $volumeUnit = $lignes[$i]->volume_units;
+ if (! empty($lines[$i]->weight_units)) $weightUnit = $lines[$i]->weight_units;
+ if (! empty($lines[$i]->volume_units)) $volumeUnit = $lines[$i]->volume_units;
// TODO Use a function addvalueunits(val1,unit1,val2,unit2)=>(val,unit)
- if ($lignes[$i]->weight_units < 50)
+ if ($lines[$i]->weight_units < 50)
{
$trueWeightUnit=pow(10,$weightUnit);
- $totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped*$trueWeightUnit;
+ $totalWeight += $lines[$i]->weight*$lines[$i]->qty_shipped*$trueWeightUnit;
}
else
{
$trueWeightUnit=$weightUnit;
- $totalWeight += $lignes[$i]->weight*$lignes[$i]->qty_shipped;
+ $totalWeight += $lines[$i]->weight*$lines[$i]->qty_shipped;
}
- if ($lignes[$i]->volume_units < 50)
+ if ($lines[$i]->volume_units < 50)
{
- //print $lignes[$i]->volume."x".$lignes[$i]->volume_units."x".($lignes[$i]->volume_units < 50)."x".$volumeUnit;
+ //print $lines[$i]->volume."x".$lines[$i]->volume_units."x".($lines[$i]->volume_units < 50)."x".$volumeUnit;
$trueVolumeUnit=pow(10,$volumeUnit);
- //print $lignes[$i]->volume;
- $totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped*$trueVolumeUnit;
+ //print $lines[$i]->volume;
+ $totalVolume += $lines[$i]->volume*$lines[$i]->qty_shipped*$trueVolumeUnit;
}
else
{
$trueVolumeUnit=$volumeUnit;
- $totalVolume += $lignes[$i]->volume*$lignes[$i]->qty_shipped;
+ $totalVolume += $lines[$i]->volume*$lines[$i]->qty_shipped;
}
}
$totalVolume=$totalVolume;
@@ -966,64 +966,64 @@ else
print "";
// Predefined product or service
- if ($lignes[$i]->fk_product > 0)
+ if ($lines[$i]->fk_product > 0)
{
print '';
// Affiche ligne produit
- $text = '';
- if ($lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
+ $text = ' ';
+ if ($lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
else $text.= img_object($langs->trans('ShowProduct'),'product');
- $text.= ' '.$lignes[$i]->ref.' ';
- $text.= ' - '.$lignes[$i]->label;
- $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($lignes[$i]->description));
+ $text.= ' '.$lines[$i]->ref.'';
+ $text.= ' - '.$lines[$i]->label;
+ $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($lines[$i]->description));
//print $description;
print $html->textwithtooltip($text,$description,3,'','',$i);
- print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end);
+ print_date_range($lines[$i]->date_start,$lines[$i]->date_end);
if ($conf->global->PRODUIT_DESC_IN_FORM)
{
- print ($lignes[$i]->description && $lignes[$i]->description!=$lignes[$i]->product)?' '.dol_htmlentitiesbr($lignes[$i]->description):'';
+ print ($lines[$i]->description && $lines[$i]->description!=$lines[$i]->product)?' '.dol_htmlentitiesbr($lines[$i]->description):'';
}
}
else
{
print " ";
- if ($lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
+ if ($lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
else $text = img_object($langs->trans('Product'),'product');
- print $text.' '.nl2br($lignes[$i]->description);
- print_date_range($lignes[$i]->date_start,$lignes[$i]->date_end);
+ print $text.' '.nl2br($lines[$i]->description);
+ print_date_range($lines[$i]->date_start,$lines[$i]->date_end);
print " \n";
}
// Qte commande
- print ''.$lignes[$i]->qty_asked.' ';
+ print ''.$lines[$i]->qty_asked.' ';
// Qte a expedier ou expedier
- print ''.$lignes[$i]->qty_shipped.' ';
+ print ''.$lines[$i]->qty_shipped.' ';
// Weight
print '';
- if ($lignes[$i]->fk_product_type == 0) print $lignes[$i]->weight*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->weight_units,"weight");
+ if ($lines[$i]->fk_product_type == 0) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units,"weight");
else print ' ';
print ' ';
// Volume
print '';
- if ($lignes[$i]->fk_product_type == 0) print $lignes[$i]->volume*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->volume_units,"volume");
+ if ($lines[$i]->fk_product_type == 0) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume");
else print ' ';
print ' ';
// Size
- //print ''.$lignes[$i]->volume*$lignes[$i]->qty_shipped.' '.measuring_units_string($lignes[$i]->volume_units,"volume").' ';
+ //print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").' ';
// Entrepot source
if ($conf->stock->enabled)
{
print '';
- if ($lignes[$i]->entrepot_id > 0)
+ if ($lines[$i]->entrepot_id > 0)
{
$entrepot = new Entrepot($db);
- $entrepot->fetch($lignes[$i]->entrepot_id);
+ $entrepot->fetch($lines[$i]->entrepot_id);
print $entrepot->getNomUrl(1);
}
print ' ';
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index b21040cdba7..ef80f05f3e9 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -57,7 +57,7 @@ class Fichinter extends CommonObject
var $fk_project;
var $modelpdf;
- var $lignes = array();
+ var $lines = array();
/**
* \brief Constructeur de la classe
@@ -674,14 +674,14 @@ class Fichinter extends CommonObject
$this->db->begin();
// Insertion ligne
- $ligne=new FichinterLigne($this->db);
+ $line=new FichinterLigne($this->db);
- $ligne->fk_fichinter = $fichinterid;
- $ligne->desc = $desc;
- $ligne->datei = $date_intervention;
- $ligne->duration = $duration;
+ $line->fk_fichinter = $fichinterid;
+ $line->desc = $desc;
+ $line->datei = $date_intervention;
+ $line->duration = $duration;
- $result=$ligne->insert();
+ $result=$line->insert();
if ($result > 0)
{
$this->db->commit();
@@ -780,18 +780,16 @@ class Fichinter extends CommonObject
{
$objp = $this->db->fetch_object($result);
- $fichinterligne = new FichinterLigne($this->db);
- $fichinterligne->id = $objp->rowid;
+ $line = new FichinterLigne($this->db);
+ $line->id = $objp->rowid;
//...
- $this->lines[$i] = $fichinterligne;
+ $this->lines[$i] = $line;
$i++;
}
$this->db->free($result);
- $this->lignes=$this->lines; // For backward compatibility
-
return 1;
}
else
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 85c15be5f18..918d3f89898 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -74,7 +74,6 @@ class CommandeFournisseur extends Commande
{
$this->db = $DB;
$this->products = array();
- $this->lignes = array(); // TODO deprecated
$this->lines = array();
// List of language codes for status
@@ -187,7 +186,6 @@ class CommandeFournisseur extends Commande
$line->ref = $objp->ref; // Reference
$line->ref_fourn = $objp->ref_fourn; // Reference supplier
- $this->lignes[$i] = $line; // TODO deprecated
$this->lines[$i] = $line;
$i++;
@@ -527,15 +525,15 @@ class CommandeFournisseur extends Commande
{
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
- for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
{
// Product with reference
- if (!empty($this->lignes[$i]->fk_product))
+ if (!empty($this->lines[$i]->fk_product))
{
$mouvP = new MouvementStock($this->db);
// We decrement stock of product (and sub-products)
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
- $result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice);
+ $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice);
if ($result < 0) { $error++; }
}
}
@@ -1197,10 +1195,10 @@ class CommandeFournisseur extends Commande
$this->lines = array();
- for ($i = 0 ; $i < sizeof($comclient->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($comclient->lines) ; $i++)
{
- $prod = new Product($this->db, $comclient->lignes[$i]->fk_product);
- if ($prod->fetch($comclient->lignes[$i]->fk_product) > 0)
+ $prod = new Product($this->db, $comclient->lines[$i]->fk_product);
+ if ($prod->fetch($comclient->lines[$i]->fk_product) > 0)
{
$libelle = $prod->libelle;
$ref = $prod->ref;
@@ -1208,10 +1206,10 @@ class CommandeFournisseur extends Commande
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet";
$sql .= " (fk_commande,label,description,fk_product, price, qty, tva_tx, remise_percent, subprice, remise, ref)";
- $sql .= " VALUES (".$idc.", '" . addslashes($libelle) . "','" . addslashes($comclient->lignes[$i]->desc) . "'";
- $sql .= ",".$comclient->lignes[$i]->fk_product.",'".price2num($comclient->lignes[$i]->price)."'";
- $sql .= ", '".$comclient->lignes[$i]->qty."', ".$comclient->lignes[$i]->tva_tx.", ".$comclient->lignes[$i]->remise_percent;
- $sql .= ", '".price2num($comclient->lignes[$i]->subprice)."','0','".$ref."') ;";
+ $sql .= " VALUES (".$idc.", '" . addslashes($libelle) . "','" . addslashes($comclient->lines[$i]->desc) . "'";
+ $sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'";
+ $sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->remise_percent;
+ $sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."') ;";
if ( $this->db->query( $sql) )
{
$this->update_price();
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index d564ba28c36..54fe77bc580 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -973,7 +973,7 @@ if ($id > 0 || ! empty($ref))
*/
print '';
- $num = sizeof($commande->lignes);
+ $num = sizeof($commande->lines);
$i = 0; $total = 0;
if ($num)
@@ -991,7 +991,7 @@ if ($id > 0 || ! empty($ref))
$var=true;
while ($i < $num)
{
- $commandline = $commande->lignes[$i];
+ $commandline = $commande->lines[$i];
$var=!$var;
// Show product and description
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index a5276b93edb..3dd63fff91a 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -238,7 +238,7 @@ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer)
if ($element == 'contract') { $element = $subelement = 'contrat'; }
if ($element == 'order_supplier') { $element = 'fourn'; $subelement = 'fournisseur.commande'; }
- $facfou->origin = $_POST['origin'];
+ $facfou->origin = $_POST['origin'];
$facfou->origin_id = $_POST['originid'];
$facid = $facfou->create($user);
@@ -254,10 +254,7 @@ if ($_POST['action'] == 'add' && $user->rights->fournisseur->facture->creer)
$result=$srcobject->fetch($_POST['originid']);
if ($result > 0)
{
- // TODO mutualiser
- $lines = $srcobject->lignes;
- if (sizeof($srcobject->lines)) $lines = $srcobject->lines;
- if (empty($lines) && method_exists($srcobject,'fetch_lignes')) $lines = $srcobject->fetch_lignes();
+ $lines = $srcobject->lines;
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
for ($i = 0 ; $i < sizeof($lines) ; $i++)
@@ -844,6 +841,8 @@ if ($_GET['action'] == 'create')
if (GETPOST('origin') && GETPOST('originid'))
{
+ // TODO Not finished...
+
// Parse element/subelement (ex: project_task)
$element = $subelement = GETPOST('origin');
/*if (preg_match('/^([^_]+)_([^_]+)/i',$_GET['origin'],$regs))
@@ -1796,34 +1795,17 @@ else
$genallowed=$user->rights->fournisseur->facture->creer;
$delallowed=$user->rights->fournisseur->facture->supprimer;
- print ' ';
- $somethingshown=$formfile->show_documents('facture_fournisseur',$facfournref,$filedir,$urlsource,$genallowed,$delallowed,$fac->modelpdf);
-
- $object=$fac;
-
- /*
- * Linked object block
- */
- $object->load_object_linked($object->id,$object->element);
-
- foreach($object->linked_object as $linked_object => $linked_objectid)
- {
- $tmpmodule=$linked_object;
- if ($linked_object == 'invoice_supplier') $tmpmodule='fournisseur';
- if ($linked_object == 'order_supplier') $tmpmodule='fournisseur';
- if($conf->$tmpmodule->enabled && $linked_object != $object->element)
- {
- $somethingshown=$object->showLinkedObjectBlock($linked_object,$linked_objectid,$somethingshown);
- }
- }
+ $somethingshown=$formfile->show_documents('facture_fournisseur',$facfournref,$filedir,$urlsource,$genallowed,$delallowed,$facture->modelpdf);
print '';
print ' ';
// List of actions on element
+ /*
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php');
$formactions=new FormActions($db);
- $somethingshown=$formactions->showactions($object,'invoice_supplier',$socid);
+ $somethingshown=$formactions->showactions($fac,'invoice_supplier',$socid);
+ */
print '
';
}
diff --git a/htdocs/includes/boxes/box_contracts.php b/htdocs/includes/boxes/box_contracts.php
index 59b0896edfd..4e0efc39c82 100644
--- a/htdocs/includes/boxes/box_contracts.php
+++ b/htdocs/includes/boxes/box_contracts.php
@@ -98,7 +98,7 @@ class box_contracts extends ModeleBoxes {
$contractstatic->statut=$objp->fk_statut;
$contractstatic->id=$objp->rowid;
- $result=$contractstatic->fetch_lignes();
+ $result=$contractstatic->fetch_lines();
// fin_validite is no more on contract but on services
// if ($objp->fk_statut == 1 && $dateterm < ($now - $conf->contrat->cloture->warning_delay)) { $late = img_warning($langs->trans("Late")); }
diff --git a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php
index f88a1593807..8ebc63b6bb3 100644
--- a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php
+++ b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php
@@ -149,11 +149,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
$pdf->SetAutoPageBreak(1,0);
- $lignes=$this->line_per_page; // There is no line in such PDF.
+ $lines=$this->line_per_page; // There is no line in such PDF.
- $pages = intval($lignes / $this->line_per_page);
+ $pages = intval($lines / $this->line_per_page);
- if (($lignes % $this->line_per_page)>0)
+ if (($lines % $this->line_per_page)>0)
{
$pages++;
}
@@ -333,38 +333,38 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$page_hauteur=$this->page_hauteur;
// Line of free text
- $ligne=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
+ $line=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):"";
$pdf->SetFont('','',7);
$pdf->SetDrawColor(224,224,224);
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
- $nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output);
- //print 'e'.$ligne.'t'.dol_nboflines($ligne);exit;
- $posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0);
+ $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
+ //print 'e'.$line.'t'.dol_nboflines($line);exit;
+ $posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0);
- if ($ligne) // Free text
+ if ($line) // Free text
{
$pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(20000, 3, $ligne, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
- $posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell
+ $pdf->MultiCell(20000, 3, $line, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
+ $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
}
$pdf->SetY(-$posy);
$pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
$posy--;
- if ($ligne1)
+ if ($line1)
{
$pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0);
+ $pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
}
- if ($ligne2)
+ if ($line2)
{
$posy-=3;
$pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0);
+ $pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
}
$pdf->SetXY(-20,-$posy);
diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php
index 6900dd8c7cf..b92d9c0067e 100644
--- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php
+++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php
@@ -78,7 +78,6 @@ Class pdf_expedition_merou extends ModelePdfExpedition
global $user,$conf,$langs,$mysoc;
$object->fetch_thirdparty();
- if (empty($object->lines)) $object->lines=$object->lignes;
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
@@ -353,7 +352,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$tab4_top = 60;
$tab4_hl = 6;
$tab4_sl = 4;
- $ligne = 2;
+ $line = 2;
//*********************LOGO****************************
$pdf->SetXY(11,7);
diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php
index 6e86520ff31..26db46c7531 100644
--- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php
+++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php
@@ -220,8 +220,6 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$object->fetch_thirdparty();
- if (empty($object->lines)) $object->lines=$object->lignes;
-
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
if (!class_exists('TCPDF')) $outputlangs->charset_output='ISO-8859-1';
diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php
index 7937431c42c..b45fd6aa971 100644
--- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php
+++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php
@@ -98,7 +98,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
{
$object->fetch_thirdparty();
- $nblignes = sizeof($object->lignes);
+ $nblines = sizeof($object->lines);
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->expedition->dir_output."/receipt";
@@ -180,7 +180,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$curY = $tab_top + 7;
$nexY = $tab_top + 7;
- for ($i = 0 ; $i < $nblignes ; $i++)
+ for ($i = 0 ; $i < $nblines ; $i++)
{
$curY = $nexY;
@@ -196,22 +196,22 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$pdf->SetXY (10, $curY );
- $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lignes[$i]->ref), 0, 'C');
+ $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C');
// \TODO Field not yet saved in database
//$pdf->SetXY (133, $curY );
- //$pdf->MultiCell(10, 5, $object->lignes[$i]->tva_tx, 0, 'C');
+ //$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C');
$pdf->SetXY (145, $curY );
- $pdf->MultiCell(10, 3, $object->lignes[$i]->qty_shipped, 0, 'C');
+ $pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
// \TODO Field not yet saved in database
//$pdf->SetXY (156, $curY );
- //$pdf->MultiCell(20, 3, price($object->lignes[$i]->price), 0, 'R', 0);
+ //$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0);
// \TODO Field not yet saved in database
//$pdf->SetXY (174, $curY );
- //$total = price($object->lignes[$i]->price * $object->lignes[$i]->qty_shipped);
+ //$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped);
//$pdf->MultiCell(26, 3, $total, 0, 'R', 0);
$pdf->line(10, $curY-1, 200, $curY-1);
@@ -220,10 +220,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$nexY+=2; // Passe espace entre les lignes
// 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
{
//on recupere la description du produit suivant
- $follow_descproduitservice = $object->lignes[$i+1]->desc;
+ $follow_descproduitservice = $object->lines[$i+1]->desc;
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4);
}
diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php
index 3c214a210e2..468080774b8 100644
--- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php
+++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php
@@ -121,7 +121,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
$object->fetch_thirdparty();
- $nblignes = sizeof($object->lignes);
+ $nblines = sizeof($object->lines);
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->expedition->dir_output."/receipt";
@@ -190,7 +190,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++)
{
- if ($object->lignes[$i]->remise_percent)
+ if ($object->lines[$i]->remise_percent)
{
$this->atleastonediscount++;
}
@@ -238,7 +238,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$nexY = $tab_top + 7;
// Boucle sur les lignes
- for ($i = 0 ; $i < $nblignes ; $i++)
+ for ($i = 0 ; $i < $nblines ; $i++)
{
$curY = $nexY;
@@ -255,41 +255,41 @@ class pdf_typhon extends ModelePDFDeliveryOrder
/*
// TVA
$pdf->SetXY ($this->posxtva, $curY);
- $pdf->MultiCell(10, 4, ($object->lignes[$i]->tva_tx < 0 ? '*':'').abs($object->lignes[$i]->tva_tx), 0, 'R');
+ $pdf->MultiCell(10, 4, ($object->lines[$i]->tva_tx < 0 ? '*':'').abs($object->lines[$i]->tva_tx), 0, 'R');
// Prix unitaire HT avant remise
$pdf->SetXY ($this->posxup, $curY);
- $pdf->MultiCell(20, 4, price($object->lignes[$i]->subprice), 0, 'R', 0);
+ $pdf->MultiCell(20, 4, price($object->lines[$i]->subprice), 0, 'R', 0);
*/
// Quantity
$pdf->SetXY ($this->posxqty, $curY);
- $pdf->MultiCell(30, 3, $object->lignes[$i]->qty_shipped, 0, 'R');
+ $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'R');
/*
// Remise sur ligne
$pdf->SetXY ($this->posxdiscount, $curY);
- if ($object->lignes[$i]->remise_percent)
+ if ($object->lines[$i]->remise_percent)
{
- $pdf->MultiCell(14, 3, $object->lignes[$i]->remise_percent."%", 0, 'R');
+ $pdf->MultiCell(14, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
}
// Total HT ligne
$pdf->SetXY ($this->postotalht, $curY);
- $total = price($object->lignes[$i]->price * $object->lignes[$i]->qty);
+ $total = price($object->lines[$i]->price * $object->lines[$i]->qty);
$pdf->MultiCell(23, 3, $total, 0, 'R', 0);
// Collecte des totaux par valeur de tva
// dans le tableau tva["taux"]=total_tva
- $tvaligne=$object->lignes[$i]->price * $object->lignes[$i]->qty;
+ $tvaligne=$object->lines[$i]->price * $object->lines[$i]->qty;
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
- $this->tva[ (string)$object->lignes[$i]->tva_tx ] += $tvaligne;
+ $this->tva[ (string)$object->lines[$i]->tva_tx ] += $tvaligne;
*/
$nexY+=2; // Passe espace entre les lignes
// 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
{
//on recupere la description du produit suivant
- $follow_descproduitservice = $object->lignes[$i+1]->desc;
+ $follow_descproduitservice = $object->lines[$i+1]->desc;
//on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres)
$nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4);
}
diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php
index 1b3e1da2f49..2875a974e90 100644
--- a/htdocs/includes/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php
@@ -141,11 +141,11 @@ class pdf_paiement
$result = $this->db->query($sql);
if ($result)
{
- $lignes = $this->db->num_rows($result);
+ $lines = $this->db->num_rows($result);
$i = 0;
$var=True;
- while ($i < $lignes)
+ while ($i < $lines)
{
$objp = $this->db->fetch_object($result);
$var=!$var;
@@ -167,9 +167,9 @@ class pdf_paiement
dol_print_error($this->db);
}
- $pages = intval($lignes / $this->line_per_page);
+ $pages = intval($lines / $this->line_per_page);
- if (($lignes % $this->line_per_page)>0)
+ if (($lines % $this->line_per_page)>0)
{
$pages++;
}
diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php
index a1c1b1aa864..f9240f50a5f 100644
--- a/htdocs/lib/pdf.lib.php
+++ b/htdocs/lib/pdf.lib.php
@@ -372,7 +372,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
global $conf,$user;
$outputlangs->load("dict");
- $ligne='';
+ $line='';
// Line of free text
if (! empty($conf->global->$paramfreetext))
@@ -387,92 +387,92 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
);
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray,$outputlangs,$object);
- $ligne.=$outputlangs->convToOutputCharset($newfreetext);
+ $line.=$outputlangs->convToOutputCharset($newfreetext);
}
// First line of company infos
// Juridical status
- $ligne1="";
+ $line1="";
if ($fromcompany->forme_juridique_code)
{
- $ligne1.=($ligne1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
+ $line1.=($line1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
}
// Capital
if ($fromcompany->capital)
{
- $ligne1.=($ligne1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie);
+ $line1.=($line1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie);
}
// Prof Id 1
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
{
$field=$outputlangs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
+ $line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1);
}
// Prof Id 2
if ($fromcompany->idprof2)
{
$field=$outputlangs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2);
+ $line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2);
}
// Second line of company infos
- $ligne2="";
+ $line2="";
// Prof Id 3
if ($fromcompany->idprof3)
{
$field=$outputlangs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
+ $line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3);
}
// Prof Id 4
if ($fromcompany->idprof4)
{
$field=$outputlangs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
+ $line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4);
}
// IntraCommunautary VAT
if ($fromcompany->tva_intra != '')
{
- $ligne2.=($ligne2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
+ $line2.=($line2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
}
$pdf->SetFont('','',7);
$pdf->SetDrawColor(224,224,224);
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
- $nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output);
- //print 'nbofligne='.$nbofligne; exit;
- //print 'e'.$ligne.'t'.dol_nboflines($ligne);exit;
- $posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0);
+ $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
+ //print 'nbofline='.$nbofline; exit;
+ //print 'e'.$line.'t'.dol_nboflines($line);exit;
+ $posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0);
- if ($ligne) // Free text
+ if ($line) // Free text
{
$pdf->SetXY($marge_gauche,-$posy);
$width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
if ($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT) { $width=200; $align='C'; }
- $pdf->MultiCell($width, 3, $ligne, 0, $align, 0);
- $posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell
+ $pdf->MultiCell($width, 3, $line, 0, $align, 0);
+ $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
}
$pdf->SetY(-$posy);
$pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
$posy--;
- if ($ligne1)
+ if ($line1)
{
$pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0);
+ $pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
}
- if ($ligne2)
+ if ($line2)
{
$posy-=3;
$pdf->SetXY($marge_gauche,-$posy);
- $pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0);
+ $pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
}
// Show page nb only on iso languages
diff --git a/htdocs/lib/viewfiles.lib.php b/htdocs/lib/viewfiles.lib.php
index a192a0ce1f5..f444b9d0a96 100644
--- a/htdocs/lib/viewfiles.lib.php
+++ b/htdocs/lib/viewfiles.lib.php
@@ -53,13 +53,13 @@ function viewCsvFileContent($file_to_include='',$max_rows=0)
$count = 0;
print '';
- for ($ligne = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $ligne = fgetcsv($fic, 1024))
+ for ($line = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $line = fgetcsv($fic, 1024))
{
print '';
- $j = sizeof($ligne);
+ $j = sizeof($line);
for ($i = 0; $i < $j; $i++)
{
- print ''.$ligne[$i].' ';
+ print ''.$line[$i].' ';
}
print ' ';
$count++;
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 6d113735ab9..509642857aa 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -65,7 +65,6 @@ class Livraison extends CommonObject
function Livraison($DB)
{
$this->db = $DB;
- $this->lignes = array(); // TODO deprecated
$this->lines = array();
$this->products = array();
@@ -137,19 +136,19 @@ class Livraison extends CommonObject
{
$commande = new Commande($this->db);
$commande->id = $this->commande_id;
- $this->lignes = $commande->fetch_lines();
+ $this->lines = $commande->fetch_lines();
}
/*
* Insertion des produits dans la base
*/
- for ($i = 0 ; $i < sizeof($this->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
{
- $origin_id=$this->lignes[$i]->origin_line_id;
- if (! $origin_id) $origin_id=$this->lignes[$i]->commande_ligne_id; // For backward compatibility
+ $origin_id=$this->lines[$i]->origin_line_id;
+ if (! $origin_id) $origin_id=$this->lines[$i]->commande_ligne_id; // For backward compatibility
- if (! $this->create_line(0, $origin_id, $this->lignes[$i]->qty, $this->lignes[$i]->fk_product, $this->lignes[$i]->description))
+ if (! $this->create_line(0, $origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description))
{
$error++;
}
@@ -286,7 +285,7 @@ class Livraison extends CommonObject
/*
* Lignes
*/
- $result=$this->fetch_lignes();
+ $result=$this->fetch_lines();
if ($result < 0)
{
return -3;
@@ -491,18 +490,19 @@ class Livraison extends CommonObject
$expedition = new Expedition($this->db);
$result=$expedition->fetch($sending_id);
- $this->lignes = array();
+ $this->lines = array();
- for ($i = 0 ; $i < sizeof($expedition->lignes) ; $i++)
+ for ($i = 0 ; $i < sizeof($expedition->lines) ; $i++)
{
- $LivraisonLigne = new LivraisonLigne($this->db);
- $LivraisonLigne->origin_line_id = $expedition->lignes[$i]->origin_line_id;
- $LivraisonLigne->libelle = $expedition->lignes[$i]->libelle;
- $LivraisonLigne->description = $expedition->lignes[$i]->description;
- $LivraisonLigne->qty = $expedition->lignes[$i]->qty_shipped;
- $LivraisonLigne->fk_product = $expedition->lignes[$i]->fk_product;
- $LivraisonLigne->ref = $expedition->lignes[$i]->ref;
- $this->lignes[$i] = $LivraisonLigne;
+ $line = new LivraisonLigne($this->db);
+ $line->origin_line_id = $expedition->lines[$i]->origin_line_id;
+ $line->libelle = $expedition->lines[$i]->libelle;
+ $line->description = $expedition->lines[$i]->description;
+ $line->qty = $expedition->lines[$i]->qty_shipped;
+ $line->fk_product = $expedition->lines[$i]->fk_product;
+ $line->ref = $expedition->lines[$i]->ref;
+
+ $this->lines[$i] = $line;
}
$this->origin = $expedition->element;
@@ -524,13 +524,13 @@ class Livraison extends CommonObject
*/
function addline( $id, $qty )
{
- $num = sizeof($this->lignes);
- $ligne = new LivraisonLigne($this->db);
+ $num = sizeof($this->lines);
+ $line = new LivraisonLigne($this->db);
- $ligne->commande_ligne_id = $id;
- $ligne->qty = $qty;
+ $line->commande_ligne_id = $id;
+ $line->qty = $qty;
- $this->lignes[$num] = $ligne;
+ $this->lines[$num] = $line;
}
/**
@@ -657,9 +657,9 @@ class Livraison extends CommonObject
*
*
*/
- function fetch_lignes()
+ function fetch_lines()
{
- $this->lignes = array();
+ $this->lines = array();
$sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped,";
$sql.= " cd.qty as qty_asked,";
@@ -669,7 +669,7 @@ class Livraison extends CommonObject
$sql.= " WHERE ld.fk_origin_line = cd.rowid";
$sql.= " AND ld.fk_livraison = ".$this->id;
- dol_syslog("Livraison::fetch_lignes sql=".$sql);
+ dol_syslog("Livraison::fetch_lines sql=".$sql);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -695,7 +695,6 @@ class Livraison extends CommonObject
$line->price = $obj->price;
$line->total_ht = $obj->total_ht;
- $this->lignes[$i] = $line; // TODO deprecated
$this->lines[$i] = $line;
$i++;
@@ -703,7 +702,7 @@ class Livraison extends CommonObject
$this->db->free($resql);
}
- return $this->lignes;
+ return $this->lines;
}
@@ -782,16 +781,17 @@ class Livraison extends CommonObject
$this->note_public='SPECIMEN';
$i=0;
- $ligne=new LivraisonLigne($this->db);
- $ligne->fk_product = $prodids[0];
- $ligne->qty_asked = 10;
- $ligne->qty_shipped = 9;
- $ligne->ref = 'REFPROD';
- $ligne->label = 'Specimen';
- $ligne->description = 'Description';
- $ligne->price = 100;
- $ligne->total_ht = 100;
- $this->lignes[$i] = $ligne;
+ $line=new LivraisonLigne($this->db);
+ $line->fk_product = $prodids[0];
+ $line->qty_asked = 10;
+ $line->qty_shipped = 9;
+ $line->ref = 'REFPROD';
+ $line->label = 'Specimen';
+ $line->description = 'Description';
+ $line->price = 100;
+ $line->total_ht = 100;
+
+ $this->lines[$i] = $line;
}
/**
diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php
index 2f46dedb3e9..c1a70a5a85d 100644
--- a/htdocs/livraison/fiche.php
+++ b/htdocs/livraison/fiche.php
@@ -268,12 +268,12 @@ if ($_GET["action"] == 'create')
*/
print '';
- $lignes = $commande->fetch_lines(1);
+ $lines = $commande->fetch_lines(1);
// Lecture des livraisons deja effectuees
$commande->livraison_array();
- $num = sizeof($commande->lignes);
+ $num = sizeof($commande->lines);
$i = 0;
if ($num)
@@ -294,34 +294,34 @@ if ($_GET["action"] == 'create')
{
$product = new Product($db);
- $ligne = $commande->lignes[$i];
+ $line = $commande->lines[$i];
$var=!$var;
print "\n";
- if ($ligne->fk_product > 0)
+ if ($line->fk_product > 0)
{
- $product->fetch($ligne->fk_product);
+ $product->fetch($line->fk_product);
$product->load_stock();
print '';
- print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$product->libelle;
- if ($ligne->description) print nl2br($ligne->description);
+ print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$product->libelle;
+ if ($line->description) print nl2br($line->description);
print ' ';
}
else
{
- print "".nl2br($ligne->description)." \n";
+ print "".nl2br($line->description)." \n";
}
- print ''.$ligne->qty.' ';
+ print ''.$line->qty.' ';
/*
*
*/
print '';
- $quantite_livree = $commande->livraisons[$ligne->id];
+ $quantite_livree = $commande->livraisons[$line->id];
print $quantite_livree;;
print ' ';
- $quantite_commandee = $ligne->qty;
+ $quantite_commandee = $line->qty;
$quantite_a_livrer = $quantite_commandee - $quantite_livree;
if ($conf->stock->enabled)
@@ -331,7 +331,7 @@ if ($_GET["action"] == 'create')
// Quantite a livrer
print '';
- print ' ';
+ print ' ';
print ' ';
print ' ';
@@ -349,7 +349,7 @@ if ($_GET["action"] == 'create')
{
// Quantite a livrer
print '';
- print ' ';
+ print ' ';
print ' ';
print ' ';
}
@@ -498,7 +498,7 @@ else
* Lignes produits
*/
- $num_prod = sizeof($delivery->lignes);
+ $num_prod = sizeof($delivery->lines);
$i = 0; $total = 0;
print '';
@@ -519,40 +519,40 @@ else
$var=!$var;
print "";
- if ($delivery->lignes[$i]->fk_product > 0)
+ if ($delivery->lines[$i]->fk_product > 0)
{
$product = new Product($db);
- $product->fetch($delivery->lignes[$i]->fk_product);
+ $product->fetch($delivery->lines[$i]->fk_product);
print '';
// Affiche ligne produit
- $text = '';
- if ($delivery->lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
+ $text = ' ';
+ if ($delivery->lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
else $text.= img_object($langs->trans('ShowProduct'),'product');
- $text.= ' '.$delivery->lignes[$i]->ref.' ';
- $text.= ' - '.$delivery->lignes[$i]->label;
- $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lignes[$i]->description));
+ $text.= ' '.$delivery->lines[$i]->ref.'';
+ $text.= ' - '.$delivery->lines[$i]->label;
+ $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lines[$i]->description));
//print $description;
print $html->textwithtooltip($text,$description,3,'','',$i);
- print_date_range($delivery->lignes[$i]->date_start,$delivery->lignes[$i]->date_end);
+ print_date_range($delivery->lines[$i]->date_start,$delivery->lines[$i]->date_end);
if ($conf->global->PRODUIT_DESC_IN_FORM)
{
- print ($delivery->lignes[$i]->description && $delivery->lignes[$i]->description!=$delivery->lignes[$i]->label)?' '.dol_htmlentitiesbr($delivery->lignes[$i]->description):'';
+ print ($delivery->lines[$i]->description && $delivery->lines[$i]->description!=$delivery->lines[$i]->label)?' '.dol_htmlentitiesbr($delivery->lines[$i]->description):'';
}
}
else
{
print " ";
- if ($delivery->lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
+ if ($delivery->lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
else $text = img_object($langs->trans('Product'),'product');
- print $text.' '.nl2br($delivery->lignes[$i]->description);
+ print $text.' '.nl2br($delivery->lines[$i]->description);
print_date_range($objp->date_start,$objp->date_end);
print " \n";
}
- print ''.$delivery->lignes[$i]->qty_asked.' ';
- print ''.$delivery->lignes[$i]->qty_shipped.' ';
+ print ''.$delivery->lines[$i]->qty_asked.' ';
+ print ''.$delivery->lines[$i]->qty_shipped.' ';
print " ";
diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php
index 2a90ed791a9..66161f1a4a4 100755
--- a/htdocs/paybox/lib/paybox.lib.php
+++ b/htdocs/paybox/lib/paybox.lib.php
@@ -242,58 +242,58 @@ function html_print_paybox_footer($fromcompany,$langs)
global $conf;
// Juridical status
- $ligne1="";
+ $line1="";
if ($fromcompany->forme_juridique_code)
{
- $ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
+ $line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
}
// Capital
if ($fromcompany->capital)
{
- $ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
+ $line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
}
// Prof Id 1
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
{
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
+ $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
}
// Prof Id 2
if ($fromcompany->idprof2)
{
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
+ $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
}
// Second line of company infos
- $ligne2="";
+ $line2="";
// Prof Id 3
if ($fromcompany->idprof3)
{
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
+ $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
}
// Prof Id 4
if ($fromcompany->idprof4)
{
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
+ $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
}
// IntraCommunautary VAT
if ($fromcompany->tva_intra != '')
{
- $ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
+ $line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
}
print ' '."\n";
print ''."\n";
print $fromcompany->nom.' ';
- print $ligne1.' ';
- print $ligne2;
+ print $line1.' ';
+ print $line2;
print ' '."\n";
}
diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php
index 4bed91f60ca..3a321b8f644 100755
--- a/htdocs/paypal/lib/paypal.lib.php
+++ b/htdocs/paypal/lib/paypal.lib.php
@@ -72,58 +72,58 @@ function html_print_paypal_footer($fromcompany,$langs)
global $conf;
// Juridical status
- $ligne1="";
+ $line1="";
if ($fromcompany->forme_juridique_code)
{
- $ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
+ $line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code));
}
// Capital
if ($fromcompany->capital)
{
- $ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
+ $line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie);
}
// Prof Id 1
if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2))
{
$field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
+ $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1);
}
// Prof Id 2
if ($fromcompany->idprof2)
{
$field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
+ $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2);
}
// Second line of company infos
- $ligne2="";
+ $line2="";
// Prof Id 3
if ($fromcompany->idprof3)
{
$field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
+ $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3);
}
// Prof Id 4
if ($fromcompany->idprof4)
{
$field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code);
if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1];
- $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
+ $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4);
}
// IntraCommunautary VAT
if ($fromcompany->tva_intra != '')
{
- $ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
+ $line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra);
}
print ' '."\n";
print ''."\n";
print $fromcompany->nom.' ';
- print $ligne1.' ';
- print $ligne2;
+ print $line1.' ';
+ print $line2;
print ' '."\n";
}