Qual: Uniformize code (ligne -> line)
This commit is contained in:
parent
ad9c4c4217
commit
3fcbfcc17d
@ -740,15 +740,16 @@ class Fichinter extends CommonObject
|
|||||||
$xnbp = 0;
|
$xnbp = 0;
|
||||||
while ($xnbp < $nbp)
|
while ($xnbp < $nbp)
|
||||||
{
|
{
|
||||||
$ligne=new FichinterLigne($this->db);
|
$line=new FichinterLigne($this->db);
|
||||||
$ligne->desc=$langs->trans("Description")." ".$xnbp;
|
$line->desc=$langs->trans("Description")." ".$xnbp;
|
||||||
$ligne->qty=1;
|
$line->qty=1;
|
||||||
$ligne->subprice=100;
|
$line->subprice=100;
|
||||||
$ligne->price=100;
|
$line->price=100;
|
||||||
$ligne->tva_tx=19.6;
|
$line->tva_tx=19.6;
|
||||||
$prodid = rand(1, $num_prods);
|
$prodid = rand(1, $num_prods);
|
||||||
$ligne->fk_product=$prodids[$prodid];
|
$line->fk_product=$prodids[$prodid];
|
||||||
$this->lignes[$xnbp]=$ligne;
|
|
||||||
|
$this->lines[$xnbp]=$line;
|
||||||
$xnbp++;
|
$xnbp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,11 +784,14 @@ class Fichinter extends CommonObject
|
|||||||
$fichinterligne->id = $objp->rowid;
|
$fichinterligne->id = $objp->rowid;
|
||||||
//...
|
//...
|
||||||
|
|
||||||
$this->lignes[$i] = $fichinterligne;
|
$this->lines[$i] = $fichinterligne;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
$this->lignes=$this->lines; // For backward compatibility
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -203,12 +203,11 @@ function facture_pdf_create($db, $object, $message, $modele, $outputlangs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Cree un meta fichier a cote de la facture sur le disque pour faciliter les recherches en texte plein.
|
* Create a meta file with document file into same directory.
|
||||||
* Pourquoi ? tout simplement parcequ'en fin d'exercice quand je suis avec mon comptable je n'ai pas de
|
* This should allow rgrep search.
|
||||||
* connexion internet "rapide" pour retrouver en 2 secondes une facture non payee ou compliquee a gerer ... avec un rgrep c'est vite fait bien fait [eric seigne]
|
* @param db Objet base de donnee
|
||||||
* \param db Objet base de donnee
|
* @param facid Id de la facture a creer
|
||||||
* \param facid Id de la facture a creer
|
* @param message Message
|
||||||
* \param message Message
|
|
||||||
*/
|
*/
|
||||||
function facture_meta_create($db, $facid, $message="")
|
function facture_meta_create($db, $facid, $message="")
|
||||||
{
|
{
|
||||||
@ -231,7 +230,7 @@ function facture_meta_create($db, $facid, $message="")
|
|||||||
|
|
||||||
if (is_dir($dir))
|
if (is_dir($dir))
|
||||||
{
|
{
|
||||||
$nblignes = sizeof($fac->lignes);
|
$nblignes = sizeof($fac->lines);
|
||||||
$client = $fac->client->nom . " " . $fac->client->address . " " . $fac->client->cp . " " . $fac->client->ville;
|
$client = $fac->client->nom . " " . $fac->client->address . " " . $fac->client->cp . " " . $fac->client->ville;
|
||||||
$meta = "REFERENCE=\"" . $fac->ref . "\"
|
$meta = "REFERENCE=\"" . $fac->ref . "\"
|
||||||
DATE=\"" . dol_print_date($fac->date,'') . "\"
|
DATE=\"" . dol_print_date($fac->date,'') . "\"
|
||||||
@ -243,10 +242,10 @@ function facture_meta_create($db, $facid, $message="")
|
|||||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||||
{
|
{
|
||||||
//Pour les articles
|
//Pour les articles
|
||||||
$meta .= "ITEM_" . $i . "_QUANTITY=\"" . $fac->lignes[$i]->qty . "\"
|
$meta .= "ITEM_" . $i . "_QUANTITY=\"" . $fac->lines[$i]->qty . "\"
|
||||||
ITEM_" . $i . "_UNIT_PRICE=\"" . $fac->lignes[$i]->price . "\"
|
ITEM_" . $i . "_UNIT_PRICE=\"" . $fac->lines[$i]->price . "\"
|
||||||
ITEM_" . $i . "_TVA=\"" .$fac->lignes[$i]->tva_tx . "\"
|
ITEM_" . $i . "_TVA=\"" .$fac->lines[$i]->tva_tx . "\"
|
||||||
ITEM_" . $i . "_DESCRIPTION=\"" . str_replace("\r\n","",nl2br($fac->lignes[$i]->desc)) . "\"
|
ITEM_" . $i . "_DESCRIPTION=\"" . str_replace("\r\n","",nl2br($fac->lines[$i]->desc)) . "\"
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -298,7 +298,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3. Then writeMultiCell must use 3 also.
|
$pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3. Then writeMultiCell must use 3 also.
|
||||||
|
|
||||||
//dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description));
|
//dol_syslog("desc=".dol_htmlentitiesbr($fichinter->description));
|
||||||
$nblignes = sizeof($fichinter->lignes);
|
$nblignes = sizeof($fichinter->lines);
|
||||||
|
|
||||||
$curY = $pdf->GetY();
|
$curY = $pdf->GetY();
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
@ -306,7 +306,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
// Loop on each lines
|
// Loop on each lines
|
||||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||||
{
|
{
|
||||||
$fichinterligne = $fichinter->lignes[$i];
|
$fichinterligne = $fichinter->lines[$i];
|
||||||
|
|
||||||
$valide = $fichinterligne->id ? $fichinterligne->fetch($fichinterligne->id) : 0;
|
$valide = $fichinterligne->id ? $fichinterligne->fetch($fichinterligne->id) : 0;
|
||||||
if ($valide>0)
|
if ($valide>0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user