mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Uniformize code (ligne -> line)
This commit is contained in:
parent
bc7b3b67c6
commit
5b96527805
|
|
@ -85,7 +85,7 @@ $line1->qty=1;
|
|||
$line1->total_ht=100;
|
||||
$line1->total_tva=10;
|
||||
$line1->total_ttc=110;
|
||||
$obj->lignes[]=$line1;
|
||||
$obj->lines[]=$line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject=$obj->create($user);
|
||||
|
|
|
|||
|
|
@ -954,10 +954,12 @@ class Propal extends CommonObject
|
|||
$this->brouillon = 1;
|
||||
}
|
||||
|
||||
$this->lignes = array();
|
||||
$this->db->free($resql);
|
||||
$this->db->free($resql);
|
||||
|
||||
/*
|
||||
$this->lignes = array(); // TODO: deprecated
|
||||
$this->lines = array();
|
||||
|
||||
/*
|
||||
* Lignes propales liees a un produit ou non
|
||||
*/
|
||||
$sql = "SELECT d.rowid, d.fk_propal, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,";
|
||||
|
|
@ -1012,8 +1014,8 @@ class Propal extends CommonObject
|
|||
|
||||
$this->lignes[$i] = $line; // TODO: deprecated
|
||||
$this->lines[$i] = $line;
|
||||
//dol_syslog("1 ".$ligne->fk_product);
|
||||
//print "xx $i ".$this->lignes[$i]->fk_product;
|
||||
//dol_syslog("1 ".$line->fk_product);
|
||||
//print "xx $i ".$this->lines[$i]->fk_product;
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($result);
|
||||
|
|
|
|||
|
|
@ -134,12 +134,12 @@ class Facture extends CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Create invoice in database
|
||||
* \param user Object user that create
|
||||
* \param notrigger 1 ne declenche pas les triggers, 0 sinon
|
||||
* \param forceduedate Do not recalculate due date from payment condition but force it with value
|
||||
* \return int <0 if KO, >0 if OK
|
||||
* \remarks this->ref can be set or empty. If empty, we will use "(PROV)"
|
||||
* Create invoice in database
|
||||
* @param user Object user that create
|
||||
* @param notrigger 1=Does not execute triggers, 0 otherwise
|
||||
* @param forceduedate 1=Do not recalculate due date from payment condition but force it with value
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @remarks this->ref can be set or empty. If empty, we will use "(PROV)"
|
||||
*/
|
||||
function create($user,$notrigger=0,$forceduedate=0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,16 +237,16 @@ class Translate {
|
|||
{
|
||||
$value=trim(preg_replace('/\\n/',"\n",$tab[1]));
|
||||
|
||||
if (preg_match('/^CHARSET$/',$key)) // This is to declare in which charset files are encoded
|
||||
if ($key == 'CHARSET') // This is to declare in which charset files are encoded
|
||||
{
|
||||
$this->charset_inputfile[$newdomain]=strtoupper($value);
|
||||
//print 'File '.$file_lang.' is declared to have format '.$this->charset_inputfile[$newdomain].'<br>';
|
||||
}
|
||||
elseif (preg_match('/^DIRECTION$/',$key)) // This is to declare direction of language
|
||||
elseif ($key == 'DIRECTION') // This is to declare direction of language
|
||||
{
|
||||
if ($alt < 2) // We do not load direction for alternate files 2
|
||||
{
|
||||
$this->direction=$value;
|
||||
$this->tab_translate[$key]=$value;
|
||||
if ($stopafterdirection) break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,13 +171,13 @@ class InterfaceExportsynchro
|
|||
);
|
||||
|
||||
$i=0;
|
||||
while ($i < count($propal->lignes))
|
||||
while ($i < count($propal->lines))
|
||||
{
|
||||
$objPropalLine_data[$i] = array( "Ref"=>$propal->ref,
|
||||
"ProductRef"=>$propal->lignes[$i]->ref,
|
||||
"Label"=>$propal->lignes[$i]->libelle,
|
||||
"LineQty"=>$propal->lignes[$i]->qty,
|
||||
"LineTotalHT"=>$propal->lignes[$i]->total_ht
|
||||
"ProductRef"=>$propal->lines[$i]->ref,
|
||||
"Label"=>$propal->lines[$i]->libelle,
|
||||
"LineQty"=>$propal->lines[$i]->qty,
|
||||
"LineTotalHT"=>$propal->lines[$i]->total_ht
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ require_once("../main.inc.php");
|
|||
|
||||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
|
||||
$langs->load("main");
|
||||
$right=($langs->direction=='rtl'?'left':'right');
|
||||
$left=($langs->direction=='rtl'?'right':'left');
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
|
||||
//var_dump($langs->defaultlang);
|
||||
//var_dump($conf->format_date_short_java);
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL
|
||||
if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->direction=='rtl'?'left':'right');
|
||||
$left=($langs->direction=='rtl'?'right':'left');
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
$fontsize=empty($conf->browser->phone)?'12':'12';
|
||||
$fontsizesmaller=empty($conf->browser->phone)?'11':'11';
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ body {
|
|||
margin-bottom: 0;
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
<?php print 'direction: '.$langs->direction.";\n"; ?>
|
||||
<?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?>
|
||||
}
|
||||
|
||||
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: bold; color: #000000; text-decoration: none; }
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL
|
||||
if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->direction=='rtl'?'left':'right');
|
||||
$left=($langs->direction=='rtl'?'right':'left');
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
$fontsize=empty($conf->browser->phone)?'12':'12';
|
||||
$fontsizesmaller=empty($conf->browser->phone)?'11':'11';
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ body {
|
|||
margin-bottom: 0;
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
<?php print 'direction: '.$langs->direction.";\n"; ?>
|
||||
<?php print 'direction: '.$langs->trans("DIRECTION").";\n"; ?>
|
||||
}
|
||||
|
||||
a:link, a:visited, a:hover, a:active { font-family: <?php print $fontlist ?>; font-weight: bold; color: #000000; text-decoration: none; }
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL
|
||||
if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->direction=='rtl'?'left':'right');
|
||||
$left=($langs->direction=='rtl'?'right':'left');
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
?>
|
||||
|
||||
/* ============================================================================== */
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
|
|||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL
|
||||
if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was forced on URL
|
||||
$langs->load("main",0,1);
|
||||
$right=($langs->direction=='rtl'?'left':'right');
|
||||
$left=($langs->direction=='rtl'?'right':'left');
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
?>
|
||||
|
||||
/* ============================================================================== */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user