Merge pull request #8915 from grandoc/new_branch_04_06_2018

clean and update code
This commit is contained in:
Laurent Destailleur 2018-06-13 20:16:19 +02:00 committed by GitHub
commit b8e927d347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 15 deletions

View File

@ -176,7 +176,6 @@ class printing_printgcp extends PrintingDriver
global $bc, $conf, $langs;
$error = 0;
$langs->load('printing');
$var=true;
$html = '<tr class="liste_titre">';
$html.= '<td>'.$langs->trans('GCP_Name').'</td>';
@ -190,11 +189,9 @@ class printing_printgcp extends PrintingDriver
$html.= '</tr>'."\n";
$list = $this->getlist_available_printers();
//$html.= '<td><pre>'.print_r($list,true).'</pre></td>';
$var = true;
foreach ($list['available'] as $printer_det)
{
$var = !$var;
$html.= "<tr ".$bc[$var].">";
$html.= '<tr class="oddeven">';
$html.= '<td>'.$printer_det['name'].'</td>';
$html.= '<td>'.$printer_det['displayName'].'</td>';
$html.= '<td>'.$printer_det['id'].'</td>'; // id to identify printer to use

View File

@ -144,7 +144,6 @@ class printing_printipp extends PrintingDriver
{
global $bc, $conf, $langs;
$error = 0;
$var=true;
$html = '<tr class="liste_titre">';
$html.= '<td>'.$langs->trans('IPP_Uri').'</td>';
@ -160,12 +159,11 @@ class printing_printipp extends PrintingDriver
$html.= '<td align="center">'.$langs->trans("Select").'</td>';
$html.= "</tr>\n";
$list = $this->getlist_available_printers();
$var = true;
foreach ($list as $value)
{
$printer_det = $this->get_printer_detail($value);
$html.= "<tr ".$bc[$var].">";
$html.= '<tr class="oddeven">';
$html.= '<td>'.$value.'</td>';
//$html.= '<td><pre>'.print_r($printer_det,true).'</pre></td>';
$html.= '<td>'.$printer_det->printer_name->_value0.'</td>';

View File

@ -67,9 +67,9 @@ class doc_generic_project_odt extends ModelePDFProjects
function __construct($db)
{
global $conf,$langs,$mysoc;
$langs->load("main");
$langs->load("companies");
// Load traductions files requiredby by page
$langs->loadLangs(array("companies", "main"));
$this->db = $db;
$this->name = "ODT templates";
@ -951,7 +951,7 @@ class doc_generic_project_odt extends ModelePDFProjects
$elementarray = $object->get_element_list($keyref, $tablename);
if (count($elementarray)>0 && is_array($elementarray))
{
$var=true;
$var=true;
$total_ht = 0;
$total_ttc = 0;
$num=count($elementarray);

View File

@ -83,9 +83,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
function info($langs)
{
global $conf,$langs;
$langs->load("companies");
$langs->load("errors");
// Load traductions files requiredby by page
$langs->loadLangs(array("companies", "errors"));
$form = new Form($this->db);

View File

@ -419,7 +419,6 @@ if ($num > 0)
$style='pair';
$now = dol_now();
$i=0;
$var=true;
$totalarray=array();
while ($i < min($num,$limit))
{