mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Work on nblignes -> nblines
This commit is contained in:
parent
b37f55d13a
commit
adb3062a9f
|
|
@ -169,7 +169,7 @@ if ($action == 'delete')
|
|||
|
||||
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();
|
||||
|
||||
$objfrom=new ModeleBoxes($db);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO
|
|||
|
||||
|
||||
// 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
|
||||
|
||||
// Add hidden option to force decrease of stock whatever is user setup
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ class Propal extends CommonObject
|
|||
* @param float $remise_percent Pourcentage de remise de la ligne
|
||||
* @param string $price_base_type HT or 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 $rang Position of line
|
||||
* @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->fetch_optionals();
|
||||
|
||||
|
||||
// multilangs
|
||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
|
||||
$line = new Product($this->db);
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ if ($socid > 0)
|
|||
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.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
|
||||
$sql.= " rc.fk_facture_source,";
|
||||
|
|
@ -904,7 +904,7 @@ if ($socid > 0)
|
|||
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.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
|
||||
$sql.= " rc.fk_invoice_supplier_source,";
|
||||
|
|
|
|||
|
|
@ -1312,7 +1312,7 @@ class Commande extends CommonOrder
|
|||
* @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside)
|
||||
* @param int $fk_product Id of product
|
||||
* @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 string $price_base_type HT or 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->fetch_optionals();
|
||||
|
||||
|
||||
// multilangs
|
||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
|
||||
$line = new Product($this->db);
|
||||
|
|
|
|||
|
|
@ -1096,8 +1096,6 @@ $form = new Form($db);
|
|||
$formfile = new FormFile($db);
|
||||
if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db);
|
||||
|
||||
$objectlignestatic=new ContratLigne($db);
|
||||
|
||||
// Load object modContract
|
||||
$module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_serpis');
|
||||
if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php')
|
||||
|
|
@ -832,7 +832,7 @@ class Contrat extends CommonObject
|
|||
// Retreive all extrafields for contract
|
||||
// fetch optionals attributes and labels
|
||||
$line->fetch_optionals();
|
||||
|
||||
|
||||
// multilangs
|
||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
|
||||
$line = new Product($this->db);
|
||||
|
|
@ -1361,7 +1361,7 @@ class Contrat extends CommonObject
|
|||
* @param int $date_end Date de fin prevue
|
||||
* @param string $price_base_type HT or 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 $pa_ht Buying price HT
|
||||
* @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_fin_reel Date de fin reelle
|
||||
* @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 $pa_ht Buying price HT
|
||||
* @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
|
||||
{
|
||||
|
|
@ -510,7 +510,7 @@ class FactureRec extends CommonInvoice
|
|||
|
||||
// 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
|
||||
*/
|
||||
|
|
@ -876,7 +876,7 @@ class FactureRec extends CommonInvoice
|
|||
* @param int $fk_product Product/Service ID predefined
|
||||
* @param double $remise_percent Percentage discount of the line
|
||||
* @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 double $pu_ttc Prix unitaire TTC (> 0 even for credit note)
|
||||
* @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
|
||||
* @return int 1 if OK, < 0 if KO
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ class Facture extends CommonInvoice
|
|||
$facture->origin = $this->origin;
|
||||
$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->situation_counter = $this->situation_counter;
|
||||
$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->fetch_optionals();
|
||||
|
||||
|
||||
// multilangs
|
||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) {
|
||||
$line = new Product($this->db);
|
||||
|
|
@ -2661,7 +2661,7 @@ class Facture extends CommonInvoice
|
|||
* @param int $date_start Date start of service
|
||||
* @param int $date_end Date end of service
|
||||
* @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 string $price_base_type 'HT' or 'TTC'
|
||||
* @param double $pu_ttc Unit price with tax (> 0 even for credit note)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class box_services_contracts extends ModeleBoxes
|
|||
if ($user->rights->service->lire && $user->rights->contrat->lire)
|
||||
{
|
||||
$contractstatic=new Contrat($db);
|
||||
$contratlignestatic=new ContratLigne($db);
|
||||
$contractlinestatic=new ContratLigne($db);
|
||||
$thirdpartytmp = new Societe($db);
|
||||
$productstatic = new Product($db);
|
||||
|
||||
|
|
@ -116,13 +116,13 @@ class box_services_contracts extends ModeleBoxes
|
|||
$objp = $db->fetch_object($result);
|
||||
$datem=$db->jdate($objp->datem);
|
||||
|
||||
$contratlignestatic->id=$objp->cdid;
|
||||
$contratlignestatic->fk_contrat=$objp->rowid;
|
||||
$contratlignestatic->label=$objp->label;
|
||||
$contratlignestatic->description=$objp->description;
|
||||
$contratlignestatic->type=$objp->type;
|
||||
$contratlignestatic->product_id=$objp->product_id;
|
||||
$contratlignestatic->product_ref=$objp->product_ref;
|
||||
$contractlinestatic->id=$objp->cdid;
|
||||
$contractlinestatic->fk_contrat=$objp->rowid;
|
||||
$contractlinestatic->label=$objp->label;
|
||||
$contractlinestatic->description=$objp->description;
|
||||
$contractlinestatic->type=$objp->type;
|
||||
$contractlinestatic->product_id=$objp->product_id;
|
||||
$contractlinestatic->product_ref=$objp->product_ref;
|
||||
|
||||
$contractstatic->statut=$objp->contract_status;
|
||||
$contractstatic->id=$objp->rowid;
|
||||
|
|
@ -153,7 +153,7 @@ class box_services_contracts extends ModeleBoxes
|
|||
if ($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(
|
||||
'td' => 'class="right" width="18"',
|
||||
'text' => $contratlignestatic->LibStatut($objp->statut, 3)
|
||||
'text' => $contractlinestatic->LibStatut($objp->statut, 3)
|
||||
);
|
||||
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -286,8 +286,7 @@ class CMailFile
|
|||
// We now define $this->headers and $this->message
|
||||
$this->headers = $smtp_headers . $mime_headers;
|
||||
// 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
|
||||
// comme des injections mail par les serveurs de messagerie.
|
||||
// This avoid also empty lines at end that can be interpreted as mail injection by email servers.
|
||||
$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;
|
||||
|
|
|
|||
|
|
@ -101,11 +101,11 @@ interface Database
|
|||
|
||||
// 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
|
||||
* @return int Nombre de lignes
|
||||
* @see num_rows
|
||||
* @return int Number of lines
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset);
|
||||
// phpcs:enable
|
||||
|
|
|
|||
|
|
@ -523,10 +523,10 @@ class DoliDBMssql extends DoliDB
|
|||
|
||||
// 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
|
||||
* @return int Nombre de lignes
|
||||
* @return int Number of lines
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset)
|
||||
|
|
|
|||
|
|
@ -363,10 +363,10 @@ class DoliDBMysqli extends DoliDB
|
|||
|
||||
// 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
|
||||
* @return int Nombre de lignes
|
||||
* @return int Number of lines
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset)
|
||||
|
|
|
|||
|
|
@ -617,11 +617,11 @@ class DoliDBPgsql extends DoliDB
|
|||
|
||||
// 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
|
||||
* @return int Nb of lines
|
||||
* @see num_rows
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1435,16 +1435,16 @@ function dol_meta_create($object)
|
|||
|
||||
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;
|
||||
$meta = "REFERENCE=\"" . $object->ref . "\"
|
||||
DATE=\"" . dol_print_date($object->date, '') . "\"
|
||||
NB_ITEMS=\"" . $nblignes . "\"
|
||||
NB_ITEMS=\"" . $nblines . "\"
|
||||
CLIENT=\"" . $client . "\"
|
||||
AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\"
|
||||
AMOUNT=\"" . $object->total_ttc . "\"\n";
|
||||
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
//Pour les articles
|
||||
$meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\"
|
||||
|
|
|
|||
|
|
@ -2045,10 +2045,10 @@ function pdf_getTotalQty($object, $type, $outputlangs)
|
|||
global $hookmanager;
|
||||
|
||||
$total=0;
|
||||
$nblignes=count($object->lines);
|
||||
$nblines=count($object->lines);
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
if ($object->lines[$i]->special_code != 3)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||
|
||||
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
|
||||
if ($object->specimen)
|
||||
|
|
@ -287,7 +287,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @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)
|
||||
{
|
||||
global $conf,$mysoc;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||
|
||||
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
|
||||
if ($object->specimen)
|
||||
|
|
@ -430,7 +430,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||
* @param int $hidebottom Hide bottom bar of array
|
||||
* @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)
|
||||
{
|
||||
global $conf,$mysoc;
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
|
||||
|
||||
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
|
||||
|
|
@ -228,7 +228,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
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
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -400,7 +400,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -429,7 +429,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -540,7 +540,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$this->tva[$vatrate] += $tvaligne;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
|
||||
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines;
|
||||
|
||||
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
|
||||
|
|
@ -203,7 +203,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
// Translations
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$hidetop=0;
|
||||
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
|
||||
|
|
@ -217,7 +217,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
// Loop on each lines
|
||||
$pageposbeforeprintlines=$pdf->getPage();
|
||||
$pagenb = $pageposbeforeprintlines;
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -599,7 +599,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -738,7 +738,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$this->tva[$vatrate] += $tvaligne;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -747,7 +747,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
// Load traductions files requiredby by page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
|
|
@ -176,7 +176,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
|
@ -404,7 +404,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
$nexY = $tab_top + $this->tabTitleHeight + 2;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -548,7 +548,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||
if ($weighttxt && $voltxt) $nexY+=2;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80)));
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||
global $action;
|
||||
$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');
|
||||
$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);
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -356,7 +356,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
// Load traductions files requiredby by page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
|
|
@ -205,7 +205,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
|
@ -423,7 +423,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -563,7 +563,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||
if ($weighttxt && $voltxt) $nexY+=2;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
if ($conf->expensereport->dir_output) {
|
||||
// Definition of $dir and $file
|
||||
|
|
@ -351,7 +351,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// 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->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;
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) {
|
||||
// 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
|
||||
$pdf->AddPage('', '', true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -401,7 +401,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||
|
||||
//$nblineFollowComment = 1;
|
||||
// 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
|
||||
// $follow_comment = $object->lines[$i]->comments;
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// 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'));
|
||||
|
||||
|
|
@ -246,13 +246,13 @@ class pdf_crabe extends ModelePDFFactures
|
|||
// Load traductions files requiredby by page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
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;
|
||||
|
||||
|
|
@ -319,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
|
||||
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
$nbpayments = count($object->getListOfPayments());
|
||||
|
||||
// Create pdf instance
|
||||
|
|
@ -360,7 +360,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -467,7 +467,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -523,7 +523,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
//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 ($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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -652,7 +652,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -661,7 +661,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -218,7 +218,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
// Translations
|
||||
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$hidetop=0;
|
||||
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
|
||||
|
|
@ -232,7 +232,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
$nbpayments = count($object->getListOfPayments());
|
||||
|
||||
// Create pdf instance
|
||||
|
|
@ -572,7 +572,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
// Loop on each lines
|
||||
$pageposbeforeprintlines=$pdf->getPage();
|
||||
$pagenb = $pageposbeforeprintlines;
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
|
||||
$curY = $nexY;
|
||||
|
|
@ -630,7 +630,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
//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 ($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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -782,7 +782,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$nexY = max($nexY, $posYAfterImage);
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -791,7 +791,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||
global $action;
|
||||
$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
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
|
|
@ -274,7 +274,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class pdf_standard extends ModelePDFProduct
|
|||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
if ($conf->product->dir_output)
|
||||
{
|
||||
|
|
@ -346,7 +346,7 @@ class pdf_standard extends ModelePDFProduct
|
|||
|
||||
// Loop on each lines
|
||||
/*
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -375,7 +375,7 @@ class pdf_standard extends ModelePDFProduct
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct
|
|||
$this->tva[$vatrate] += $tvaligne;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
|
||||
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);
|
||||
$dir = $conf->projet->dir_output;
|
||||
|
|
@ -250,7 +250,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
}
|
||||
|
||||
$object->lines=$tasksarray;
|
||||
$nblignes=count($object->lines);
|
||||
$nblines=count($object->lines);
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
|
@ -287,7 +287,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top -= 2;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
|
@ -313,7 +313,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
$nexY = $tab_top + $heightoftitleline + 1;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -352,7 +352,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
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');
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -437,7 +437,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class pdf_beluga extends ModelePDFProjects
|
|||
|
||||
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);
|
||||
$dir = $conf->projet->dir_output;
|
||||
|
|
@ -223,7 +223,7 @@ class pdf_beluga extends ModelePDFProjects
|
|||
}
|
||||
|
||||
$object->lines=$tasksarray;
|
||||
$nblignes=count($object->lines);
|
||||
$nblines=count($object->lines);
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
|
@ -260,7 +260,7 @@ class pdf_beluga extends ModelePDFProjects
|
|||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top -= 2;
|
||||
|
||||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
|
||||
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);
|
||||
$dir = $conf->projet->dir_output;
|
||||
|
|
@ -181,7 +181,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
}
|
||||
|
||||
$object->lines=$tasksarray;
|
||||
$nblignes=count($object->lines);
|
||||
$nblines=count($object->lines);
|
||||
|
||||
$pdf->Open();
|
||||
$pagenb=0;
|
||||
|
|
@ -218,7 +218,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top -= 2;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
|
@ -244,7 +244,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
$nexY = $tab_top + $heightoftitleline + 1;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -283,7 +283,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
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');
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -368,7 +368,7 @@ class pdf_timespent extends ModelePDFProjects
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -227,7 +227,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
// Load traductions files requiredby by page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
|
|
@ -235,7 +235,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -362,7 +362,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -470,7 +470,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -640,7 +640,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -649,7 +649,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -206,7 +206,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$outputlangs->load("propal");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$hidetop=0;
|
||||
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
|
||||
|
|
@ -220,7 +220,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -557,7 +557,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
// Loop on each lines
|
||||
$pageposbeforeprintlines=$pdf->getPage();
|
||||
$pagenb = $pageposbeforeprintlines;
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -755,7 +755,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -764,7 +764,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class pdf_squille extends ModelePdfReception
|
|||
$outputlangs->load("receptions");
|
||||
$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
|
||||
$realpatharray=array();
|
||||
|
|
@ -139,7 +139,7 @@ class pdf_squille extends ModelePdfReception
|
|||
{
|
||||
$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;
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
// Set nblignes with the new facture lines content after hook
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$pdf=pdf_getInstance($this->format);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
|
@ -357,7 +357,7 @@ class pdf_squille extends ModelePdfReception
|
|||
$fk_commandefourndet=0;
|
||||
$totalOrdered=0;
|
||||
// Loop on each lines
|
||||
for ($i = 0; $i < $nblignes; $i++)
|
||||
for ($i = 0; $i < $nblines; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -496,7 +496,7 @@ class pdf_squille extends ModelePdfReception
|
|||
if ($weighttxt && $voltxt) $nexY+=2;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ class pdf_standard extends ModelePDFStock
|
|||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
if ($conf->stock->dir_output)
|
||||
{
|
||||
|
|
@ -323,8 +323,8 @@ class pdf_standard extends ModelePDFStock
|
|||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$nblignes = $num;
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
$nblines = $num;
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ class pdf_standard extends ModelePDFStock
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -452,7 +452,7 @@ class pdf_standard extends ModelePDFStock
|
|||
$totalvaluesell+=price2num($pricemin*$objp->value, 'MT');
|
||||
|
||||
// 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->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);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
|
@ -576,7 +576,7 @@ class pdf_standard extends ModelePDFStock
|
|||
|
||||
// Loop on each lines
|
||||
/*
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -605,7 +605,7 @@ class pdf_standard extends ModelePDFStock
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
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');
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -653,7 +653,7 @@ class pdf_standard extends ModelePDFStock
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
* END TODO
|
||||
**/
|
||||
|
||||
//$nblignes = count($object->lines);
|
||||
//$nblines = count($object->lines);
|
||||
|
||||
if ($conf->stock->dir_output)
|
||||
{
|
||||
|
|
@ -481,8 +481,8 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$nblignes = $num;
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
$nblines = $num;
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
|
@ -530,7 +530,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -639,9 +639,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
|
||||
$totalvaluesell+=price2num($pricemin*$objp->value, 'MT');
|
||||
|
||||
$nexY+=3.5; // Passe espace entre les lignes
|
||||
$nexY+=3.5; // Add space between lines
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -650,7 +650,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
@ -724,7 +724,7 @@ class pdf_stdmovement extends ModelePDFMovement
|
|||
complete_substitutions_array($substitutionarray, $outputlangs, $object);
|
||||
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
|
||||
$notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow);
|
||||
|
||||
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes;
|
||||
global $user,$langs,$conf,$mysoc,$hookmanager,$nblines;
|
||||
|
||||
// Get source company
|
||||
if (! is_object($object->thirdparty)) $object->fetch_thirdparty();
|
||||
|
|
@ -259,7 +259,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
global $action;
|
||||
$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);
|
||||
$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
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -370,7 +370,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -397,7 +397,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -495,7 +495,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$this->localtax2[$localtax2rate]+=$localtax2ligne;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -504,7 +504,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes;
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -194,7 +194,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
$nblines = count($object->lines);
|
||||
|
||||
$hidetop=0;
|
||||
if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){
|
||||
|
|
@ -205,7 +205,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$realpatharray=array();
|
||||
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;
|
||||
|
||||
|
|
@ -284,7 +284,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
global $action;
|
||||
$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);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
|
|
@ -496,7 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
// Loop on each lines
|
||||
$pageposbeforeprintlines=$pdf->getPage();
|
||||
$pagenb = $pageposbeforeprintlines;
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -553,7 +553,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -689,7 +689,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80)));
|
||||
|
|
@ -698,7 +698,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes;
|
||||
global $user,$langs,$conf,$hookmanager,$mysoc,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -222,13 +222,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
// Load translation files required by the page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
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;
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
global $action;
|
||||
$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);
|
||||
$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
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -418,7 +418,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -481,7 +481,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -591,7 +591,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -600,7 +600,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
global $action;
|
||||
$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);
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||
|
|
@ -325,7 +325,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage
|
||||
|
|
@ -354,7 +354,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
$posyafter=$pdf->GetY();
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -412,7 +412,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -421,7 +421,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
|
||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines;
|
||||
|
||||
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
|
||||
|
|
@ -218,13 +218,13 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
// Load traductions files requiredby by page
|
||||
$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
|
||||
$realpatharray=array();
|
||||
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;
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
@ -403,7 +403,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$nexY = $tab_top + 7;
|
||||
|
||||
// Loop on each lines
|
||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||
for ($i = 0 ; $i < $nblines ; $i++)
|
||||
{
|
||||
$curY = $nexY;
|
||||
$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;
|
||||
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);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
|
|
@ -587,7 +587,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||
|
||||
// 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->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||
|
|
@ -596,7 +596,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$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
|
||||
while ($pagenb < $pageposafter)
|
||||
|
|
|
|||
|
|
@ -148,10 +148,10 @@ class TraceableDB extends DoliDB
|
|||
|
||||
// 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
|
||||
* @return int Nombre de lignes
|
||||
* @return int Number of lines
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset)
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ class Expedition extends CommonObject
|
|||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// Insertion des lignes
|
||||
// Insert of lines
|
||||
$num=count($this->lines);
|
||||
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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2112,16 +2112,16 @@ class ExpenseReport extends CommonObject
|
|||
dol_syslog(get_class($this)."::periode_existe sql=".$sql);
|
||||
$result = $this->db->query($sql);
|
||||
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_f_form = $date_fin;
|
||||
|
||||
$existe = false;
|
||||
|
||||
while ($i < $num_lignes)
|
||||
while ($i < $num_rows)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
|
|
@ -2175,8 +2175,8 @@ class ExpenseReport extends CommonObject
|
|||
$result = $this->db->query($sql);
|
||||
if($result)
|
||||
{
|
||||
$num_lignes = $this->db->num_rows($result); $i = 0;
|
||||
while ($i < $num_lignes)
|
||||
$num_rows = $this->db->num_rows($result); $i = 0;
|
||||
while ($i < $num_rows)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
array_push($users_validator, $objp->fk_user);
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ if ($action == 'add') {
|
|||
$newfichinterid = $newinter->create($user);
|
||||
|
||||
if ($newfichinterid > 0) {
|
||||
// on ajoute les lignes de détail ensuite
|
||||
// Now we add line of details
|
||||
foreach ($object->lines as $ficheinterligne)
|
||||
$newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, '');
|
||||
|
||||
|
|
|
|||
|
|
@ -679,9 +679,8 @@ if (empty($reshook))
|
|||
}
|
||||
|
||||
/*
|
||||
* Ordonnancement des lignes
|
||||
*/
|
||||
|
||||
* Set position of lines
|
||||
*/
|
||||
elseif ($action == 'up' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->line_up($lineid);
|
||||
|
|
|
|||
|
|
@ -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 au moins une facture a "payee", on refuse
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1415,7 +1415,7 @@ if (empty($reshook))
|
|||
$totalpaye = $object->getSommePaiement();
|
||||
$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();
|
||||
|
||||
// On verifie si aucun paiement n'a ete effectue
|
||||
|
|
|
|||
|
|
@ -1899,8 +1899,8 @@ class Holiday extends CommonObject
|
|||
$result = $this->db->query($sql);
|
||||
if($result)
|
||||
{
|
||||
$num_lignes = $this->db->num_rows($result); $i = 0;
|
||||
while ($i < $num_lignes)
|
||||
$num_rows = $this->db->num_rows($result); $i = 0;
|
||||
while ($i < $num_rows)
|
||||
{
|
||||
$objp = $this->db->fetch_object($result);
|
||||
array_push($users_validator, $objp->fk_user);
|
||||
|
|
|
|||
|
|
@ -942,7 +942,7 @@ class Livraison extends CommonObject
|
|||
{
|
||||
$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.= " FROM ".MAIN_DB_PREFIX."livraisondet as ld, ".MAIN_DB_PREFIX."livraison as l,";
|
||||
$sql.= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c";
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ $object=new Opensurveysondage($db);
|
|||
$result=$object->fetch(0, $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;
|
||||
$testligneamodifier = false;
|
||||
$ligneamodifier = -1;
|
||||
for ($i=0; $i<$nblignes; $i++)
|
||||
for ($i=0; $i<$nblines; $i++)
|
||||
{
|
||||
if (isset($_POST['modifierligne'.$i]))
|
||||
{
|
||||
|
|
@ -271,7 +271,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D")
|
|||
}
|
||||
|
||||
// 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
|
||||
{
|
||||
|
|
@ -916,7 +916,7 @@ while ($compteur < $num)
|
|||
}
|
||||
|
||||
//demande de confirmation pour modification de ligne
|
||||
for ($i=0; $i<$nblignes; $i++)
|
||||
for ($i=0; $i<$nblines; $i++)
|
||||
{
|
||||
if (isset($_POST["modifierligne".$i]))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -783,10 +783,9 @@ SCRIPT;
|
|||
// Suppliers list title
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
if ($object->isProduct()) $nblignefour=4;
|
||||
else $nblignefour=4;
|
||||
|
||||
$param="&id=".$object->id;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if (GETPOST('sondage'))
|
|||
$object=new Opensurveysondage($db);
|
||||
$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
|
||||
$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;
|
||||
$testligneamodifier = false;
|
||||
$ligneamodifier = -1;
|
||||
for ($i=0; $i<$nblignes; $i++)
|
||||
for ($i=0; $i < $nblines; $i++)
|
||||
{
|
||||
if (isset($_POST['modifierligne'.$i]))
|
||||
{
|
||||
|
|
@ -557,7 +557,7 @@ while ($compteur < $num)
|
|||
}
|
||||
|
||||
//demande de confirmation pour modification de ligne
|
||||
for ($i=0; $i<$nblignes; $i++)
|
||||
for ($i=0; $i < $nblines; $i++)
|
||||
{
|
||||
if (isset($_POST["modifierligne".$i]))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ class Reception extends CommonObject
|
|||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// Insertion des lignes
|
||||
// Insert of lines
|
||||
$num=count($this->lines);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -899,7 +899,7 @@ class Dolresource extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ class SupplierProposal extends CommonObject
|
|||
* @param double $remise_percent Percentage discount of the line
|
||||
* @param string $price_base_type HT or 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 $rang Position of line
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
|
|
|
|||
|
|
@ -1034,7 +1034,7 @@ class Ticket extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
@ -1074,7 +1074,7 @@ class Ticket extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
@ -1114,7 +1114,7 @@ class Ticket extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
@ -1561,7 +1561,7 @@ class Ticket extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
@ -1662,7 +1662,7 @@ class Ticket extends CommonObject
|
|||
/**
|
||||
* 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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user