0
diff --git a/dev/translation/README b/dev/translation/README
index 5f7b1c124e1..b470e4228d8 100644
--- a/dev/translation/README
+++ b/dev/translation/README
@@ -4,7 +4,7 @@ This directory contains tools to generate translation files for a new
languages or to update translation files for existing languages.
See Dolibarr Wiki page:
http://wiki.dolibarr.org/index.php/Translator_documentation
-For more informations on how to use them.
+For more information on how to use them.
To install transifex client:
sudo pip install --upgrade transifex-client
diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index f2676620c30..a81aa472ef7 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -188,7 +188,7 @@ if ($action == 'update') {
$form = new FormAccounting($db);
-// Defaut AccountingAccount RowId Product / Service
+// Default AccountingAccount RowId Product / Service
// at this time ACCOUNTING_SERVICE_SOLD_ACCOUNT & ACCOUNTING_PRODUCT_SOLD_ACCOUNT are account number not accountingacount rowid
// so we need to get those default value rowid first
$accounting = new AccountingAccount($db);
diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php
index 11da2236703..67ae907d9a4 100644
--- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php
+++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php
@@ -173,7 +173,7 @@ while ($obj = $db->fetch_object($resql)) {
$sql.= $db->plimit($limit+1, $offset);
-dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
+dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
$resql = $db->query($sql);
if (! $resql)
{
@@ -183,7 +183,7 @@ if (! $resql)
$num = $db->num_rows($resql);
-dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
+dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 1a82d2758e4..775974edb6c 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -475,7 +475,7 @@ class AccountancyExport
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
if (! empty($data->date_echeance))
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
- $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy
+ $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
else
$Tab['date_echeance'] = '000000';
diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php
index 6e8824c5a23..bf3594e967d 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -226,7 +226,7 @@ class BookKeeping extends CommonObject
$langs->loadLangs(array("errors"));
if (in_array($this->doc_type, array('bank', 'expense_report')))
{
- $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
+ $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type);
}
else
{
@@ -248,7 +248,7 @@ class BookKeeping extends CommonObject
// First check if line not yet already in bookkeeping.
// Note that we must include doc_type - fk_doc - numero_compte - label to be sure to have unicity of line (we may have several lines
- // with same doc_type, fk_odc, numero_compte for 1 invoice line when using localtaxes with same account)
+ // with same doc_type, fk_doc, numero_compte for 1 invoice line when using localtaxes with same account)
// WARNING: This is not reliable, label may have been modified. This is just a small protection.
// The page to make journalization make the test on couple doc_type - fk_doc only.
$sql = "SELECT count(*) as nb";
@@ -1700,11 +1700,11 @@ class BookKeeping extends CommonObject
$error++;
}
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element.'(doc_date, doc_type,';
- $sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
+ $sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num)';
$sql .= 'SELECT doc_date, doc_type,';
- $sql .= ' doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,';
+ $sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.$next_piecenum.'';
$sql .= ' FROM '.MAIN_DB_PREFIX . $this->table_element.'_tmp WHERE piece_num = '.$piece_num;
diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php
index 1611de1e4ee..c6434da6388 100644
--- a/htdocs/accountancy/journal/purchasesjournal.php
+++ b/htdocs/accountancy/journal/purchasesjournal.php
@@ -633,12 +633,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
@@ -654,12 +654,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '""' . $sep;
- print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
@@ -679,12 +679,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '""' . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
- print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
+ print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
@@ -700,12 +700,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
- print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
+ print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 9629b8572fc..b9a2d15c5cd 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -1297,7 +1297,7 @@ else
print "\n";
// Categories
- if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
+ if (! empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire))
{
print '' . $form->editfieldkey("Categories", 'memcats', '', $object, 0) . ' ';
print '';
diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php
index 6d09ccac022..2f4040b254f 100644
--- a/htdocs/adherents/type.php
+++ b/htdocs/adherents/type.php
@@ -608,7 +608,7 @@ if ($rowid > 0)
print " \n";
print '';
- print_liste_field_titre( $langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
+ print_liste_field_titre("NameSlashCompany", $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index f9f4896da79..878a1081b40 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -493,7 +493,7 @@ if ($action == 'edit' || $action == 'updateedit')
print ' '.$langs->transcountry("ProfId2", $mysoc->country_code).' ';
if (! empty($mysoc->country_code))
{
- print ' ';
+ print ' ';
}
else
{
diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php
index 41c1c990d39..a946aeeacfd 100644
--- a/htdocs/admin/defaultvalues.php
+++ b/htdocs/admin/defaultvalues.php
@@ -352,7 +352,6 @@ if ($result)
{
$obj = $db->fetch_object($result);
-
print "\n";
print ' ';
@@ -383,10 +382,7 @@ if ($result)
print '';
}
- if (! empty($conf->multicompany->enabled) && !$user->entity)
- {
- print ' ';
- }
+ print ' ';
// Actions
print '';
@@ -416,7 +412,6 @@ else
dol_print_error($db);
}
-
print '';
print '';
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index a21eb56cb2c..b3a9f037e95 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -262,20 +262,20 @@ class Dolistore
if ($this->version_compare($product->dolibarr_min, DOL_VERSION) <= 0) {
if ($this->version_compare($product->dolibarr_max, DOL_VERSION) >= 0) {
//compatible
- $version = ''.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
+ $version = ''.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
$product->dolibarr_min, $product->dolibarr_max).' ';
- $compatible = '';
+ $compatible = '';
} else {
//never compatible, module expired
- $version = ''.$langs->trans('NotCompatible', DOL_VERSION,
+ $version = ''.$langs->trans('NotCompatible', DOL_VERSION,
$product->dolibarr_min, $product->dolibarr_max).' ';
- $compatible = 'NotCompatible';
+ $compatible = 'NotCompatible';
}
} else {
//need update
$version = ''.$langs->trans('CompatibleAfterUpdate', DOL_VERSION,
$product->dolibarr_min, $product->dolibarr_max).' ';
- $compatible = 'NotCompatible';
+ $compatible = 'NotCompatible';
}
//.''.$langs->trans("SeeInMarkerPlace").'
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index a66f3d8e4ef..a407edd3864 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -207,7 +207,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
}
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
- $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
+$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
$conf->entity);
if (!$res > 0) {
diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php
index dc3b715fc21..99f52dbad1f 100644
--- a/htdocs/admin/menus/index.php
+++ b/htdocs/admin/menus/index.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2007 Patrick Raguin
* Copyright (C) 2007-2012 Laurent Destailleur
* Copyright (C) 2009-2012 Regis Houssin
+ * Copyright (C) 2019 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -256,7 +257,7 @@ if ($action == 'delete')
print '';
diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php
index 261ff283102..c414eca8158 100644
--- a/htdocs/admin/supplier_order.php
+++ b/htdocs/admin/supplier_order.php
@@ -170,7 +170,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
{
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string
$doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha');
- $doubleapproval = price2num($doubleapproval );
+ $doubleapproval = price2num($doubleapproval);
$res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
$res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED", $doubleapproval, 'chaine', 0, '', $conf->entity);
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 577b15579ed..cea8c4b5174 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -281,10 +281,10 @@ if ($mode == 'overwrite')
print '';
print '
';
print '';
- print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("NewTranslationStringToShow", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
- //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
+ //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
print ' ';
print " \n";
@@ -470,10 +470,10 @@ if ($mode == 'searchkey')
print '';
print '
';
print '';
- print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'';
+ print_liste_field_titre("Language_en_US_es_MX_etc", $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'';
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
- //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity",$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
+ //if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], 'entity,transkey', '', $param, '', $sortfield, $sortorder);
print ' ';
print " \n";
diff --git a/htdocs/api/README.md b/htdocs/api/README.md
index 0b773888882..7ab85cc26bb 100644
--- a/htdocs/api/README.md
+++ b/htdocs/api/README.md
@@ -43,7 +43,7 @@ Develop an API
The API uses Lucarast Restler framework. Please check documentation https://www.luracast.com/products/restler and examples http://help.luracast.com/restler/examples/
-Github contains also usefull informations : https://github.com/Luracast/Restler
+Github contains also useful information : https://github.com/Luracast/Restler
To implement it into Dolibarr, you need to create a specific class for object we want to use. A skeleton file is available into /modulebuilder/class directory : *api_mymodule_class.class.php*
The API class file must be put into object class directory, with specific file name. By example, API class file for '*myobject*' must be put as : /htdocs/*myobject*/class/api_*myobject*.class.php. Class must be named **MyobjectApi**.
@@ -67,6 +67,6 @@ It is possible to specify url for API methods by simply use the PHPDoc tag **@ur
**Other Annotations**
Other annotations are used, you are encouraged to read them : https://github.com/Luracast/Restler/blob/master/ANNOTATIONS.md
-PHPDoc tags can also be used to specify variables informations for API. Again, rtfm : https://github.com/Luracast/Restler/blob/master/PARAM.md
+PHPDoc tags can also be used to specify variables information for API. Again, rtfm : https://github.com/Luracast/Restler/blob/master/PARAM.md
diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php
index e50e6db86d2..6db5edf4646 100644
--- a/htdocs/blockedlog/class/authority.class.php
+++ b/htdocs/blockedlog/class/authority.class.php
@@ -161,7 +161,7 @@ class BlockedLogAuthority
$sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b";
if ($id) $sql.= " WHERE b.rowid = ". $id;
- elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ;
+ elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape($signature) ."'" ;
$resql=$this->db->query($sql);
if ($resql)
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index ce0cd81622f..9c7baa0634a 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -394,7 +394,7 @@ class BlockedLog
// Add more fields to exclude depending on object type
if ($this->element == 'cashcontrol')
{
- $arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
+ $arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
'name','lastname','firstname','region','region_id','region_code','state','state_id','state_code','country','country_id','country_code',
'total_ht','total_tva','total_ttc','total_localtax1','total_localtax2',
'barcode_type','barcode_type_code','barcode_type_label','barcode_type_coder','mode_reglement_id','cond_reglement_id','mode_reglement','cond_reglement','shipping_method_id',
@@ -459,7 +459,7 @@ class BlockedLog
$lineid++;
foreach($tmpline as $keyline => $valueline)
{
- if (! in_array($keyline, array(
+ if (! in_array($keyline, array(
'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2'
))) continue; // Discard if not into a dedicated list
@@ -575,7 +575,7 @@ class BlockedLog
foreach($tmpobject->thirdparty as $key=>$value)
{
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
- if (! in_array($key, array(
+ if (! in_array($key, array(
'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode',
'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
))) continue; // Discard if not into a dedicated list
@@ -592,7 +592,7 @@ class BlockedLog
foreach($tmpobject as $key=>$value)
{
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
- if (! in_array($key, array(
+ if (! in_array($key, array(
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
))) continue; // Discard if not into a dedicated list
if (!is_object($value))
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 1d05f7035dc..20d9a862f33 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -701,10 +701,10 @@ class Categorie extends CommonObject
// For backward compatibility
if ($type == 'societe') {
$type = 'customer';
- dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
+ dol_syslog(get_class($this) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
} elseif ($type == 'fournisseur') {
$type = 'supplier';
- dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
+ dol_syslog(get_class($this) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
}
$this->db->begin();
@@ -758,7 +758,7 @@ class Categorie extends CommonObject
$sql = "SELECT c.fk_" . $this->MAP_CAT_FK[$type];
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as c";
$sql .= ", " . MAIN_DB_PREFIX . $this->MAP_OBJ_TABLE[$type] . " as o";
- $sql .= " WHERE o.entity IN (" . getEntity( $obj->element).")";
+ $sql .= " WHERE o.entity IN (" . getEntity($obj->element).")";
$sql.= " AND c.fk_categorie = ".$this->id;
$sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid";
@@ -775,7 +775,7 @@ class Categorie extends CommonObject
else
{
$obj = new $this->MAP_OBJ_CLASS[$type]( $this->db );
- $obj->fetch( $rec['fk_' . $this->MAP_CAT_FK[$type]]);
+ $obj->fetch($rec['fk_' . $this->MAP_CAT_FK[$type]]);
$objs[] = $obj;
}
}
@@ -1008,7 +1008,7 @@ class Categorie extends CommonObject
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans";
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c";
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'";
- $sql .= " WHERE c.entity IN (" . getEntity( 'category') . ")";
+ $sql .= " WHERE c.entity IN (" . getEntity('category') . ")";
$sql .= " AND c.type = " . $type;
dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG);
@@ -1418,7 +1418,7 @@ class Categorie extends CommonObject
$sql = "SELECT ct.fk_categorie, c.label, c.rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c";
$sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . (int) $id . " AND c.type = " . $this->MAP_ID[$type];
- $sql .= " AND c.entity IN (" . getEntity( 'category') . ")";
+ $sql .= " AND c.entity IN (" . getEntity('category') . ")";
$res = $this->db->query($sql);
if ($res)
@@ -1470,16 +1470,16 @@ class Categorie extends CommonObject
// For backward compatibility
if (is_numeric($type)) {
// We want to reverse lookup
- $map_type = array_flip( $this->MAP_ID );
+ $map_type = array_flip($this->MAP_ID);
$type = $map_type[$type];
- dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead",
+dol_syslog( get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead",
LOG_WARNING );
}
// Generation requete recherche
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "categorie";
$sql .= " WHERE type = " . $this->MAP_ID[$type];
- $sql .= " AND entity IN (" . getEntity( 'category') . ")";
+ $sql .= " AND entity IN (" . getEntity('category') . ")";
if ($nom)
{
if (! $exact)
diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php
index c99b72082dc..df300961fb1 100644
--- a/htdocs/categories/photos.php
+++ b/htdocs/categories/photos.php
@@ -77,7 +77,7 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sen
{
if(empty($file['tmp_name'][$i]) || intval($conf->global->MAIN_UPLOAD_DOC) * 1000 <= filesize($file['tmp_name'][$i]) )
{
- setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles' ) );
+ setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles'));
unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]);
}
}
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index 02de73eeb0a..f157c90f95d 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -58,7 +58,7 @@ class ActionCommReminder extends CommonObject
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing)
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
* 'index' if we want an index in database.
- * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
+ * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommended to name the field fk_...).
* 'position' is the sort order of field.
* 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
* 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php
index 1f4d3d7fc95..d005549636c 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -109,7 +109,7 @@ class ICal
$this->file_text = preg_split("[\n]", $this->file_text);
- // is this text vcalendar standart text ? on line 1 is BEGIN:VCALENDAR
+ // is this text vcalendar standard text ? on line 1 is BEGIN:VCALENDAR
if (!stristr($this->file_text[0], 'BEGIN:VCALENDAR')) return 'error not VCALENDAR';
$insidealarm=0;
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 79f53316e2e..a30bbf5e4b4 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -487,7 +487,7 @@ if ($object->id > 0)
$langs->load("categories");
print '' . $langs->trans("CustomersCategoriesShort") . ' ';
print '';
- print $form->showCategories( $object->id, 'customer', 1 );
+ print $form->showCategories($object->id, 'customer', 1);
print " ";
}
diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
index a69af815595..26b16e50d68 100644
--- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
@@ -64,17 +64,17 @@ class FormAdvTargetEmailing extends Form
$sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel";
$sql .= " WHERE active > 0";
$sql .= " ORDER BY sortorder";
- dol_syslog ( get_class( $this ) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG );
- $resql = $this->db->query( $sql );
+ dol_syslog (get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG);
+ $resql = $this->db->query($sql);
if ($resql) {
- $num = $this->db->num_rows( $resql );
+ $num = $this->db->num_rows($resql);
$i = 0;
while ( $i < $num ) {
- $obj = $this->db->fetch_object( $resql );
+ $obj = $this->db->fetch_object($resql);
- $level = $langs->trans( $obj->code );
+ $level = $langs->trans($obj->code);
if ($level == $obj->code)
- $level = $langs->trans( $obj->label );
+ $level = $langs->trans($obj->label);
$options_array[$obj->code] = $level;
$i ++;
@@ -120,10 +120,10 @@ class FormAdvTargetEmailing extends Form
$foundselected = false;
while ($i < $num) {
- $obj = $this->db->fetch_object ( $resql );
+ $obj = $this->db->fetch_object ($resql);
$countryArray [$i] ['rowid'] = $obj->rowid;
$countryArray [$i] ['code_iso'] = $obj->code_iso;
- $countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso ) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ( "Country" . $obj->code_iso ) : ($obj->label != '-' ? $obj->label : ''));
+ $countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ("Country" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
$label[$i] = $countryArray[$i]['label'];
$i ++;
}
@@ -166,25 +166,25 @@ class FormAdvTargetEmailing extends Form
$sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")";
$sql_usr .= " AND u2.rowid = sc.fk_user ";
- if (! empty ( $conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX ))
+ if (! empty ($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX))
$sql_usr .= " AND u2.statut<>0 ";
$sql_usr .= " ORDER BY name ASC";
// print $sql_usr;exit;
- $resql_usr = $this->db->query ( $sql_usr );
+ $resql_usr = $this->db->query ($sql_usr);
if ($resql_usr) {
- while ( $obj_usr = $this->db->fetch_object ( $resql_usr ) ) {
+ while ( $obj_usr = $this->db->fetch_object ($resql_usr) ) {
$label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')';
$options_array [$obj_usr->rowid] = $label;
}
- $this->db->free ( $resql_usr );
+ $this->db->free ($resql_usr);
} else {
- dol_print_error ( $this->db );
+ dol_print_error ($this->db);
}
- return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
+ return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
}
/**
@@ -227,8 +227,8 @@ class FormAdvTargetEmailing extends Form
if (is_array($sqlqueryparam))
{
- $param_list = array_keys ( $sqlqueryparam );
- $InfoFieldList = explode ( ":", $param_list [0] );
+ $param_list = array_keys ($sqlqueryparam);
+ $InfoFieldList = explode (":", $param_list [0]);
// 0 1 : tableName
// 1 2 : label field name Nom du champ contenant le libelle
@@ -237,8 +237,8 @@ class FormAdvTargetEmailing extends Form
$keyList = 'rowid';
- if (count ( $InfoFieldList ) >= 3) {
- if (strpos ( $InfoFieldList [3], 'extra.' ) !== false) {
+ if (count ($InfoFieldList) >= 3) {
+ if (strpos ($InfoFieldList [3], 'extra.') !== false) {
$keyList = 'main.' . $InfoFieldList [2] . ' as rowid';
} else {
$keyList = $InfoFieldList [2] . ' as rowid';
@@ -247,10 +247,10 @@ class FormAdvTargetEmailing extends Form
$sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1];
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0];
- if (! empty ( $InfoFieldList [3] )) {
+ if (! empty ($InfoFieldList [3])) {
// We have to join on extrafield table
- if (strpos ( $InfoFieldList [3], 'extra' ) !== false) {
+ if (strpos ($InfoFieldList [3], 'extra') !== false) {
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra';
$sql .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3];
} else {
@@ -270,13 +270,13 @@ class FormAdvTargetEmailing extends Form
$i = 0;
if ($num) {
while ( $i < $num ) {
- $obj = $this->db->fetch_object ( $resql );
- $labeltoshow = dol_trunc ( $obj->$InfoFieldList [1], 90 );
+ $obj = $this->db->fetch_object ($resql);
+ $labeltoshow = dol_trunc ($obj->$InfoFieldList [1], 90);
$options_array[$obj->rowid]=$labeltoshow;
$i ++;
}
}
- $this->db->free ( $resql );
+ $this->db->free ($resql);
}
}
@@ -328,7 +328,7 @@ class FormAdvTargetEmailing extends Form
dol_print_error($this->db);
}
- return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
+ return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
}
/**
@@ -415,7 +415,7 @@ class FormAdvTargetEmailing extends Form
dol_print_error($this->db);
}
- return $this->advMultiselectarray( $htmlname, $options_array, $selected_array );
+ return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
}
/**
@@ -438,19 +438,19 @@ class FormAdvTargetEmailing extends Form
$sql .= " WHERE type_element='$type_element'";
$sql .= " ORDER BY c.name";
- dol_syslog ( get_class ( $this ) . "::".__METHOD__, LOG_DEBUG );
- $resql = $this->db->query ( $sql );
+ dol_syslog (get_class ($this) . "::".__METHOD__, LOG_DEBUG);
+ $resql = $this->db->query ($sql);
if ($resql) {
$out .= '';
if ($showempty)
$out .= ' ';
- $num = $this->db->num_rows ( $resql );
+ $num = $this->db->num_rows ($resql);
$i = 0;
if ($num) {
while ( $i < $num ) {
- $obj = $this->db->fetch_object ( $resql );
+ $obj = $this->db->fetch_object ($resql);
$label = $obj->name;
if (empty($label)) {
$label=$obj->fk_element;
@@ -466,9 +466,9 @@ class FormAdvTargetEmailing extends Form
}
$out .= ' ';
} else {
- dol_print_error ( $this->db );
+ dol_print_error ($this->db);
}
- $this->db->free ( $resql );
+ $this->db->free ($resql);
return $out;
}
}
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index 280baebbe5b..580a36425c8 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -528,7 +528,7 @@ class Mailing extends CommonObject
/**
- * Return a link to the object card (with optionaly the picto)
+ * Return a link to the object card (with optionally the picto)
*
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param string $option On what the link point to ('nolink', ...)
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 5a0993a08d1..ac64f65381c 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -165,7 +165,7 @@ if (empty($reshook))
if ($object->id > 0) {
if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) {
//Get difference between old and new delivery date and change lines according to difference
- $date_delivery = dol_mktime(12, 0, 0,
+ $date_delivery = dol_mktime(12, 0, 0,
GETPOST('date_deliverymonth', 'int'),
GETPOST('date_deliveryday', 'int'),
GETPOST('date_deliveryyear', 'int')
@@ -173,7 +173,7 @@ if (empty($reshook))
if (!empty($object->date_livraison) && !empty($date_delivery))
{
//Attempt to get the date without possible hour rounding errors
- $old_date_delivery = dol_mktime(12, 0, 0,
+ $old_date_delivery = dol_mktime(12, 0, 0,
dol_print_date($object->date_livraison, '%m'),
dol_print_date($object->date_livraison, '%d'),
dol_print_date($object->date_livraison, '%Y')
@@ -724,7 +724,7 @@ if (empty($reshook))
{
$lineId = intval($lineId);
$originLine = new $lineClassName($db);
- if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
+ if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
{
$originLine->fetch_optionals($lineId);
$desc = $originLine->desc;
@@ -1895,7 +1895,7 @@ if ($action == 'create')
{
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
$notify = new Notify($db);
- $formquestion = array_merge($formquestion, array(
+$formquestion = array_merge($formquestion, array(
array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
));
}
diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php
index ac0fc2ccd8c..59d294f19ef 100644
--- a/htdocs/comm/propal/class/api_proposals.class.php
+++ b/htdocs/comm/propal/class/api_proposals.class.php
@@ -665,7 +665,7 @@ class Proposals extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
- $result = $this->propal->classifyBilled(DolibarrApiAccess::$user );
+ $result = $this->propal->classifyBilled(DolibarrApiAccess::$user);
if ($result < 0) {
throw new RestException(500, 'Error : '.$this->propal->error);
}
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 46a5352ed53..f660fd3c533 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -667,7 +667,7 @@ class Propal extends CommonObject
{
global $mysoc;
- dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
+dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end");
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
@@ -1078,7 +1078,7 @@ class Propal extends CommonObject
$vatrate = $line->tva_tx;
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
- $result = $this->addline(
+ $result = $this->addline(
$line->desc,
$line->subprice,
$line->qty,
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 8f6c3fa84f5..45c10a3aedd 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -1347,7 +1347,7 @@ if (empty($reshook))
{
$lineId = intval($lineId);
$originLine = new $lineClassName($db);
- if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
+ if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
{
$originLine->fetch_optionals($lineId);
$desc = $originLine->desc;
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index faad0e8f4d0..8272b2534bf 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -885,7 +885,7 @@ class Commande extends CommonOrder
$vatrate = $line->tva_tx;
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
- $result = $this->addline(
+ $result = $this->addline(
$line->desc,
$line->subprice,
$line->qty,
diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php
index 9c6d83e3dfe..fe017a6b1aa 100644
--- a/htdocs/commande/orderstoinvoice.php
+++ b/htdocs/commande/orderstoinvoice.php
@@ -290,7 +290,7 @@ if (($action == 'create' || $action == 'add') && !$error)
$array_options = $lines[$i]->array_options;
}
- $result = $object->addline(
+ $result = $object->addline(
$desc,
$lines[$i]->subprice,
$lines[$i]->qty,
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index edd0f35c442..ece5a6580de 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -120,14 +120,15 @@ if ($id > 0 || ! empty($ref))
{
$result=$object->fetch($id, $ref);
$search_account = $object->id; // Force the search field on id of account
+
+ if (! ($object->id > 0) )
+ {
+ $langs->load("errors");
+ print($langs->trans('ErrorRecordNotFound'));
+ exit;
+ }
}
-if (! ($object->id > 0) )
-{
- $langs->load("errors");
- print($langs->trans('ErrorRecordNotFound'));
- exit;
-}
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('banktransactionlist', $contextpage));
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 84f6a4bacb1..1c7a0c977a8 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1614,7 +1614,7 @@ class Account extends CommonObject
//Replace the old AccountNumber key with the new BankAccountNumber key
$fieldlists = explode(
' ',
- preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
+ preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
$conf->global->BANK_SHOW_ORDER_OPTION)
);
}
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index 5d6c1408a57..06de0a00bc1 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2017-2019 Alexandre Spangaro
* Copyright (C) 2018 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
@@ -71,6 +71,8 @@ class PaymentVarious extends CommonObject
public $accountancy_code;
+ public $subledger_account;
+
/**
* @var int ID
*/
@@ -139,6 +141,7 @@ class PaymentVarious extends CommonObject
$sql.= " label='".$this->db->escape($this->label)."',";
$sql.= " note='".$this->db->escape($this->note)."',";
$sql.= " accountancy_code='".$this->db->escape($this->accountancy_code)."',";
+ $sql.= " subledger_account='".$this->db->escape($this->subledger_account)."',";
$sql.= " fk_projet='".$this->db->escape($this->fk_project)."',";
$sql.= " fk_bank=".($this->fk_bank > 0 ? $this->fk_bank:"null").",";
$sql.= " fk_user_author=".$this->fk_user_author.",";
@@ -196,6 +199,7 @@ class PaymentVarious extends CommonObject
$sql.= " v.label,";
$sql.= " v.note,";
$sql.= " v.accountancy_code,";
+ $sql.= " v.subledger_account,";
$sql.= " v.fk_projet as fk_project,";
$sql.= " v.fk_bank,";
$sql.= " v.fk_user_author,";
@@ -215,25 +219,26 @@ class PaymentVarious extends CommonObject
{
$obj = $this->db->fetch_object($resql);
- $this->id = $obj->rowid;
- $this->ref = $obj->rowid;
- $this->tms = $this->db->jdate($obj->tms);
- $this->datep = $this->db->jdate($obj->datep);
- $this->datev = $this->db->jdate($obj->datev);
- $this->sens = $obj->sens;
- $this->amount = $obj->amount;
- $this->type_payment = $obj->fk_typepayment;
- $this->num_payment = $obj->num_payment;
- $this->label = $obj->label;
- $this->note = $obj->note;
- $this->accountancy_code = $obj->accountancy_code;
- $this->fk_project = $obj->fk_project;
- $this->fk_bank = $obj->fk_bank;
- $this->fk_user_author = $obj->fk_user_author;
- $this->fk_user_modif = $obj->fk_user_modif;
- $this->fk_account = $obj->fk_account;
- $this->fk_type = $obj->fk_type;
- $this->rappro = $obj->rappro;
+ $this->id = $obj->rowid;
+ $this->ref = $obj->rowid;
+ $this->tms = $this->db->jdate($obj->tms);
+ $this->datep = $this->db->jdate($obj->datep);
+ $this->datev = $this->db->jdate($obj->datev);
+ $this->sens = $obj->sens;
+ $this->amount = $obj->amount;
+ $this->type_payment = $obj->fk_typepayment;
+ $this->num_payment = $obj->num_payment;
+ $this->label = $obj->label;
+ $this->note = $obj->note;
+ $this->subledger_account = $obj->subledger_account;
+ $this->accountancy_code = $obj->accountancy_code;
+ $this->fk_project = $obj->fk_project;
+ $this->fk_bank = $obj->fk_bank;
+ $this->fk_user_author = $obj->fk_user_author;
+ $this->fk_user_modif = $obj->fk_user_modif;
+ $this->fk_account = $obj->fk_account;
+ $this->fk_type = $obj->fk_type;
+ $this->rappro = $obj->rappro;
}
$this->db->free($resql);
@@ -298,6 +303,7 @@ class PaymentVarious extends CommonObject
$this->amount='';
$this->label='';
$this->accountancy_code='';
+ $this->subledger_account='';
$this->note='';
$this->fk_bank='';
$this->fk_user_author='';
@@ -360,6 +366,7 @@ class PaymentVarious extends CommonObject
if ($this->note) $sql.= ", note";
$sql.= ", label";
$sql.= ", accountancy_code";
+ $sql.= ", subledger_account";
$sql.= ", fk_projet";
$sql.= ", fk_user_author";
$sql.= ", datec";
@@ -376,6 +383,7 @@ class PaymentVarious extends CommonObject
if ($this->note) $sql.= ", '".$this->db->escape($this->note)."'";
$sql.= ", '".$this->db->escape($this->label)."'";
$sql.= ", '".$this->db->escape($this->accountancy_code)."'";
+ $sql.= ", '".$this->db->escape($this->subledger_account)."'";
$sql.= ", ".($this->fk_project > 0? $this->fk_project : 0);
$sql.= ", ".$user->id;
$sql.= ", '".$this->db->idate($now)."'";
@@ -406,7 +414,7 @@ class PaymentVarious extends CommonObject
$sign=1;
if ($this->sens == '0') $sign=-1;
- $bank_line_id = $acc->addline(
+ $bank_line_id = $acc->addline(
$this->datep,
$this->type_payment,
$this->label,
diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php
index 43e30a8e71b..429603ed4fc 100644
--- a/htdocs/compta/bank/various_payment/card.php
+++ b/htdocs/compta/bank/various_payment/card.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2017-2019 Alexandre Spangaro
* Copyright (C) 2018 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
@@ -48,9 +48,10 @@ $backtopage = GETPOST('backtopage', 'alpha');
$accountid=GETPOST("accountid") > 0 ? GETPOST("accountid", "int") : 0;
$label=GETPOST("label", "alpha");
$sens=GETPOST("sens", "int");
-$amount=GETPOST("amount");
-$paymenttype=GETPOST("paymenttype");
+$amount=GETPOST("amount", "alpha");
+$paymenttype=GETPOST("paymenttype", "int");
$accountancy_code=GETPOST("accountancy_code", "int");
+$subledger_account=GETPOST("subledger_account", "int");
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
// Security check
@@ -112,7 +113,10 @@ if (empty($reshook))
$object->type_payment=GETPOST("paymenttype", 'int') > 0 ? GETPOST("paymenttype", "int") : 0;
$object->num_payment=GETPOST("num_payment", 'alpha');
$object->fk_user_author=$user->id;
+
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "int") : "";
+ $object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "int") : "";
+
$object->sens=GETPOST('sens');
$object->fk_project= GETPOST('fk_project', 'int');
@@ -325,6 +329,28 @@ if ($action == 'create')
print '';
}
+ // Subledger account
+ if (! empty($conf->accounting->enabled))
+ {
+ print ''.$langs->trans("SubledgerAccount").' ';
+ print '';
+ if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
+ {
+ print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, '');
+ }
+ else
+ {
+ print ' ';
+ }
+ print ' ';
+ }
+ else // For external software
+ {
+ print ''.$langs->trans("SubledgerAccount").' ';
+ print ' ';
+ print ' ';
+ }
+
// Project
if (! empty($conf->projet->enabled))
{
@@ -447,6 +473,13 @@ if ($id)
}
print '';
+ // Subledger account
+ print '';
+ print $langs->trans("SubledgerAccount");
+ print ' ';
+ print $object->subledger_account;
+ print ' ';
+
if (! empty($conf->banque->enabled))
{
if ($object->fk_account > 0)
diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php
index 4a9ccec2672..58cb526d566 100644
--- a/htdocs/compta/bank/various_payment/document.php
+++ b/htdocs/compta/bank/various_payment/document.php
@@ -82,7 +82,7 @@ if ($object->id)
{
$head=various_payment_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, 'payment');
+ dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, 'payment');
$morehtmlref='';
// Project
diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 8ff14a88f79..54e1d285f3e 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -463,7 +463,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
print "
";
- print load_fiche_titre( $langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
+ print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
$sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, s.fk_bank, u.salary as current_salary,";
$sql.= " pct.code as payment_code,";
diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php
index 44472a7dba3..c94a527d575 100644
--- a/htdocs/compta/deplacement/document.php
+++ b/htdocs/compta/deplacement/document.php
@@ -88,7 +88,7 @@ if ($object->id)
$head=trip_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
+ dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
// Build file list
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 47ad635977e..80951464d7b 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -1449,7 +1449,7 @@ if (empty($reshook))
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty);
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty);
- $result = $object->addline(
+ $result = $object->addline(
$desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product,
$lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except,
'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid,
@@ -2118,7 +2118,7 @@ if (empty($reshook))
}
}
- $result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
+$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
$date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type,
GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('progress'),
$_POST['units'], $pu_ht_devise);
@@ -2352,7 +2352,7 @@ if (empty($reshook))
{
$lineId = intval($lineId);
$originLine = new $lineClassName($db);
- if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
+ if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
{
$originLine->fetch_optionals($lineId);
$desc = $originLine->desc;
diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php
index 555b6179677..62b89ea213b 100644
--- a/htdocs/compta/facture/class/api_invoices.class.php
+++ b/htdocs/compta/facture/class/api_invoices.class.php
@@ -337,7 +337,7 @@ class Invoices extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$request_data = (object) $request_data;
- $updateRes = $this->invoice->updateline(
+ $updateRes = $this->invoice->updateline(
$lineid,
$request_data->desc,
$request_data->subprice,
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 3ee1a5fd977..8707b73262f 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -225,7 +225,7 @@ class FactureRec extends CommonInvoice
$tva_tx = $facsrc->lines[$i]->tva_tx;
if (! empty($facsrc->lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$facsrc->lines[$i]->vat_src_code.')';
- $result_insert = $this->addline(
+ $result_insert = $this->addline(
$facsrc->lines[$i]->desc,
$facsrc->lines[$i]->subprice,
$facsrc->lines[$i]->qty,
@@ -1858,7 +1858,7 @@ class FactureLigneRec extends CommonInvoiceLine
}
$sql.= ", rang=".$this->rang;
$sql.= ", special_code=".$this->special_code;
- $sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit )."'":"null");
+ $sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit)."'":"null");
$sql.= ", fk_contract_line=".($this->fk_contract_line?$this->fk_contract_line:"null");
$sql.= " WHERE rowid = ".$this->id;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 96e6b649a69..8233a50aca3 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -675,7 +675,7 @@ class Facture extends CommonInvoice
$vatrate = $line->tva_tx;
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
- $result = $this->addline(
+ $result = $this->addline(
$line->desc,
$line->subprice,
$line->qty,
@@ -749,7 +749,7 @@ class Facture extends CommonInvoice
$localtax1_tx = $_facrec->lines[$i]->localtax1_tx;
$localtax2_tx = $_facrec->lines[$i]->localtax2_tx;
- $result_insert = $this->addline(
+ $result_insert = $this->addline(
$_facrec->lines[$i]->desc,
$_facrec->lines[$i]->subprice,
$_facrec->lines[$i]->qty,
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 6fe0391d688..1e21952c2d1 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -855,7 +855,7 @@ if (empty($reshook))
// Update line
if (! $error)
{
- $result = $object->updateline(
+$result = $object->updateline(
GETPOST('lineid'),
$description,
$pu_ht,
@@ -1171,7 +1171,7 @@ if ($action == 'create')
if ($flag_price_may_change)
{
- print '
';
+ print ' ';
print '';
print ''.$langs->trans("AlwaysUseFixedPrice").' ';
print ''.$langs->trans("AlwaysUseNewPrice").' ';
@@ -1306,7 +1306,7 @@ else
print $langs->trans('PaymentConditionsShort');
print ' ';
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer)
- print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ' ';
+ print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ' ';
print '
';
print '
';
if ($object->type != Facture::TYPE_CREDIT_NOTE)
@@ -1330,7 +1330,7 @@ else
print $langs->trans('PaymentMode');
print ' ';
if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer)
- print '
id . '">' . img_edit($langs->trans('SetMode'), 1) . ' ';
+ print '
id . '">' . img_edit($langs->trans('SetMode'), 1) . ' ';
print '
';
print '
';
if ($action == 'editmode')
@@ -1393,7 +1393,7 @@ else
print $langs->trans('RIB');
print ' ';
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
- print ' id.'">'.img_edit($langs->trans('SetBankAccount'), 1).' ';
+ print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).' ';
print ' ';
print '';
if ($action == 'editbankaccount')
@@ -1415,7 +1415,7 @@ else
print $langs->trans('Model');
print ' ';
if (($action != 'editmodelpdf') && $user->rights->facture->creer && ! empty($object->brouillon))
- print ' id.'">'.img_edit($langs->trans('SetModel'), 1).' ';
+ print 'id.'">'.img_edit($langs->trans('SetModel'), 1).' ';
print '';
print '';
if ($action == 'editmodelpdf')
@@ -1464,7 +1464,7 @@ else
print $langs->trans('Frequency');
print ' ';
if ($action != 'editfrequency' && ! empty($object->brouillon) && $user->rights->facture->creer)
- print 'id . '">' . img_edit($langs->trans('Edit'), 1) . ' ';
+ print 'id . '">' . img_edit($langs->trans('Edit'), 1) . ' ';
print '';
print '';
if ($action == 'editfrequency')
diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php
index 795693998a7..9f9e3276542 100644
--- a/htdocs/compta/facture/invoicetemplate_list.php
+++ b/htdocs/compta/facture/invoicetemplate_list.php
@@ -348,47 +348,47 @@ if ($resql)
// Ref
if (! empty($arrayfields['f.titre']['checked']))
{
- print ' ';
+ print ' ';
print ' ';
print ' ';
}
// Thirpdarty
if (! empty($arrayfields['s.nom']['checked']))
{
- print ' ';
+ print ' ';
}
if (! empty($arrayfields['f.total']['checked']))
{
// Amount net
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.tva']['checked']))
{
// Amount Vat
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.total_ttc']['checked']))
{
// Amount
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
{
// Payment term
- print '';
+ print ' ';
print $form->select_conditions_paiements($search_payment_term, 'search_payment_term', -1, 1, 1, 'maxwidth100');
print " ";
}
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
// Payment mode
- print '';
+ print ' ';
print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100');
print ' ';
}
@@ -479,12 +479,12 @@ if ($resql)
print '';
if (! empty($arrayfields['f.titre']['checked'])) print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['f.total']['checked'])) print_liste_field_titre($arrayfields['f.total']['label'], $_SERVER['PHP_SELF'], "f.total", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.tva']['checked'])) print_liste_field_titre($arrayfields['f.tva']['label'], $_SERVER['PHP_SELF'], "f.tva", "", $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total']['checked'])) print_liste_field_titre($arrayfields['f.total']['label'], $_SERVER['PHP_SELF'], "f.total", "", $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.tva']['checked'])) print_liste_field_titre($arrayfields['f.tva']['label'], $_SERVER['PHP_SELF'], "f.tva", "", $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
if (! empty($arrayfields['f.fk_cond_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_cond_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_cond_reglement", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER['PHP_SELF'], "f.fk_mode_reglement", "", $param, '', $sortfield, $sortorder);
- if (! empty($arrayfields['recurring']['checked'])) print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'align="center"', $sortfield, $sortorder);
+ if (! empty($arrayfields['recurring']['checked'])) print_liste_field_titre($arrayfields['recurring']['label'], $_SERVER['PHP_SELF'], "recurring", "", $param, 'class="center"', $sortfield, $sortorder);
if (! empty($arrayfields['f.frequency']['checked'])) print_liste_field_titre($arrayfields['f.frequency']['label'], $_SERVER['PHP_SELF'], "f.frequency", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['f.unit_frequency']['checked'])) print_liste_field_titre($arrayfields['f.unit_frequency']['label'], $_SERVER['PHP_SELF'], "f.unit_frequency", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['f.nb_gen_done']['checked'])) print_liste_field_titre($arrayfields['f.nb_gen_done']['label'], $_SERVER['PHP_SELF'], "f.nb_gen_done", "", $param, 'align="center"', $sortfield, $sortorder);
@@ -533,21 +533,21 @@ if ($resql)
}
if (! empty($arrayfields['f.total']['checked']))
{
- print ''.price($objp->total).' '."\n";
+ print ''.price($objp->total).' '."\n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total';
$totalarray['val']['f.total'] += $objp->total;
}
if (! empty($arrayfields['f.tva']['checked']))
{
- print ''.price($objp->total_vat).' '."\n";
+ print ''.price($objp->total_vat).' '."\n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.tva';
$totalarray['val']['f.tva'] += $objp->total_vat;
}
if (! empty($arrayfields['f.total_ttc']['checked']))
{
- print ''.price($objp->total_ttc).' '."\n";
+ print ''.price($objp->total_ttc).' '."\n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='f.total_ttc';
$totalarray['val']['f.total_ttc'] += $objp->total_ttc;
@@ -555,7 +555,7 @@ if ($resql)
// Payment term
if (! empty($arrayfields['f.fk_cond_reglement']['checked']))
{
- print '';
+ print ' ';
print $form->form_conditions_reglement('', $objp->fk_cond_reglement, 'none');
print ' '."\n";
if (! $i) $totalarray['nbfield']++;
@@ -563,7 +563,7 @@ if ($resql)
// Payment mode
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
- print '';
+ print ' ';
print $form->form_modes_reglement('', $objp->fk_mode_reglement, 'none');
print ' '."\n";
if (! $i) $totalarray['nbfield']++;
@@ -683,7 +683,7 @@ if ($resql)
while ($i < $totalarray['nbfield'])
{
$i++;
- if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).' ';
+ if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).' ';
else
{
if ($i == 1)
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 87301a4c9b6..3363caddeef 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest')
$error++;
setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings');
}
- elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){
+ elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE'){
$error++;
setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors');
}
@@ -779,46 +779,46 @@ if ($resql)
if (! empty($arrayfields['f.total_ht']['checked']))
{
// Amount
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.total_vat']['checked']))
{
// Amount
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.total_localtax1']['checked']))
{
// Localtax1
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.total_localtax2']['checked']))
{
// Localtax2
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['f.total_ttc']['checked']))
{
// Amount
- print '';
+ print ' ';
print ' ';
print ' ';
}
if (! empty($arrayfields['dynamount_payed']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
if (! empty($arrayfields['rtp']['checked']))
{
- print '';
+ print ' ';
print ' ';
}
// Extra fields
@@ -843,7 +843,7 @@ if ($resql)
// Status
if (! empty($arrayfields['f.fk_statut']['checked']))
{
- print '';
+ print ' ';
$liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled"));
print $form->selectarray('search_status', $liststatus, $search_status, 1);
print ' ';
@@ -869,13 +869,13 @@ if ($resql)
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
- if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'], $_SERVER['PHP_SELF'], 'f.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
@@ -884,7 +884,7 @@ if ($resql)
print $hookmanager->resPrint;
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
- if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type,dynamount_payed", "", $param, 'align="right"', $sortfield, $sortorder);
+ if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type,dynamount_payed", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print " \n";
@@ -1084,7 +1084,7 @@ if ($resql)
// Amount HT
if (! empty($arrayfields['f.total_ht']['checked']))
{
- print ''.price($obj->total_ht)." \n";
+ print ''.price($obj->total_ht)." \n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalhtfield']=$totalarray['nbfield'];
$totalarray['totalht'] += $obj->total_ht;
@@ -1092,7 +1092,7 @@ if ($resql)
// Amount VAT
if (! empty($arrayfields['f.total_vat']['checked']))
{
- print ''.price($obj->total_vat)." \n";
+ print ''.price($obj->total_vat)." \n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield'];
$totalarray['totalvat'] += $obj->total_vat;
@@ -1100,7 +1100,7 @@ if ($resql)
// Amount LocalTax1
if (! empty($arrayfields['f.total_localtax1']['checked']))
{
- print ''.price($obj->total_localtax1)." \n";
+ print ''.price($obj->total_localtax1)." \n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield'];
$totalarray['totallocaltax1'] += $obj->total_localtax1;
@@ -1108,7 +1108,7 @@ if ($resql)
// Amount LocalTax2
if (! empty($arrayfields['f.total_localtax2']['checked']))
{
- print ''.price($obj->total_localtax2)." \n";
+ print ''.price($obj->total_localtax2)." \n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield'];
$totalarray['totallocaltax2'] += $obj->total_localtax2;
@@ -1116,7 +1116,7 @@ if ($resql)
// Amount TTC
if (! empty($arrayfields['f.total_ttc']['checked']))
{
- print ''.price($obj->total_ttc)." \n";
+ print ''.price($obj->total_ttc)." \n";
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
$totalarray['totalttc'] += $obj->total_ttc;
@@ -1124,7 +1124,7 @@ if ($resql)
if (! empty($arrayfields['dynamount_payed']['checked']))
{
- print ''.(! empty($totalpay)?price($totalpay, 0, $langs):' ').' '; // TODO Use a denormalized field
+ print ''.(! empty($totalpay)?price($totalpay, 0, $langs):' ').' '; // TODO Use a denormalized field
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
$totalarray['totalam'] += $totalpay;
@@ -1132,7 +1132,7 @@ if ($resql)
if (! empty($arrayfields['rtp']['checked']))
{
- print ''.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').' '; // TODO Use a denormalized field
+ print ''.(! empty($remaintopay)?price($remaintopay, 0, $langs):' ').' '; // TODO Use a denormalized field
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
$totalarray['totalrtp'] += $remaintopay;
@@ -1163,7 +1163,7 @@ if ($resql)
// Status
if (! empty($arrayfields['f.fk_statut']['checked']))
{
- print '';
+ print ' ';
print $facturestatic->LibStatut($obj->paye, $obj->fk_statut, 5, $paiement, $obj->type);
print " ";
if (! $i) $totalarray['nbfield']++;
@@ -1205,13 +1205,13 @@ if ($resql)
if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").' ';
else print ''.$langs->trans("Totalforthispage").' ';
}
- elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' ';
- elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).' ';
- elseif ($totalarray['totallocaltax1field'] == $i) print ''.price($totalarray['totallocaltax1']).' ';
- elseif ($totalarray['totallocaltax2field'] == $i) print ''.price($totalarray['totallocaltax2']).' ';
- elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).' ';
- elseif ($totalarray['totalamfield'] == $i) print ''.price($totalarray['totalam']).' ';
- elseif ($totalarray['totalrtpfield'] == $i) print ''.price($totalarray['totalrtp']).' ';
+ elseif ($totalarray['totalhtfield'] == $i) print ''.price($totalarray['totalht']).' ';
+ elseif ($totalarray['totalvatfield'] == $i) print ''.price($totalarray['totalvat']).' ';
+ elseif ($totalarray['totallocaltax1field'] == $i) print ''.price($totalarray['totallocaltax1']).' ';
+ elseif ($totalarray['totallocaltax2field'] == $i) print ''.price($totalarray['totallocaltax2']).' ';
+ elseif ($totalarray['totalttcfield'] == $i) print ''.price($totalarray['totalttc']).' ';
+ elseif ($totalarray['totalamfield'] == $i) print ''.price($totalarray['totalam']).' ';
+ elseif ($totalarray['totalrtpfield'] == $i) print ''.price($totalarray['totalrtp']).' ';
else print ' ';
}
print '';
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 9471df8655f..ccc3b305447 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -274,7 +274,7 @@ if ($object->id > 0)
print '';
print '';
@@ -301,7 +301,7 @@ if ($object->id > 0)
print '';
print ' ';
if ($object->type != Facture::TYPE_CREDIT_NOTE)
@@ -326,7 +326,7 @@ if ($object->id > 0)
print '';
print ' ';
if ($object->type != Facture::TYPE_CREDIT_NOTE)
@@ -354,7 +354,7 @@ if ($object->id > 0)
print '';
print ' ';
if ($action == 'editmode')
@@ -373,7 +373,7 @@ if ($object->id > 0)
print $langs->trans('BankAccount');
print ' ';
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
- print ' id.'">'.img_edit($langs->trans('SetBankAccount'), 1).' ';
+ print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).' ';
print '';
print '';
if ($action == 'editbankaccount')
@@ -447,7 +447,7 @@ if ($object->id > 0)
print ' ';
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer)
{
- print 'id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . ' ';
+ print 'id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . ' ';
}
print '';
print '';
@@ -615,7 +615,7 @@ if ($object->id > 0)
print ' '.$langs->trans("OrderWaiting").' ';
- print '';
+ print ' ';
print '';
print img_delete();
print ' ';
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index 687c31de036..db69324d5e5 100644
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -182,7 +182,7 @@ print "";
print "".$langs->trans("Date")." ";
print "".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").") ";
print "".$langs->trans("Account")." ";
-print "".$langs->trans("Type")." ".$langs->trans("Debit")." ".$langs->trans("Credit")." ";
+print "".$langs->trans("Type")." ".$langs->trans("Debit")." ".$langs->trans("Credit")." ";
print " \n";
@@ -236,13 +236,13 @@ foreach ($tabfac as $key => $val)
if (isset($line['inv']))
{
- print ''.($mt<0?price(-$mt):'')." ";
- print ''.($mt>=0?price($mt):'')." ";
+ print ''.($mt<0?price(-$mt):'')." ";
+ print ''.($mt>=0?price($mt):'')." ";
}
else
{
- print ''.($mt>=0?price($mt):'')." ";
- print ''.($mt<0?price(-$mt):'')." ";
+ print ''.($mt>=0?price($mt):'')." ";
+ print ''.($mt<0?price(-$mt):'')." ";
}
print "";
diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php
index fcd53a58ea3..ea5f54639a1 100644
--- a/htdocs/compta/journal/sellsjournal.php
+++ b/htdocs/compta/journal/sellsjournal.php
@@ -211,7 +211,7 @@ print '';
//print "".$langs->trans("JournalNum")." ";
print ''.$langs->trans('Date').' '.$langs->trans('Piece').' ('.$langs->trans('InvoiceRef').') ';
print ''.$langs->trans('Account').' ';
-print ''.$langs->trans('Type').' '.$langs->trans('Debit').' '.$langs->trans('Credit').' ';
+print ''.$langs->trans('Type').' '.$langs->trans('Debit').' '.$langs->trans('Credit').' ';
print " \n";
@@ -266,13 +266,13 @@ foreach ($tabfac as $key => $val)
if (isset($line['inv']))
{
- print ''.($mt>=0?price($mt):'')." ";
- print ''.($mt<0?price(-$mt):'')." ";
+ print ''.($mt>=0?price($mt):'')." ";
+ print ''.($mt<0?price(-$mt):'')." ";
}
else
{
- print ''.($mt<0?price(-$mt):'')." ";
- print ''.($mt>=0?price($mt):'')." ";
+ print ''.($mt<0?price(-$mt):'')." ";
+ print ''.($mt>=0?price($mt):'')." ";
}
print "";
diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php
index 8c6bdb0717b..58b1ccd3f21 100644
--- a/htdocs/compta/localtax/clients.php
+++ b/htdocs/compta/localtax/clients.php
@@ -157,13 +157,13 @@ $vatsup=$langs->transcountry($local==1?"LT1":"LT2", $mysoc->country_code);
// IRPF that the customer has retained me
if($calc ==0 || $calc == 2)
{
- print "";
- print "";
- print ''.$langs->trans("Num")." ";
- print ''.$langs->trans("Customer")." ";
- print "".$langs->transcountry("ProfId1", $mysoc->country_code)." ";
- print "".$langs->trans("TotalHT")." ";
- print "".$vatcust." ";
+ print '';
+ print '';
+ print ''.$langs->trans("Num").' ';
+ print ''.$langs->trans("Customer").' ';
+ print ''.$langs->transcountry("ProfId1", $mysoc->country_code).' ';
+ print ''.$langs->trans("TotalHT").' ';
+ print ''.$vatcust.' ';
print " \n";
$coll_list = tax_by_thirdparty('localtax'.$local, $db, 0, $date_start, $date_end, $modetax, 'sell');
@@ -208,9 +208,9 @@ if($calc ==0 || $calc == 2)
print ''.$company_static->getNomUrl(1).' ';
$find = array(' ','.');
$replace = array('','');
- print ''.$intra." ";
- print "".price($coll->amount)." ";
- print "".price($local==1?$coll->localtax1:$coll->localtax2)." ";
+ print ''.$intra.' ';
+ print ''.price($coll->amount).' ';
+ print ''.price($local==1?$coll->localtax1:$coll->localtax2).' ';
$totalamount = $totalamount + $coll->amount;
$total = $total + ($local==1?$coll->localtax1:$coll->localtax2);
print "\n";
@@ -219,9 +219,9 @@ if($calc ==0 || $calc == 2)
}
$x_coll_sum = $total;
- print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.$langs->trans("Total").': ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
}
else
@@ -238,13 +238,13 @@ if($calc ==0 || $calc == 2)
// IRPF I retained my supplier
if($calc ==0 || $calc == 1){
- print "";
- print "";
+ print '';
+ print '';
print ''.$langs->trans("Num")." ";
print ''.$langs->trans("Supplier")." ";
- print "".$langs->transcountry("ProfId1", $mysoc->country_code)." ";
- print "".$langs->trans("TotalHT")." ";
- print "".$vatsup." ";
+ print ''.$langs->transcountry("ProfId1", $mysoc->country_code).' ';
+ print ''.$langs->trans("TotalHT").' ';
+ print ''.$vatsup.' ';
print " \n";
$company_static=new Societe($db);
@@ -283,8 +283,8 @@ if($calc ==0 || $calc == 1){
$find = array(' ','.');
$replace = array('','');
print ''.$intra." ";
- print "".price($coll->amount)." ";
- print "".price($local==1?$coll->localtax1:$coll->localtax2)." ";
+ print ''.price($coll->amount).' ';
+ print ''.price($local==1?$coll->localtax1:$coll->localtax2).' ';
$totalamount = $totalamount + $coll->amount;
$total = $total + ($local==1?$coll->localtax1:$coll->localtax2);
print "\n";
@@ -293,9 +293,9 @@ if($calc ==0 || $calc == 1){
}
$x_paye_sum = $total;
- print ''.$langs->trans("Total").': ';
- print ''.price($totalamount).' ';
- print ''.price($total).' ';
+ print ''.$langs->trans("Total").': ';
+ print ''.price($totalamount).' ';
+ print ''.price($total).' ';
print ' ';
print '
';
@@ -319,7 +319,7 @@ if($calc ==0){
$diff = $x_coll_sum - $x_paye_sum ;
print ' ';
print ''.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').' ';
- print ''.price(price2num($diff, 'MT'))." \n";
+ print ''.price(price2num($diff, 'MT'))." \n";
print " \n";
}
print '
';
diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php
index 403737ce083..8d288274049 100644
--- a/htdocs/compta/localtax/index.php
+++ b/htdocs/compta/localtax/index.php
@@ -101,8 +101,8 @@ function pt($db, $sql, $date)
print '';
print ''.$date.' ';
- print ''.$langs->trans("ClaimedForThisPeriod").' ';
- print ''.$langs->trans("PaidDuringThisPeriod").' ';
+ print ''.$langs->trans("ClaimedForThisPeriod").' ';
+ print ''.$langs->trans("PaidDuringThisPeriod").' ';
print " \n";
$totalclaimed = 0;
@@ -122,8 +122,8 @@ function pt($db, $sql, $date)
{
print '';
print ''.$previousmonth." \n";
- print ''.price($amountclaimed)." \n";
- print ''.price($amountpaid)." \n";
+ print ''.price($amountclaimed)." \n";
+ print ''.price($amountpaid)." \n";
print " \n";
$amountclaimed = 0;
@@ -145,8 +145,8 @@ function pt($db, $sql, $date)
{
print '';
print ''.$obj->dm." \n";
- print ''.price($amountclaimed)." \n";
- print ''.price($amountpaid)." \n";
+ print ''.price($amountclaimed)." \n";
+ print ''.price($amountpaid)." \n";
print " \n";
$amountclaimed = 0;
$amountpaid = 0;
@@ -166,8 +166,8 @@ function pt($db, $sql, $date)
{
print '';
print ''.$previousmonth." \n";
- print ''.price($amountclaimed)." \n";
- print ''.price($amountpaid)." \n";
+ print ''.price($amountclaimed)." \n";
+ print ''.price($amountpaid)." \n";
print " \n";
$amountclaimed = 0;
@@ -175,9 +175,9 @@ function pt($db, $sql, $date)
}
print '';
- print ''.$langs->trans("Total").' ';
- print ''.price($totalclaimed).' ';
- print ''.price($totalpaid).' ';
+ print ''.$langs->trans("Total").' ';
+ print ''.price($totalclaimed).' ';
+ print ''.price($totalpaid).' ';
print " ";
print "
";
@@ -249,16 +249,16 @@ print '';
print '';
print ''.$langs->trans("Year")." ".$y." ";
if($CalcLT==0) {
- print "".$langs->transcountry($LTCustomer, $mysoc->country_code)." ";
- print "".$langs->transcountry($LTSupplier, $mysoc->country_code)." ";
+ print ''.$langs->transcountry($LTCustomer, $mysoc->country_code).' ';
+ print ''.$langs->transcountry($LTSupplier, $mysoc->country_code).' ';
}
if($CalcLT==1) {
- print "".$langs->transcountry($LTSupplier, $mysoc->country_code)." ";
+ print ''.$langs->transcountry($LTSupplier, $mysoc->country_code).' ';
}
if($CalcLT==2) {
- print "".$langs->transcountry($LTCustomer, $mysoc->country_code)." ";
+ print ''.$langs->transcountry($LTCustomer, $mysoc->country_code).' ';
}
-print "".$langs->trans("TotalToPay")." ";
+print ''.$langs->trans("TotalToPay").' ';
print " \n";
print " \n";
@@ -475,7 +475,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
$x_coll_sum += $temp_vat;
}
}
- print "".price(price2num($x_coll_sum, 'MT'))." ";
+ print ''.price(price2num($x_coll_sum, 'MT')).' ';
$x_paye_sum = 0;
foreach (array_keys($x_paye) as $rate)
@@ -519,7 +519,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
$x_paye_sum += $temp_vat;
}
}
- print "".price(price2num($x_paye_sum, 'MT'))." ";
+ print ''.price(price2num($x_paye_sum, 'MT')).' ';
$subtotalcoll = $subtotalcoll + $x_coll_sum;
$subtotalpaye = $subtotalpaye + $x_paye_sum;
@@ -528,7 +528,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
$total = $total + $diff;
$subtotal = price2num($subtotal + $diff, 'MT');
- print "".price(price2num($diff, 'MT'))." \n";
+ print ''.price(price2num($diff, 'MT')).' \n';
print " \n";
print "\n";
@@ -536,16 +536,16 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
if ($i > 2)
{
print '';
- print ''.$langs->trans("SubTotal").' : ';
- print ''.price(price2num($subtotalcoll, 'MT')).' ';
- print ''.price(price2num($subtotalpaye, 'MT')).' ';
- print ''.price(price2num($subtotal, 'MT')).' ';
+ print ''.$langs->trans("SubTotal").' : ';
+ print ''.price(price2num($subtotalcoll, 'MT')).' ';
+ print ''.price(price2num($subtotalpaye, 'MT')).' ';
+ print ''.price(price2num($subtotal, 'MT')).' ';
print ' ';
$i = 0;
$subtotalcoll=0; $subtotalpaye=0; $subtotal=0;
}
}
-print ''.$langs->trans("TotalToPay").': '.price(price2num($total, 'MT')).' ';
+print ''.$langs->trans("TotalToPay").': '.price(price2num($total, 'MT')).' ';
print " \n";
print ' ';
diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php
index 7efee5995ff..8d02d8390dd 100644
--- a/htdocs/compta/localtax/list.php
+++ b/htdocs/compta/localtax/list.php
@@ -93,7 +93,7 @@ if ($result)
$i++;
}
print ''.$langs->trans("Total").' ';
- print ''.price($total).' ';
+ print ''.price($total).' ';
print "
";
$db->free($result);
diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php
index 07fd53ffbad..4bbe5c723e1 100644
--- a/htdocs/compta/localtax/quadri_detail.php
+++ b/htdocs/compta/localtax/quadri_detail.php
@@ -320,10 +320,10 @@ else
print ' ';
print ''.$elementcust.' ';
print ''.$productcust.' ';
- if ($modetax != 2) print ''.$amountcust.' ';
- if ($modetax != 1) print ''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").') ';
- print ''.$langs->trans("BI").' ';
- print ''.$vatcust.' ';
+ if ($modetax != 2) print ''.$amountcust.' ';
+ if ($modetax != 1) print ''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").') ';
+ print ''.$langs->trans("BI").' ';
+ print ''.$vatcust.' ';
print ' ';
@@ -357,7 +357,7 @@ else
print '';
// Ref
- print ''.$fields['link'].' ';
+ print ''.$fields['link'].' ';
// Description
print '';
@@ -389,7 +389,7 @@ else
// Total HT
if ($modetax != 2)
{
- print ' ';
+ print ' ';
print price($fields['totalht']);
if (price2num($fields['ftotal_ttc']))
{
@@ -403,7 +403,7 @@ else
if ($modetax != 1)
{
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
- print ' ';
+ print ' ';
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
{
$payment_static->id=$fields['payment_id'];
@@ -421,14 +421,14 @@ else
}
// Total collected
- print ' ';
+ print ' ';
$temp_ht=$fields['totalht'];
if ($type == 1) $temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht, 'MT'));
print ' ';
// Localtax
- print '';
+ print ' ';
$temp_vat= $local==1?$fields['localtax1']:$fields['localtax2'];
print price(price2num($temp_vat, 'MT'));
//print price($fields['vat']);
@@ -445,14 +445,14 @@ else
// Total customers for this vat rate
print ' ';
print ' ';
- print ''.$langs->trans("Total").': ';
+ print ''.$langs->trans("Total").': ';
if ($modetax != 1)
{
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
}
- print ''.price(price2num($subtot_coll_total_ht, 'MT')).' ';
- print ''.price(price2num($subtot_coll_vat, 'MT')).' ';
+ print ''.price(price2num($subtot_coll_total_ht, 'MT')).' ';
+ print ''.price(price2num($subtot_coll_vat, 'MT')).' ';
print ' ';
}
@@ -460,14 +460,14 @@ else
{
print '';
print ' ';
- print ''.$langs->trans("Total").': ';
+ print ''.$langs->trans("Total").': ';
if ($modetax == 0)
{
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
}
- print ''.price(price2num(0, 'MT')).' ';
- print ''.price(price2num(0, 'MT')).' ';
+ print ''.price(price2num(0, 'MT')).' ';
+ print ''.price(price2num(0, 'MT')).' ';
print ' ';
}
@@ -485,11 +485,11 @@ else
print ''.$productsup.' ';
if ($modetax != 1)
{
- print ''.$amountsup.' ';
- print ''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").') ';
+ print ''.$amountsup.' ';
+ print ''.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").') ';
}
- print ''.$langs->trans("BI").' ';
- print ''.$vatsup.' ';
+ print ''.$langs->trans("BI").' ';
+ print ''.$vatsup.' ';
print ''."\n";
foreach(array_keys($x_paye) as $rate)
@@ -519,7 +519,7 @@ else
print '';
// Ref
- print ''.$fields['link'].' ';
+ print ''.$fields['link'].' ';
// Description
print '';
@@ -545,7 +545,7 @@ else
// Total HT
if ($modetax != 2)
{
- print ' ';
+ print ' ';
print price($fields['totalht']);
if (price2num($fields['ftotal_ttc']))
{
@@ -560,7 +560,7 @@ else
$ratiopaymentinvoice=1;
if ($modetax != 1)
{
- print ' ';
+ print ' ';
if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) $ratiopaymentinvoice=($fields['payment_amount']/$fields['ftotal_ttc']);
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
{
@@ -582,13 +582,13 @@ else
}
// VAT paid
- print ' ';
+ print ' ';
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
print price(price2num($temp_ht, 'MT'), 1);
print ' ';
// Localtax
- print '';
+ print ' ';
$temp_vat=($local==1?$fields['localtax1']:$fields['localtax2'])*$ratiopaymentinvoice;
print price(price2num($temp_vat, 'MT'), 1);
//print price($fields['vat']);
@@ -605,27 +605,27 @@ else
// Total suppliers for this vat rate
print ' ';
print ' ';
- print ''.$langs->trans("Total").': ';
+ print ''.$langs->trans("Total").': ';
if ($modetax != 1)
{
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
}
- print ''.price(price2num($subtot_paye_total_ht, 'MT')).' ';
- print ''.price(price2num($subtot_paye_vat, 'MT')).' ';
+ print ''.price(price2num($subtot_paye_total_ht, 'MT')).' ';
+ print ''.price(price2num($subtot_paye_vat, 'MT')).' ';
print ' ';
}
if (count($x_paye) == 0) { // Show a total line if nothing shown
print '';
print ' ';
- print ''.$langs->trans("Total").': ';
+ print ''.$langs->trans("Total").': ';
if ($modetax != 1) {
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
}
- print ''.price(price2num(0, 'MT')).' ';
- print ''.price(price2num(0, 'MT')).' ';
+ print ''.price(price2num(0, 'MT')).' ';
+ print ''.price(price2num(0, 'MT')).' ';
print ' ';
}
@@ -638,7 +638,7 @@ else
$diff = $x_coll_sum - $x_paye_sum;
print '';
print ''.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').' ';
- print ''.price(price2num($diff, 'MT'))." \n";
+ print ''.price(price2num($diff, 'MT'))." \n";
print " \n";
$i++;
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index c3ac6c18d80..887c1d9993e 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -8,7 +8,7 @@
* Copyright (C) 2014 Raphaël Doursenaud
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
* Copyright (C) 2015 Juanjo Menent
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2019 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -763,7 +763,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
// Print total
print '';
- print ''.$langs->trans('TotalTTC').' ';
+ print ''.$langs->trans('TotalTTC').' ';
if (!empty($conf->multicurrency->enabled)) {
print ' ';
print ' ';
diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index e8fda32f820..4c0effee111 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -343,10 +343,10 @@ if ($resql)
print ''.$langs->trans('Bill').' ';
print ''.$langs->trans('Company').' ';
if($conf->global->MULTICOMPANY_INVOICE_SHARING_ENABLED )print ''.$langs->trans('Entity').' ';
- print ''.$langs->trans('ExpectedToPay').' ';
- print ''.$langs->trans('PayedByThisPayment').' ';
- print ''.$langs->trans('RemainderToPay').' ';
- print ''.$langs->trans('Status').' ';
+ print ''.$langs->trans('ExpectedToPay').' ';
+ print ''.$langs->trans('PayedByThisPayment').' ';
+ print ''.$langs->trans('RemainderToPay').' ';
+ print ''.$langs->trans('Status').' ';
print " \n";
if ($num > 0)
@@ -386,16 +386,16 @@ if ($resql)
print '';
}
// Expected to pay
- print ''.price($objp->total_ttc).' ';
+ print ''.price($objp->total_ttc).' ';
// Amount payed
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
// Remain to pay
- print ''.price($remaintopay).' ';
+ print ''.price($remaintopay).' ';
// Status
- print ''.$invoice->getLibStatut(5, $alreadypayed).' ';
+ print ''.$invoice->getLibStatut(5, $alreadypayed).' ';
print "\n";
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php
index e52a1135ba0..ee69d8d89f3 100644
--- a/htdocs/compta/paiement/cheque/card.php
+++ b/htdocs/compta/paiement/cheque/card.php
@@ -476,7 +476,7 @@ if ($action == 'new')
print ''.$langs->trans("ChequeNumber")." \n";
print ''.$langs->trans("CheckTransmitter")." \n";
print ''.$langs->trans("Bank")." \n";
- print ''.$langs->trans("Amount")." \n";
+ print ''.$langs->trans("Amount")." \n";
print ''.$langs->trans("Payment")." \n";
print ''.$langs->trans("LineRecord")." \n";
print ''.$langs->trans("Select")." ";
@@ -500,7 +500,7 @@ if ($action == 'new')
print ' '.$value["numero"]." \n";
print ''.$value["emetteur"]." \n";
print ''.$value["banque"]." \n";
- print ''.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).' ';
+ print ''.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).' ';
// Link to payment
print '';
@@ -576,7 +576,7 @@ else
print '';
print ' ';
if ($action == 'editdate')
@@ -603,7 +603,7 @@ else
print '';
print ' ';
if ($action == 'editrefext')
@@ -674,7 +674,7 @@ else
print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "b.num_chq", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("CheckTransmitter", $_SERVER["PHP_SELF"], "b.emetteur", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Bank", $_SERVER["PHP_SELF"], "b.banque", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "b.amount", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "b.amount", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Payment", $_SERVER["PHP_SELF"], "p.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("LineRecord", $_SERVER["PHP_SELF"], "b.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('');
@@ -698,7 +698,7 @@ else
print ' '.($objp->num_chq?$objp->num_chq:' ').' ';
print ''.dol_trunc($objp->emetteur, 24).' ';
print ''.dol_trunc($objp->banque, 24).' ';
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
// Link to payment
print '';
$paymentstatic->id=$objp->pid;
@@ -725,7 +725,7 @@ else
}
print ' ';
// Action button
- print '';
+ print ' ';
if ($object->statut == 0)
{
print 'id.'&action=remove&lineid='.$objp->rowid.'">'.img_delete().' ';
diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php
index a9131c986bb..fb3606880ab 100644
--- a/htdocs/compta/paiement/cheque/index.php
+++ b/htdocs/compta/paiement/cheque/index.php
@@ -72,7 +72,7 @@ if ($resql) {
}
print ' ';
print ''.$langs->trans("BankChecksToReceipt").' ';
- print '';
+ print ' ';
print ''.$num.' ';
print ' ';
print "
\n";
@@ -106,9 +106,9 @@ if ($resql)
print ''.$langs->trans("LastCheckReceiptShort", $max).' ';
print ''.$langs->trans("Date")." ";
print ''.$langs->trans("Account").' ';
- print ''.$langs->trans("NbOfCheques").' ';
- print ''.$langs->trans("Amount").' ';
- print ''.$langs->trans("Status").' ';
+ print ''.$langs->trans("NbOfCheques").' ';
+ print ''.$langs->trans("Amount").' ';
+ print ''.$langs->trans("Status").' ';
print "\n";
while ( $objp = $db->fetch_object($resql) )
@@ -131,9 +131,9 @@ if ($resql)
print ''.$checkdepositstatic->getNomUrl(1).' ';
print ''.dol_print_date($db->jdate($objp->db), 'day').' ';
print ''.$accountstatic->getNomUrl(1).' ';
- print ''.$objp->nbcheque.' ';
- print ''.price($objp->amount).' ';
- print ''.$checkdepositstatic->LibStatut($objp->statut, 3).' ';
+ print ''.$objp->nbcheque.' ';
+ print ''.price($objp->amount).' ';
+ print ''.$checkdepositstatic->LibStatut($objp->statut, 3).' ';
print '';
}
diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php
index 1c0736e5cc9..6e86ecf14b6 100644
--- a/htdocs/compta/paiement/cheque/list.php
+++ b/htdocs/compta/paiement/cheque/list.php
@@ -173,11 +173,11 @@ if ($resql)
$form->select_comptes($search_account, 'search_account', 0, '', 1);
print '';
print ' ';
- print '';
+ print ' ';
print ' ';
print ' ';
print ' ';
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
@@ -187,9 +187,9 @@ if ($resql)
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "bc.ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "dp", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
- print_liste_field_titre("NbOfCheques", $_SERVER["PHP_SELF"], "bc.nbcheque", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "bc.statut", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("NbOfCheques", $_SERVER["PHP_SELF"], "bc.nbcheque", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "bc.statut", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre('');
print "\n";
@@ -219,13 +219,13 @@ if ($resql)
print '';
// Number of cheques
- print ''.$objp->nbcheque.' ';
+ print ''.$objp->nbcheque.' ';
// Amount
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
// Statut
- print '';
+ print ' ';
print $checkdepositstatic->LibStatut($objp->statut, 5);
print ' ';
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index 3407da6adb3..71e7ef7194e 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -725,7 +725,7 @@ class Paiement extends CommonObject
// Add link 'WithdrawalPayment' in bank_url
if (! $error && $label == '(WithdrawalPayment)')
{
- $result=$acc->add_url_line(
+ $result=$acc->add_url_line(
$bank_line_id,
$this->id_prelevement,
DOL_URL_ROOT.'/compta/prelevement/card.php?id=',
diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php
index 1f0b26a5563..5e555655228 100644
--- a/htdocs/compta/paiement/list.php
+++ b/htdocs/compta/paiement/list.php
@@ -225,7 +225,7 @@ if ($resql)
// Lines for filters fields
print '';
- print '';
+ print ' ';
print ' ';
print ' ';
print '';
@@ -248,16 +248,16 @@ if ($resql)
$form->select_comptes($search_account, 'search_account', 0, '', 1);
print ' ';
}
- print '';
+ print ' ';
print ' ';
print ' ';
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
{
- print '';
+ print ' ';
print ' ';
}
print " \n";
@@ -272,8 +272,8 @@ if ($resql)
{
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
}
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, 'align="right"', $sortfield, $sortorder);
- //print_liste_field_titre("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, 'class="right"', $sortfield, $sortorder);
+ //print_liste_field_titre("Invoices"),"","","",$param,'class="left"',$sortfield,$sortorder);
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
@@ -342,11 +342,11 @@ if ($resql)
print '';
}
// Amount
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
{
- print '';
+ print ' ';
if ($objp->statut == 0) print '';
print $paymentstatic->LibStatut($objp->statut, 5);
if ($objp->statut == 0) print ' ';
diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php
index fe14241ee54..ebeb9012733 100644
--- a/htdocs/compta/paiement/rapport.php
+++ b/htdocs/compta/paiement/rapport.php
@@ -142,8 +142,8 @@ if ($year)
print '';
print '';
print ''.$langs->trans("Reporting").' ';
- print ''.$langs->trans("Size").' ';
- print ''.$langs->trans("Date").' ';
+ print ''.$langs->trans("Size").' ';
+ print ''.$langs->trans("Date").' ';
print ' ';
if (is_resource($handle))
@@ -156,8 +156,8 @@ if ($year)
$tfile = $dir . '/'.$year.'/'.$file;
$relativepath = $year.'/'.$file;
print ''.''.img_pdf().' '.$file.' ';
- print ''.dol_print_size(dol_filesize($tfile)).' ';
- print ''.dol_print_date(dol_filemtime($tfile), "dayhour").' ';
+ print ''.dol_print_size(dol_filesize($tfile)).' ';
+ print ''.dol_print_date(dol_filemtime($tfile), "dayhour").' ';
}
}
closedir($handle);
diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php
index 6515ec35fc4..0e2889814cc 100644
--- a/htdocs/compta/paiement/tovalidate.php
+++ b/htdocs/compta/paiement/tovalidate.php
@@ -108,7 +108,7 @@ if ($resql)
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.rowid", "", "", 'width="60"', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "dp", "", "", 'width="80" align="center"', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "c.libelle", "", "", "", $sortfield, $sortorder);
- print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "c.libelle", "", "", 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], "c.libelle", "", "", 'class="right"', $sortfield, $sortorder);
print_liste_field_titre('');
print "\n";
@@ -120,7 +120,7 @@ if ($resql)
print ''.img_object($langs->trans("ShowPayment"), "payment").' '.$objp->rowid.' ';
print ''.dol_print_date($db->jdate($objp->dp), 'day')." \n";
print "$objp->paiement_type $objp->num_paiement \n";
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
print '';
if ($objp->statut == 0)
diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php
index c984ecd88f1..25204095f97 100644
--- a/htdocs/compta/payment_sc/card.php
+++ b/htdocs/compta/payment_sc/card.php
@@ -240,9 +240,9 @@ if ($resql)
print ' '.$langs->trans('SocialContribution').' ';
print ''.$langs->trans('Type').' ';
print ''.$langs->trans('Label').' ';
- print ''.$langs->trans('ExpectedToPay').' ';
+ print ''.$langs->trans('ExpectedToPay').' ';
print ''.$langs->trans('Status').' ';
- print ''.$langs->trans('PayedByThisPayment').' ';
+ print ''.$langs->trans('PayedByThisPayment').' ';
print "\n";
if ($num > 0)
@@ -265,11 +265,11 @@ if ($resql)
// Label
print ''.$objp->libelle.' ';
// Expected to pay
- print ''.price($objp->sc_amount).' ';
+ print ''.price($objp->sc_amount).' ';
// Status
print ''.$socialcontrib->getLibStatut(4, $objp->amount).' ';
// Amount payed
- print ''.price($objp->amount).' ';
+ print ''.price($objp->amount).' ';
print "\n";
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
{
diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php
index 3d2e2ef94f0..fcd48a6a305 100644
--- a/htdocs/compta/prelevement/bons.php
+++ b/htdocs/compta/prelevement/bons.php
@@ -136,7 +136,7 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print '';
+ print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
@@ -145,8 +145,8 @@ if ($result)
print '';
print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', '', 'class="liste_titre"', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", "", 'class="liste_titre" align="center"', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", "", 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", "", 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'class="right"', $sortfield, $sortorder);
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
print " \n";
@@ -160,13 +160,13 @@ if ($result)
print ''.dol_print_date($db->jdate($obj->datec), 'day')." \n";
- print ''.price($obj->amount)." \n";
+ print ''.price($obj->amount)." \n";
- print '';
+ print ' ';
print $bon->LibStatut($obj->statut, 3);
print ' ';
- print ' '."\n";
+ print ' '."\n";
print "\n";
$i++;
diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php
index 0a66c18a607..d31efcc9df8 100644
--- a/htdocs/compta/prelevement/card.php
+++ b/htdocs/compta/prelevement/card.php
@@ -344,7 +344,7 @@ if ($id > 0 || $ref)
print '';
print_liste_field_titre("Lines", $_SERVER["PHP_SELF"], "pl.rowid", '', $urladd);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'align="right"');
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $urladd, 'class="right"');
print_liste_field_titre('');
print " \n";
@@ -372,7 +372,7 @@ if ($id > 0 || $ref)
print $thirdparty->getNomUrl(1);
print "\n";
- print ''.price($obj->amount)." \n";
+ print ''.price($obj->amount)." \n";
print '';
@@ -397,7 +397,7 @@ if ($id > 0 || $ref)
print ' ';
print ''.$langs->trans("Total").' ';
print ' ';
- print '';
+ print ' ';
if ($total != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices");
print price($total);
print " \n";
diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index c3a4fa8556d..d9298c9f607 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -234,8 +234,8 @@ if ($resql)
print ''.$langs->trans("ThirdParty").' ';
print ''.$langs->trans("RIB").' ';
print ''.$langs->trans("RUM").' ';
- print ''.$langs->trans("AmountTTC").' ';
- print ''.$langs->trans("DateRequest").' ';
+ print ''.$langs->trans("AmountTTC").' ';
+ print ''.$langs->trans("DateRequest").' ';
print ' ';
if ($num)
@@ -271,11 +271,11 @@ if ($resql)
if ($format) print ' ('.$format.')';
print '';
// Amount
- print '';
+ print ' ';
print price($obj->amount, 0, $langs, 0, 0, -1, $conf->currency);
print ' ';
// Date
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_demande), 'day');
print ' ';
print '';
@@ -317,7 +317,7 @@ if ($result)
print"\n\n";
print '';
print ''.$langs->trans("Ref").' ';
- print ''.$langs->trans("Date").' '.$langs->trans("Amount").' ';
+ print ''.$langs->trans("Date").' '.$langs->trans("Amount").' ';
print ' ';
while ($i < min($num,$limit))
@@ -335,7 +335,7 @@ if ($result)
print ''.dol_print_date($db->jdate($obj->datec),'day')." \n";
- print ''.price($obj->amount,0,$langs,0,0,-1,$conf->currency)." \n";
+ print ''.price($obj->amount,0,$langs,0,0,-1,$conf->currency)." \n";
print "\n";
$i++;
diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php
index d4575ec0e8c..8f9df284291 100644
--- a/htdocs/compta/prelevement/demandes.php
+++ b/htdocs/compta/prelevement/demandes.php
@@ -110,8 +110,8 @@ if ($resql)
print '';
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"]);
print_liste_field_titre("Company", $_SERVER["PHP_SELF"]);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"');
- print_liste_field_titre("DateRequest", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"');
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "", "", $param, 'class="right"');
+ print_liste_field_titre("DateRequest", $_SERVER["PHP_SELF"], "", "", $param, 'class="center"');
print_liste_field_titre('');
print ' ';
@@ -121,7 +121,7 @@ if ($resql)
print ' ';
print ' ';
// Action column
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print ' ';
@@ -148,11 +148,11 @@ if ($resql)
print $thirdpartystatic->getNomUrl(1, 'customer');
print '';
- print ''.price($obj->total_ttc).' ';
+ print ''.price($obj->total_ttc).' ';
- print ''.dol_print_date($db->jdate($obj->date_demande), 'day').' ';
+ print ''.dol_print_date($db->jdate($obj->date_demande), 'day').' ';
- print ' ';
+ print ' ';
print '';
$i++;
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index 2d582c7a6a6..83ac9a3483b 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -205,8 +205,8 @@ if ($result)
print '';
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
- print_liste_field_titre("AmountInvoice", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountInvoice", $_SERVER["PHP_SELF"], "f.total_ttc", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountRequested", $_SERVER["PHP_SELF"], "pl.amount", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("StatusDebitCredit", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('');
print " \n";
@@ -235,10 +235,10 @@ if ($result)
print "\n";
// Amount of invoice
- print ''.price($obj->total_ttc)." \n";
+ print ''.price($obj->total_ttc)." \n";
// Amount requested
- print ''.price($obj->amount_requested)." \n";
+ print ''.price($obj->amount_requested)." \n";
// Status of requests
print '';
@@ -273,11 +273,11 @@ if ($result)
print ' ';
print ''.$langs->trans("Total").' ';
print ' ';
- print '';
+ print ' ';
//if ($totalinvoices != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); // It is normal to have total that differs. For an amount of invoice of 100, request to pay may be 50 only.
if ($totalamount_requested != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices");
print " \n";
- print '';
+ print ' ';
print price($totalamount_requested);
print " \n";
print ' ';
diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php
index a2b6d0db965..c930db99012 100644
--- a/htdocs/compta/prelevement/fiche-rejet.php
+++ b/htdocs/compta/prelevement/fiche-rejet.php
@@ -189,8 +189,8 @@ if ($resql)
print ''; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '
';
print '';
- print ''.$langs->trans("Line").' '.$langs->trans("ThirdParty").' '.$langs->trans("Amount").' ';
- print ''.$langs->trans("Reason").' '.$langs->trans("ToBill").' '.$langs->trans("Invoice").' ';
+ print ''.$langs->trans("Line").' '.$langs->trans("ThirdParty").' '.$langs->trans("Amount").' ';
+ print ''.$langs->trans("Reason").' '.$langs->trans("ToBill").' '.$langs->trans("Invoice").' ';
$total = 0;
@@ -209,7 +209,7 @@ if ($resql)
print '';
print ''.$obj->name." \n";
- print ''.price($obj->amount)." \n";
+ print ''.price($obj->amount)." \n";
print ''.$rej->motifs[$obj->motif].' ';
print ''.yn($obj->afacturer).' ';
@@ -230,7 +230,7 @@ if ($resql)
{
print ' ';
print ''.$langs->trans("Total").' ';
- print ''.price($total)." \n";
+ print ''.price($total)." \n";
print ' ';
print " \n";
}
diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php
index 5cacc6c5856..9cee7938737 100644
--- a/htdocs/compta/prelevement/fiche-stat.php
+++ b/htdocs/compta/prelevement/fiche-stat.php
@@ -160,7 +160,7 @@ if ($prev_id > 0 || $ref)
print"\n\n";
print '';
print '';
- print ''.$langs->trans("Status").' '.$langs->trans("Amount").' % ';
+ print ''.$langs->trans("Status").' '.$langs->trans("Amount").' % ';
while ($i < $num)
{
@@ -170,10 +170,10 @@ if ($prev_id > 0 || $ref)
print $ligne->LibStatut($row[1], 1);
- print '';
+ print ' ';
print price($row[0]);
- print ' ';
+ print ' ';
if ($object->amount) print round($row[0]/$object->amount*100, 2)." %";
print ' ';
diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php
index ef20b5117a0..4e2c4e2d3a5 100644
--- a/htdocs/compta/prelevement/index.php
+++ b/htdocs/compta/prelevement/index.php
@@ -75,14 +75,14 @@ print '';
print ''.$langs->trans("Statistics").' ';
print ''.$langs->trans("NbOfInvoiceToWithdraw").' ';
-print '';
+print ' ';
print '';
print $bprev->NbFactureAPrelever();
print ' ';
print ' ';
print ''.$langs->trans("AmountToWithdraw").' ';
-print '';
+print ' ';
print price($bprev->SommeAPrelever(), '', '', 1, -1, -1, 'auto');
print '
';
@@ -137,15 +137,15 @@ if ($resql)
print $thirdpartystatic->getNomUrl(1, 'customer');
print '';
- print '';
+ print ' ';
print price($obj->amount);
print ' ';
- print '';
+ print ' ';
print dol_print_date($db->jdate($obj->date_demande), 'day');
print ' ';
- print '';
+ print ' ';
print $invoicestatic->getLibStatut(3, $alreadypayed);
print ' ';
print '';
@@ -186,8 +186,8 @@ if ($result)
print '';
print ''.$langs->trans("LastWithdrawalReceipt", $limit).' ';
print ''.$langs->trans("Date").' ';
- print ''.$langs->trans("Amount").' ';
- print ''.$langs->trans("Status").' ';
+ print ''.$langs->trans("Amount").' ';
+ print ''.$langs->trans("Status").' ';
print ' ';
while ($i < min($num, $limit))
@@ -204,8 +204,8 @@ if ($result)
print $bprev->getNomUrl(1);
print "\n";
print ''.dol_print_date($db->jdate($obj->datec), "dayhour")." \n";
- print ''.price($obj->amount)." \n";
- print ''.$bprev->getLibStatut(3)." \n";
+ print ''.price($obj->amount)." \n";
+ print ''.$bprev->getLibStatut(3)." \n";
print "\n";
$i++;
diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php
index 977134f103f..33728093ec1 100644
--- a/htdocs/compta/prelevement/ligne.php
+++ b/htdocs/compta/prelevement/ligne.php
@@ -292,7 +292,7 @@ if ($id)
print"\n\n";
print '';
print '';
- print ''.$langs->trans("Invoice").' '.$langs->trans("ThirdParty").' '.$langs->trans("Amount").' '.$langs->trans("Status").' ';
+ print ''.$langs->trans("Invoice").' '.$langs->trans("ThirdParty").' '.$langs->trans("Amount").' '.$langs->trans("Status").' ';
print ' ';
$total = 0;
@@ -312,9 +312,9 @@ if ($id)
print '';
print img_object($langs->trans("ShowCompany"), "company"). ' '.$obj->name." \n";
- print ''.price($obj->total_ttc)." \n";
+ print ''.price($obj->total_ttc)." \n";
- print '';
+ print ' ';
$invoicestatic->fetch($obj->facid);
print $invoicestatic->getLibStatut(5);
print " \n";
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index 3c8b461a8fc..8180517a2e8 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -146,7 +146,7 @@ if ($result)
print ' ';
print ' ';
print ' ';
- print '';
+ print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
@@ -159,7 +159,7 @@ if ($result)
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom");
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', '', 'align="center"');
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", "", 'align="center"');
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", "", 'align="right"');
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", "", 'class="right"');
print_liste_field_titre('');
print "\n";
@@ -194,7 +194,7 @@ if ($result)
print ''.dol_print_date($db->jdate($obj->datec), 'day')." \n";
- print ''.price($obj->amount)." \n";
+ print ''.price($obj->amount)." \n";
print ' ';
diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php
index b7ca5d02bf3..9bd00ae0ce2 100644
--- a/htdocs/compta/prelevement/stats.php
+++ b/htdocs/compta/prelevement/stats.php
@@ -91,8 +91,8 @@ if ($resql)
print"\n\n";
print '';
print '';
- print ''.$langs->trans("Status").' '.$langs->trans("Number").' % ';
- print ''.$langs->trans("Amount").' % ';
+ print ''.$langs->trans("Status").' '.$langs->trans("Number").' % ';
+ print ''.$langs->trans("Amount").' % ';
while ($i < $num)
{
@@ -105,24 +105,24 @@ if ($resql)
print '';
print $row[1];
- print ' ';
+ print ' ';
print round($row[1]/$nbtotal*100, 2)." %";
- print ' ';
+ print ' ';
print price($row[0]);
- print ' ';
+ print ' ';
print round($row[0]/$total*100, 2)." %";
print ' ';
$i++;
}
- print ''.$langs->trans("Total").' ';
- print ''.$nbtotal.' ';
+ print ' '.$langs->trans("Total").' ';
+ print ''.$nbtotal.' ';
print price($total);
- print ' ';
+ print ' ';
print "
";
$db->free();
}
@@ -185,7 +185,7 @@ if ($resql)
print '';
print '';
print ''.$langs->trans("Status").' '.$langs->trans("Number").' ';
- print '% '.$langs->trans("Amount").' % ';
+ print '% '.$langs->trans("Amount").' % ';
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
$Rejet = new RejetPrelevement($db, $user);
@@ -199,13 +199,13 @@ if ($resql)
print ''.$row[1];
- print ' ';
+ print ' ';
print round($row[1]/$nbtotal*100, 2)." %";
- print ' ';
+ print ' ';
print price($row[0]);
- print ' ';
+ print ' ';
print round($row[0]/$total*100, 2)." %";
print ' ';
@@ -213,10 +213,10 @@ if ($resql)
$i++;
}
- print ''.$langs->trans("Total").' '.$nbtotal.' ';
- print ' ';
+ print ' '.$langs->trans("Total").' '.$nbtotal.' ';
+ print ' ';
print price($total);
- print ' ';
+ print ' ';
print "
";
$db->free($resql);
}
diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php
index c95ca219350..fef607ac0dd 100644
--- a/htdocs/compta/resultat/clientfourn.php
+++ b/htdocs/compta/resultat/clientfourn.php
@@ -222,15 +222,15 @@ print_liste_field_titre("PredefinedGroups", $_SERVER["PHP_SELF"], 'f.thirdparty_
print_liste_field_titre('');
if ($modecompta == 'BOOKKEEPING')
{
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'amount', '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'amount', '', $param, 'class="right"', $sortfield, $sortorder);
}
else
{
if ($modecompta == 'CREANCES-DETTES')
{
- print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder);
}
- print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountTTC", $_SERVER["PHP_SELF"], 'amount_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
}
print "\n";
@@ -284,7 +284,7 @@ if ($modecompta == 'BOOKKEEPING')
print '';
print ' ';
print ''.$objp->pcg_type.($objp->pcg_subtype != 'XXXXXX'?' - '.$objp->pcg_subtype:'').($objp->name?' ('.$objp->name.')':'')." \n";
- print ''.price($objp->amount)." \n";
+ print ''.price($objp->amount)." \n";
print " \n";
$total_ht += (isset($objp->amount)?$objp->amount:0);
@@ -317,7 +317,7 @@ if ($modecompta == 'BOOKKEEPING')
print '';
print ' ';
print ' ' . length_accountg($cpt['account_number']) . ' - ' . $cpt['account_label'] . ' ';
- print '' . price($resultN) . ' ';
+ print '' . price($resultN) . ' ';
print " \n";
}
}
@@ -389,8 +389,8 @@ else
print "".$langs->trans("Bills").' '.$objp->name." \n";
if ($modecompta == 'CREANCES-DETTES')
- print "".price($objp->amount_ht)." \n";
- print "".price($objp->amount_ttc)." \n";
+ print ''.price($objp->amount_ht)." \n";
+ print ''.price($objp->amount_ttc)." \n";
$total_ht += (isset($objp->amount_ht)?$objp->amount_ht:0);
$total_ttc += $objp->amount_ttc;
@@ -434,8 +434,8 @@ else
print "".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n";
if ($modecompta == 'CREANCES-DETTES')
- print " ".price($objp->amount_ht)." \n";
- print "".price($objp->amount_ttc)." \n";
+ print ''.price($objp->amount_ht)." \n";
+ print ''.price($objp->amount_ttc)." \n";
$total_ht += (isset($objp->amount_ht)?$objp->amount_ht:0);
$total_ttc += $objp->amount_ttc;
@@ -459,8 +459,8 @@ else
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price($total_ht).' ';
- print ''.price($total_ttc).' ';
+ print ''.price($total_ht).' ';
+ print ''.price($total_ttc).' ';
print ' ';
@@ -519,8 +519,8 @@ else
print "".$langs->trans("Bills")." socid."\">".$objp->name." \n";
if ($modecompta == 'CREANCES-DETTES')
- print "".price(-$objp->amount_ht)." \n";
- print "".price(-$objp->amount_ttc)." \n";
+ print ''.price(-$objp->amount_ht)." \n";
+ print ''.price(-$objp->amount_ttc)." \n";
$total_ht -= (isset($objp->amount_ht)?$objp->amount_ht:0);
$total_ttc -= $objp->amount_ttc;
@@ -544,8 +544,8 @@ else
}
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(-$subtotal_ht).' ';
- print ''.price(-$subtotal_ttc).' ';
+ print ''.price(-$subtotal_ht).' ';
+ print ''.price(-$subtotal_ttc).' ';
print ' ';
@@ -605,8 +605,8 @@ else
print ' ';
print ''.$obj->label.' ';
- if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount).' ';
- print ''.price(-$obj->amount).' ';
+ if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount).' ';
+ print ''.price(-$obj->amount).' ';
print ' ';
$i++;
}
@@ -621,8 +621,8 @@ else
}
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(-$subtotal_ht).' ';
- print ''.price(-$subtotal_ttc).' ';
+ print ''.price(-$subtotal_ht).' ';
+ print ''.price(-$subtotal_ttc).' ';
print ' ';
@@ -682,8 +682,8 @@ else
print ' ';
print ''.$obj->label.' ';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(-$obj->amount).' ';
- print ''.price(-$obj->amount).' ';
+ print ''.price(-$obj->amount).' ';
+ print ''.price(-$obj->amount).' ';
print ' ';
$i++;
}
@@ -698,8 +698,8 @@ else
}
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(-$subtotal_ht).' ';
- print ''.price(-$subtotal_ttc).' ';
+ print ''.price(-$subtotal_ht).' ';
+ print ''.price(-$subtotal_ttc).' ';
print ' ';
if ($mysoc->tva_assuj == 'franchise') // Non assujetti
@@ -709,10 +709,10 @@ else
print ' ';
print '';
- print ''.$langs->trans("Profit").' ';
+ print ''.$langs->trans("Profit").' ';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price($total_ht).' ';
- print ''.price($total_ttc).' ';
+ print ''.price($total_ht).' ';
+ print ''.price($total_ttc).' ';
print ' ';
print '';
@@ -775,8 +775,8 @@ else
print "".$langs->trans("Salary")." fk_user."\">".$obj->firstname." ".$obj->lastname." \n";
- if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount).' ';
- print ''.price(-$obj->amount).' ';
+ if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount).' ';
+ print ''.price(-$obj->amount).' ';
print ' ';
$i++;
}
@@ -794,8 +794,8 @@ else
}
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(-$subtotal_ht).' ';
- print ''.price(-$subtotal_ttc).' ';
+ print ''.price(-$subtotal_ht).' ';
+ print ''.price(-$subtotal_ttc).' ';
print ' ';
}
@@ -862,8 +862,8 @@ else
print "".$langs->trans("ExpenseReport")." userid."\">".$obj->firstname." ".$obj->lastname." \n";
- if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount_ht).' ';
- print ''.price(-$obj->amount_ttc).' ';
+ if ($modecompta == 'CREANCES-DETTES') print ''.price(-$obj->amount_ht).' ';
+ print ''.price(-$obj->amount_ttc).' ';
print '';
}
}
@@ -879,8 +879,8 @@ else
dol_print_error($db);
}
print '';
- if ($modecompta == 'CREANCES-DETTES') print ''.price(-$subtotal_ht).' ';
- print ''.price(-$subtotal_ttc).' ';
+ if ($modecompta == 'CREANCES-DETTES') print ''.price(-$subtotal_ht).' ';
+ print ''.price(-$subtotal_ttc).' ';
print ' ';
}
@@ -943,8 +943,8 @@ else
print "".$langs->trans("Donation")." name."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->name. " ".$obj->firstname." ".$obj->lastname." \n";
- if ($modecompta == 'CREANCES-DETTES') print ''.price($obj->amount).' ';
- print ''.price($obj->amount).' ';
+ if ($modecompta == 'CREANCES-DETTES') print ''.price($obj->amount).' ';
+ print ''.price($obj->amount).' ';
print '';
$i++;
}
@@ -962,8 +962,8 @@ else
}
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price($subtotal_ht).' ';
- print ''.price($subtotal_ttc).' ';
+ print ''.price($subtotal_ht).' ';
+ print ''.price($subtotal_ttc).' ';
print ' ';
}
@@ -1024,8 +1024,8 @@ else
}
print ' ';
print "".$langs->trans("VATToPay")." \n";
- print " \n";
- print "".price($amount)." \n";
+ print ' '."\n";
+ print ''.price($amount)." \n";
print " \n";
// TVA a recuperer
@@ -1072,9 +1072,9 @@ else
dol_print_error($db);
}
print ' ';
- print "".$langs->trans("VATToCollect")." \n";
- print " \n";
- print "".price($amount)." \n";
+ print ''.$langs->trans("VATToCollect")." \n";
+ print ' '."\n";
+ print ''.price($amount)." \n";
print " \n";
}
else
@@ -1119,8 +1119,8 @@ else
print ' ';
print "".$langs->trans("VATPaid")." \n";
if ($modecompta == 'CREANCES-DETTES')
- print "".price($amount)." \n";
- print "".price($amount)." \n";
+ print ''.price($amount)." \n";
+ print ''.price($amount)." \n";
print " \n";
// VAT really received
@@ -1165,8 +1165,8 @@ else
print ' ';
print "".$langs->trans("VATCollected")." \n";
if ($modecompta == 'CREANCES-DETTES')
- print "".price($amount)." \n";
- print "".price($amount)." \n";
+ print ''.price($amount)." \n";
+ print ''.price($amount)." \n";
print " \n";
}
}
@@ -1175,8 +1175,8 @@ else
{
print '';
if ($modecompta == 'CREANCES-DETTES')
- print ' ';
- print ''.price(price2num($subtotal_ttc, 'MT')).' ';
+ print ' ';
+ print ''.price(price2num($subtotal_ttc, 'MT')).' ';
print ' ';
}
}
@@ -1199,10 +1199,10 @@ if ($mysoc->tva_assuj != 'franchise') // Assujetti
print ' ';
print '';
- print ''.$langs->trans("Profit").' ';
+ print ''.$langs->trans("Profit").' ';
if ($modecompta == 'CREANCES-DETTES')
- print ''.price(price2num($total_ht, 'MT')).' ';
- print ''.price(price2num($total_ttc, 'MT')).' ';
+ print ''.price(price2num($total_ht, 'MT')).' ';
+ print ''.price(price2num($total_ttc, 'MT')).' ';
print ' ';
}
diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php
index 1e4dd5e5ef7..aad1d9d6e91 100644
--- a/htdocs/compta/salaries/class/paymentsalary.class.php
+++ b/htdocs/compta/salaries/class/paymentsalary.class.php
@@ -424,7 +424,7 @@ class PaymentSalary extends CommonObject
// Insert payment into llx_bank
// Add link 'payment_salary' in bank_url between payment and bank transaction
- $bank_line_id = $acc->addline(
+ $bank_line_id = $acc->addline(
$this->datep,
$this->type_payment,
$this->label,
@@ -467,7 +467,7 @@ class PaymentSalary extends CommonObject
$fuser->fetch($this->fk_user);
// Add link 'user' in bank_url between operation and bank transaction
- $result=$acc->add_url_line(
+ $result=$acc->add_url_line(
$bank_line_id,
$this->fk_user,
DOL_URL_ROOT.'/user/card.php?id=',
diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php
index cf894f79135..5335b8fc39e 100644
--- a/htdocs/compta/salaries/document.php
+++ b/htdocs/compta/salaries/document.php
@@ -89,7 +89,7 @@ if ($object->id)
$head=salaries_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment');
+ dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), -1, 'payment');
// Build file list
$filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1);
diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php
index 171e82612ce..87bef4e69d1 100644
--- a/htdocs/compta/sociales/document.php
+++ b/htdocs/compta/sociales/document.php
@@ -104,7 +104,7 @@ if ($object->id)
$head=tax_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("SocialContribution"), -1, 'bill');
+ dol_fiche_head($head, 'documents', $langs->trans("SocialContribution"), -1, 'bill');
$morehtmlref='';
// Label of social contribution
diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php
index 675783ba107..fffb63055aa 100644
--- a/htdocs/compta/stats/cabyprodserv.php
+++ b/htdocs/compta/stats/cabyprodserv.php
@@ -321,7 +321,7 @@ if ($modecompta == 'CREANCES-DETTES')
// Array header
print "
";
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("Product"),
$_SERVER["PHP_SELF"],
"ref",
@@ -331,7 +331,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans('Quantity'),
$_SERVER["PHP_SELF"],
"qty",
@@ -341,7 +341,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("Percentage"),
$_SERVER["PHP_SELF"],
"qty",
@@ -351,7 +351,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans('AmountHT'),
$_SERVER["PHP_SELF"],
"amount",
@@ -361,7 +361,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("AmountTTC"),
$_SERVER["PHP_SELF"],
"amount_ttc",
@@ -371,7 +371,7 @@ if ($modecompta == 'CREANCES-DETTES')
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("Percentage"),
$_SERVER["PHP_SELF"],
"amount_ttc",
diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php
index 810a7f9ee27..bb8819f9588 100644
--- a/htdocs/compta/tva/document.php
+++ b/htdocs/compta/tva/document.php
@@ -105,7 +105,7 @@ if ($object->id)
$head=vat_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("VATPayment"), -1, 'bill');
+ dol_fiche_head($head, 'documents', $langs->trans("VATPayment"), -1, 'bill');
$morehtmlref='';
// Label of social contribution
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
index 8928be1d626..4191563eaec 100644
--- a/htdocs/contact/consumption.php
+++ b/htdocs/contact/consumption.php
@@ -322,18 +322,15 @@ if (!empty($sql_select))
$sql.=")";
}
$sql.= $db->order($sortfield, $sortorder);
-//print ($sql);exit;
$resql=$db->query($sql);
$totalnboflines = $db->num_rows($resql);
$sql.= $db->plimit($limit + 1, $offset);
- //print $sql;
}
$disabled=0;
$showempty=2;
-if (empty($elementTypeArray) && ! $object->client && ! $object->fournisseur)
-{
+if (empty($elementTypeArray) && ! $object->thirdparty->client && ! $object->thirdparty->fournisseur) {
$showempty=$langs->trans("ThirdpartyNotCustomerNotSupplierSoNoRef");
$disabled=1;
}
@@ -491,9 +488,8 @@ if ($sql_select)
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
}
- if (($objp->info_bits & 2) == 2) { ?>
-
- info_bits & 2) == 2) {
+ print ' ';
$txt='';
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
@@ -501,9 +497,7 @@ if ($sql_select)
elseif ($objp->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
//else $txt=$langs->trans("Discount");
print $txt;
- ?>
-
- ';
if ($objp->description)
{
if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)
diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php
index 13a2036a5d7..03eab8be202 100644
--- a/htdocs/core/actions_massactions.inc.php
+++ b/htdocs/core/actions_massactions.inc.php
@@ -378,10 +378,10 @@ if (! $error && $massaction == 'confirm_presend')
$parameters=array('mode'=>'formemail');
- if ( ! empty( $listofobjectthirdparties ) ) {
+ if ( ! empty($listofobjectthirdparties) ) {
$parameters['listofobjectthirdparties'] = $listofobjectthirdparties;
}
- if ( ! empty( $listofobjectref ) ) {
+ if ( ! empty($listofobjectref) ) {
$parameters['listofobjectref'] = $listofobjectref;
}
diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php
index 89b001117ad..c38be982756 100644
--- a/htdocs/core/boxes/box_actions.php
+++ b/htdocs/core/boxes/box_actions.php
@@ -41,7 +41,7 @@ class box_actions extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -141,7 +141,7 @@ class box_actions extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="left" class="nowrap"',
+ 'td' => 'class="nowrap left"',
'text' => dol_print_date($datelimite, "dayhour"),
);
@@ -151,7 +151,7 @@ class box_actions extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $actionstatic->LibStatut($objp->percentage, 3),
);
@@ -160,7 +160,7 @@ class box_actions extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoActionsToDo"),
);
@@ -174,7 +174,7 @@ class box_actions extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
@@ -183,7 +183,7 @@ class box_actions extends ModeleBoxes
/**
* Method to show box
*
- * @param array $head Array with properties of box title
+ * @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return string
@@ -220,13 +220,13 @@ class box_actions extends ModeleBoxes
$dateligne=$contents[$line][4]['text'];
$percentage=$contents[$line][5]['text'];
$out.= '
';
- $out.= '';
+ $out.= ' ';
$out.= img_object("", $logo);
$out.= ' ';
- $out.= ''.$label.' ';
- $out.= ''.img_object("", $logosoc)." ".$nomsoc.' ';
- $out.= ''.$dateligne.' ';
- $out.= ''.$percentage.' ';
+ $out.= ''.$label.' ';
+ $out.= ''.img_object("", $logosoc)." ".$nomsoc.' ';
+ $out.= ''.$dateligne.' ';
+ $out.= ''.$percentage.' ';
$out.= ' ';
}
}
diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php
index 0b51d6bda38..44ca6cbf9e3 100644
--- a/htdocs/core/boxes/box_activity.php
+++ b/htdocs/core/boxes/box_activity.php
@@ -39,7 +39,7 @@ class box_activity extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $enabled = 1;
@@ -153,32 +153,32 @@ class box_activity extends ModeleBoxes
while ($j < count($data))
{
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
- 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
- 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
- 'logo' => 'object_propal'
+ 'td' => 'class="left" width="16"',
+ 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
+ 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
+ 'logo' => 'object_propal'
);
$this->info_box_contents[$line][1] = array(
- 'td' => '',
- 'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
+ 'td' => '',
+ 'text' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
);
$this->info_box_contents[$line][2] = array(
- 'td' => 'class="right"',
- 'text' => $data[$j]->nb,
- 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
- 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
+ 'td' => 'class="right"',
+ 'text' => $data[$j]->nb,
+ 'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
+ 'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
);
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="right"',
- 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
+ 'td' => 'class="right"',
+ 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
- 'td' => 'align="right" width="18"',
- 'text' => $propalstatic->LibStatut($data[$j]->fk_statut, 3),
+ 'td' => 'class="right" width="18"',
+ 'text' => $propalstatic->LibStatut($data[$j]->fk_statut, 3),
);
$line++;
@@ -236,7 +236,7 @@ class box_activity extends ModeleBoxes
$j=0;
while ($j < count($data)) {
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
+ 'td' => 'class="left" width="16"',
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut, 0, 0),
'logo' => 'object_order',
@@ -260,7 +260,7 @@ class box_activity extends ModeleBoxes
'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $commandestatic->LibStatut($data[$j]->fk_statut, 0, 3),
);
@@ -321,43 +321,43 @@ class box_activity extends ModeleBoxes
while ($j < count($data)) {
$billurl="search_status=2&paye=1&year=".$data[$j]->annee;
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
- 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0),
- 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
- 'logo' => 'bill',
+ 'td' => 'class="left" width="16"',
+ 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0),
+ 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
+ 'logo' => 'bill',
);
$this->info_box_contents[$line][1] = array(
- 'td' => '',
- 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0)." ".$data[$j]->annee,
+ 'td' => '',
+ 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0)." ".$data[$j]->annee,
);
$this->info_box_contents[$line][2] = array(
- 'td' => 'class="right"',
- 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0),
- 'text' => $data[$j]->nb,
- 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
+ 'td' => 'class="right"',
+ 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(1, $data[$j]->fk_statut, 0),
+ 'text' => $data[$j]->nb,
+ 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
);
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="right"',
- 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
+ 'td' => 'class="right"',
+ 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency)
);
// We add only for the current year
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][4] = array(
- 'td' => 'align="right" width="18"',
- 'text' => $facturestatic->LibStatut(1, $data[$j]->fk_statut, 3),
+ 'td' => 'class="right" width="18"',
+ 'text' => $facturestatic->LibStatut(1, $data[$j]->fk_statut, 3),
);
$line++;
$j++;
}
if (count($data)==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
- 'text'=>$langs->trans("NoRecordedInvoices"),
+ 'td' => 'class="center"',
+ 'text'=>$langs->trans("NoRecordedInvoices"),
);
}
@@ -403,49 +403,50 @@ class box_activity extends ModeleBoxes
while ($j < count($data)) {
$billurl="search_status=".$data[$j]->fk_statut."&paye=0";
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
- 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
- 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
- 'logo' => 'bill',
+ 'td' => 'class="left" width="16"',
+ 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
+ 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
+ 'logo' => 'bill',
);
$this->info_box_contents[$line][1] = array(
- 'td' => '',
- 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
+ 'td' => '',
+ 'text' => $langs->trans("Bills")." ".$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
);
$this->info_box_contents[$line][2] = array(
- 'td' => 'class="right"',
- 'text' => $data[$j]->nb,
- 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
- 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
+ 'td' => 'class="right"',
+ 'text' => $data[$j]->nb,
+ 'tooltip' => $langs->trans('Bills').' '.$facturestatic->LibStatut(0, $data[$j]->fk_statut, 0),
+ 'url' => DOL_URL_ROOT."/compta/facture/list.php?".$billurl."&mainmenu=accountancy&leftmenu=customers_bills",
);
$totalnb += $data[$j]->nb;
$this->info_box_contents[$line][3] = array(
- 'td' => 'class="right"',
- 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
+ 'td' => 'class="right"',
+ 'text' => price($data[$j]->Mnttot, 1, $langs, 0, 0, -1, $conf->currency),
);
$this->info_box_contents[$line][4] = array(
- 'td' => 'align="right" width="18"',
- 'text' => $facturestatic->LibStatut(0, $data[$j]->fk_statut, 3, $alreadypaid),
+ 'td' => 'class="right" width="18"',
+ 'text' => $facturestatic->LibStatut(0, $data[$j]->fk_statut, 3, $alreadypaid),
);
$line++;
$j++;
}
- if ($num==0)
+ if ($num==0) {
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
- 'text'=>$langs->trans("NoRecordedInvoices"),
- );
+ 'td' => 'class="center"',
+ 'text'=>$langs->trans("NoRecordedInvoices"),
+ );
+ }
}
}
// Add the sum in the bottom of the boxes
$this->info_box_contents[$line][0] = array('tr' => 'class="liste_total_wrap"');
- $this->info_box_contents[$line][1] = array('td' => 'align="left" class="liste_total" ', 'text' => $langs->trans("Total")." ".$textHead);
- $this->info_box_contents[$line][2] = array('td' => 'align="right" class="liste_total" ', 'text' => $totalnb);
- $this->info_box_contents[$line][3] = array('td' => 'align="right" class="liste_total" ', 'text' => '');
- $this->info_box_contents[$line][4] = array('td' => 'align="right" class="liste_total" ', 'text' => "");
+ $this->info_box_contents[$line][1] = array('td' => 'class="liste_total left" ', 'text' => $langs->trans("Total")." ".$textHead);
+ $this->info_box_contents[$line][2] = array('td' => 'class="liste_total right" ', 'text' => $totalnb);
+ $this->info_box_contents[$line][3] = array('td' => 'class="liste_total right" ', 'text' => '');
+ $this->info_box_contents[$line][4] = array('td' => 'class="liste_total right" ', 'text' => "");
}
diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php
index b228780aff0..08d10e7c6d5 100644
--- a/htdocs/core/boxes/box_bookmarks.php
+++ b/htdocs/core/boxes/box_bookmarks.php
@@ -37,7 +37,7 @@ class box_bookmarks extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -106,7 +106,7 @@ class box_bookmarks extends ModeleBoxes
$objp = $db->fetch_object($result);
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
+ 'td' => 'class="left" width="16"',
'logo' => $this->boximg,
'url' => $objp->url,
'tooltip' => $objp->title,
@@ -127,7 +127,7 @@ class box_bookmarks extends ModeleBoxes
$mytxt=$langs->trans("NoRecordedBookmarks");
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center" colspan="2"',
+ 'td' => 'class="center" colspan="2"',
'tooltip' => $mytxt,
'url'=> DOL_URL_ROOT.'/bookmarks/list.php', 'text'=>$mytxt,
);
@@ -143,7 +143,7 @@ class box_bookmarks extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php
index 873e81747e9..87378de74b3 100644
--- a/htdocs/core/boxes/box_clients.php
+++ b/htdocs/core/boxes/box_clients.php
@@ -41,7 +41,7 @@ class box_clients extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $enabled = 1;
var $info_box_head = array();
@@ -140,26 +140,28 @@ class box_clients extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $thirdpartystatic->LibStatut($objp->status, 3)
);
$line++;
}
- if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
+ if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedCustomers"));
$db->free($result);
}
else {
- $this->info_box_contents[0][0] = array( 'td' => '',
- 'maxlength'=>500,
- 'text' => ($db->error().' sql='.$sql));
+ $this->info_box_contents[0][0] = array(
+ 'td' => '',
+ 'maxlength'=>500,
+ 'text' => ($db->error().' sql='.$sql)
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php
index 8b3e647942c..3769a39faaf 100644
--- a/htdocs/core/boxes/box_commandes.php
+++ b/htdocs/core/boxes/box_commandes.php
@@ -41,7 +41,7 @@ class box_commandes extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -165,14 +165,14 @@ class box_commandes extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $commandestatic->LibStatut($objp->fk_statut, $objp->facture, 3),
);
$line++;
}
- if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
+ if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedOrders"));
$db->free($result);
} else {
@@ -184,7 +184,7 @@ class box_commandes extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php
index c24fc6add1b..7fafcb3bd10 100644
--- a/htdocs/core/boxes/box_comptes.php
+++ b/htdocs/core/boxes/box_comptes.php
@@ -42,7 +42,7 @@ class box_comptes extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $enabled = 1;
@@ -145,16 +145,16 @@ class box_comptes extends ModeleBoxes
foreach ($solde_total as $key=>$solde) {
$this->info_box_contents[$line][] = array(
'tr' => 'class="liste_total"',
- 'td' => 'align="left" class="liste_total"',
+ 'td' => 'class="liste_total left"',
'text' => $langs->trans('Total').' '.$key,
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" class="liste_total"',
+ 'td' => 'class="liste_total right"',
'text' => ' '
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" class="liste_total"',
+ 'td' => 'class="liste_total right"',
'text' => price($solde, 0, $langs, 0, -1, -1, $key)
);
$line++;
@@ -170,7 +170,7 @@ class box_comptes extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php
index 578940576d9..8fdd5483975 100644
--- a/htdocs/core/boxes/box_contacts.php
+++ b/htdocs/core/boxes/box_contacts.php
@@ -43,7 +43,7 @@ class box_contacts extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -147,7 +147,7 @@ class box_contacts extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" class="nowrap" width="18"',
+ 'td' => 'class="nowrap right" width="18"',
'text' => $contactstatic->getLibStatut(3),
'asis'=>1,
);
@@ -157,7 +157,7 @@ class box_contacts extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedContacts"),
);
@@ -171,7 +171,7 @@ class box_contacts extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php
index 6787203100f..a58081dffcf 100644
--- a/htdocs/core/boxes/box_contracts.php
+++ b/htdocs/core/boxes/box_contracts.php
@@ -161,7 +161,7 @@ class box_contracts extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center opacitymedium"',
+ 'td' => 'class="center opacitymedium"',
'text'=>$langs->trans("NoRecordedContracts"),
);
@@ -175,7 +175,7 @@ class box_contracts extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php
index 9d7b8d44b8a..38f865279e3 100644
--- a/htdocs/core/boxes/box_external_rss.php
+++ b/htdocs/core/boxes/box_external_rss.php
@@ -43,7 +43,7 @@ class box_external_rss extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $paramdef; // Params of box definition (not user params)
var $info_box_head = array();
@@ -111,7 +111,7 @@ class box_external_rss extends ModeleBoxes
'sublink' => $link,
'subtext'=>$langs->trans("LastRefreshDate").': '.($rssparser->getLastFetchDate()?dol_print_date($rssparser->getLastFetchDate(), "dayhourtext"):$langs->trans("Unknown")),
'subpicto'=>'help',
- 'target'=>'_blank',
+ 'target'=>'_blank',
);
}
@@ -163,7 +163,7 @@ class box_external_rss extends ModeleBoxes
$tooltip.= '
'.$description;
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="left" width="16"',
+ 'td' => 'class="left" width="16"',
'logo' => $this->boximg,
'url' => $href,
'tooltip' => $tooltip,
@@ -180,7 +180,7 @@ class box_external_rss extends ModeleBoxes
);
$this->info_box_contents[$line][2] = array(
- 'td' => 'align="right" nowrap="1"',
+ 'td' => 'class="right nowrap"',
'text' => $date,
);
}
diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php
index 9a344dec2fc..c78837cc3ac 100644
--- a/htdocs/core/boxes/box_factures.php
+++ b/htdocs/core/boxes/box_factures.php
@@ -39,7 +39,7 @@ class box_factures extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -83,8 +83,8 @@ class box_factures extends ModeleBoxes
$text = $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."CustomerBills", $max);
$this->info_box_head = array(
- 'text' => $text,
- 'limit'=> dol_strlen($text)
+ 'text' => $text,
+ 'limit'=> dol_strlen($text)
);
if ($user->rights->facture->lire) {
@@ -172,7 +172,7 @@ class box_factures extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3),
);
@@ -181,7 +181,7 @@ class box_factures extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedInvoices"),
);
@@ -195,7 +195,7 @@ class box_factures extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php
index 084cb6960b7..1f3c0a4c7df 100644
--- a/htdocs/core/boxes/box_factures_fourn.php
+++ b/htdocs/core/boxes/box_factures_fourn.php
@@ -40,7 +40,7 @@ class box_factures_fourn extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -81,7 +81,7 @@ class box_factures_fourn extends ModeleBoxes
$thirdpartytmp = new Fournisseur($db);
$this->info_box_head = array(
- 'text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."SupplierBills", $max)
+ 'text' => $langs->trans("BoxTitleLast".($conf->global->MAIN_LASTBOX_ON_OBJECT_DATE?"":"Modified")."SupplierBills", $max)
);
if ($user->rights->fournisseur->facture->lire)
@@ -177,7 +177,7 @@ class box_factures_fourn extends ModeleBoxes
$fac->fetch($objp->facid);
$alreadypaid=$fac->getSommePaiement();
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3, $alreadypaid, $objp->type),
);
@@ -186,7 +186,7 @@ class box_factures_fourn extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoModifiedSupplierBills"),
);
@@ -200,7 +200,7 @@ class box_factures_fourn extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->transnoentities("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php
index 031a495d714..b6fea0f450a 100644
--- a/htdocs/core/boxes/box_factures_fourn_imp.php
+++ b/htdocs/core/boxes/box_factures_fourn_imp.php
@@ -39,7 +39,7 @@ class box_factures_fourn_imp extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -164,7 +164,7 @@ class box_factures_fourn_imp extends ModeleBoxes
$fac->fetch($objp->facid);
$alreadypaid=$fac->getSommePaiement();
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3, $alreadypaid, $objp->type),
);
@@ -173,7 +173,7 @@ class box_factures_fourn_imp extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoUnpaidSupplierBills"),
);
@@ -187,7 +187,7 @@ class box_factures_fourn_imp extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
@@ -196,7 +196,7 @@ class box_factures_fourn_imp extends ModeleBoxes
/**
* Method to show box
*
- * @param array $head Array with properties of box title
+ * @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
* @param int $nooutput No print, only return string
* @return string
diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php
index 168d10ad612..d76477dc356 100644
--- a/htdocs/core/boxes/box_factures_imp.php
+++ b/htdocs/core/boxes/box_factures_imp.php
@@ -42,7 +42,7 @@ class box_factures_imp extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -171,14 +171,14 @@ class box_factures_imp extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3, $objp->am),
);
$line++;
}
- if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidCustomerBills"));
+ if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoUnpaidCustomerBills"));
$db->free($result);
}
@@ -193,7 +193,7 @@ class box_factures_imp extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php
index 9eb7f56097f..8dcd81c1aab 100644
--- a/htdocs/core/boxes/box_ficheinter.php
+++ b/htdocs/core/boxes/box_ficheinter.php
@@ -40,7 +40,7 @@ class box_ficheinter extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -114,45 +114,55 @@ class box_ficheinter extends ModeleBoxes
$ficheinterstatic->id=$objp->rowid;
$ficheinterstatic->ref=$objp->ref;
- $this->info_box_contents[$i][] = array('td' => '',
- 'text' => $ficheinterstatic->getNomUrl(1),
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => '',
+ 'text' => $ficheinterstatic->getNomUrl(1),
+ 'asis' => 1,
);
- $this->info_box_contents[$i][] = array('td' => 'align="left" width="16"',
- 'logo' => 'company',
- 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="left" width="16"',
+ 'logo' => 'company',
+ 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
+ );
- $this->info_box_contents[$i][] = array('td' => '',
- 'text' => dol_trunc($objp->name, 40),
- 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
+ $this->info_box_contents[$i][] = array(
+ 'td' => '',
+ 'text' => dol_trunc($objp->name, 40),
+ 'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid,
+ );
- $this->info_box_contents[$i][] = array('td' => 'class="right"',
- 'text' => dol_print_date($datec, 'day'));
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right"',
+ 'text' => dol_print_date($datec, 'day'),
+ );
- $this->info_box_contents[$i][] = array('td' => 'align="right" class="nowrap"',
- 'text' => $ficheinterstatic->getLibStatut(6),
- 'asis'=>1
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="nowrap right"',
+ 'text' => $ficheinterstatic->getLibStatut(6),
+ 'asis' => 1,
);
$i++;
}
- if ($num==0) $this->info_box_contents[$i][] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInterventions"));
+ if ($num==0) $this->info_box_contents[$i][] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedInterventions"));
$db->free($resql);
}
else
{
- $this->info_box_contents[0][] = array( 'td' => '',
- 'maxlength'=>500,
- 'text' => ($db->error().' sql='.$sql));
+ $this->info_box_contents[0][] = array(
+ 'td' => '',
+ 'maxlength'=>500,
+ 'text' => ($db->error().' sql='.$sql),
+ );
}
}
else
{
$this->info_box_contents[0][] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php
index 2335bab9a10..7cbefce2e32 100644
--- a/htdocs/core/boxes/box_fournisseurs.php
+++ b/htdocs/core/boxes/box_fournisseurs.php
@@ -40,7 +40,7 @@ class box_fournisseurs extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -124,7 +124,7 @@ class box_fournisseurs extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $thirdpartystatic->LibStatut($objp->status, 3),
);
@@ -132,7 +132,7 @@ class box_fournisseurs extends ModeleBoxes
}
if ($num==0) $this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedSuppliers"),
);
@@ -146,7 +146,7 @@ class box_fournisseurs extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php
index 6fad9ed8cb6..5d8b9f736f5 100644
--- a/htdocs/core/boxes/box_goodcustomers.php
+++ b/htdocs/core/boxes/box_goodcustomers.php
@@ -42,7 +42,7 @@ class box_goodcustomers extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $enabled = 1;
var $info_box_head = array();
@@ -136,26 +136,28 @@ class box_goodcustomers extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $thirdpartystatic->LibStatut($objp->status, 3)
);
$line++;
}
- if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
+ if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedCustomers"));
$db->free($result);
}
else {
- $this->info_box_contents[0][0] = array( 'td' => '',
- 'maxlength'=>500,
- 'text' => ($db->error().' sql='.$sql));
+ $this->info_box_contents[0][0] = array(
+ 'td' => '',
+ 'maxlength'=>500,
+ 'text' => ($db->error().' sql='.$sql),
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php
index 39b806e3ee3..e663c408281 100644
--- a/htdocs/core/boxes/box_graph_invoices_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_permonth.php
@@ -252,16 +252,16 @@ class box_graph_invoices_permonth extends ModeleBoxes
$stringtoshow.='
';
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover center"','textnoformat'=>$stringtoshow);
}
else
{
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"', 'maxlength'=>500, 'text' => $mesg);
+ $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'class="nohover left"', 'maxlength'=>500, 'text' => $mesg);
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
index a97368b1b4c..b8f020b4db7 100644
--- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
@@ -249,18 +249,21 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
$stringtoshow.='';
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"','td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"','td' => 'class="nohover center"','textnoformat'=>$stringtoshow);
}
else
{
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"',
- 'maxlength'=>500,
- 'text' => $mesg);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover left"',
+ 'maxlength'=>500,
+ 'text' => $mesg,
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php
index 9a137765708..98329df8379 100644
--- a/htdocs/core/boxes/box_graph_orders_permonth.php
+++ b/htdocs/core/boxes/box_graph_orders_permonth.php
@@ -248,18 +248,25 @@ class box_graph_orders_permonth extends ModeleBoxes
$stringtoshow.='';
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover center"',
+ 'textnoformat'=>$stringtoshow,
+ );
}
else
{
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"',
- 'maxlength'=>500,
- 'text' => $mesg);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover left"',
+ 'maxlength'=>500,
+ 'text' => $mesg,
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
index 5528af35c2f..9f7a457e238 100644
--- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
+++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
@@ -247,18 +247,25 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
$stringtoshow.='';
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover center"',
+ 'textnoformat'=>$stringtoshow,
+ );
}
else
{
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"',
- 'maxlength'=>500,
- 'text' => $mesg);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover left"',
+ 'maxlength'=>500,
+ 'text' => $mesg,
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php
index 0f3138e7cd7..e5ecb232ac1 100644
--- a/htdocs/core/boxes/box_graph_product_distribution.php
+++ b/htdocs/core/boxes/box_graph_product_distribution.php
@@ -38,7 +38,7 @@ class box_graph_product_distribution extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -392,12 +392,16 @@ class box_graph_product_distribution extends ModeleBoxes
$stringtoshow.=$px3->show();
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover center"',
+ 'textnoformat'=>$stringtoshow,
+ );
}
else
{
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'maxlength'=>500,
'text' => $mesg
);
diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php
index 975775df7ce..b27229107e0 100644
--- a/htdocs/core/boxes/box_graph_propales_permonth.php
+++ b/htdocs/core/boxes/box_graph_propales_permonth.php
@@ -251,18 +251,25 @@ class box_graph_propales_permonth extends ModeleBoxes
$stringtoshow.='';
$stringtoshow.='';
}
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="center" class="nohover"','textnoformat'=>$stringtoshow);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover center"',
+ 'textnoformat'=>$stringtoshow,
+ );
}
else
{
- $this->info_box_contents[0][0] = array('tr'=>'class="oddeven nohover"', 'td' => 'align="left" class="nohover"',
- 'maxlength'=>500,
- 'text' => $mesg);
+ $this->info_box_contents[0][0] = array(
+ 'tr'=>'class="oddeven nohover"',
+ 'td' => 'class="nohover left"',
+ 'maxlength' => 500,
+ 'text' => $mesg,
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php
index 34281d13c82..a0e0d55ebb1 100644
--- a/htdocs/core/boxes/box_last_modified_ticket.php
+++ b/htdocs/core/boxes/box_last_modified_ticket.php
@@ -1,7 +1,8 @@
- * 2016 Christophe Battarel
+ * Copyright (C) 2013-2016 Jean-François FERRY
+ * 2016 Christophe Battarel
+ * Copyright (C) 2019 Frédéric France
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,12 +35,12 @@ class box_last_modified_ticket extends ModeleBoxes
public $boximg = "ticket";
public $boxlabel;
public $depends = array("ticket");
-
+
/**
* @var DoliDB Database handler.
*/
public $db;
-
+
public $param;
public $info_box_head = array();
public $info_box_contents = array();
@@ -75,8 +76,10 @@ class box_last_modified_ticket extends ModeleBoxes
'limit' => dol_strlen($text)
);
- $this->info_box_contents[0][0] = array('td' => 'align="left"',
- 'text' => $langs->trans("BoxLastModifiedTicketContent"));
+ $this->info_box_contents[0][0] = array(
+ 'td' => 'class="left"',
+ 'text' => $langs->trans("BoxLastModifiedTicketContent"),
+ );
if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
@@ -119,39 +122,42 @@ class box_last_modified_ticket extends ModeleBoxes
// Picto
$this->info_box_contents[$i][0] = array(
- 'td' => 'align="left" width="16"',
- 'logo' => $this->boximg,
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1));
+ 'td' => 'class="left" width="16"',
+ 'logo' => $this->boximg,
+ 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
+ );
$r++;
// Id
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
- 'text' => $objp->ref,
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1));
+ 'td' => 'class="left"',
+ 'text' => $objp->ref,
+ 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
+ );
$r++;
// Subject
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
- 'text' => $objp->subject, // Some event have no ref
- 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1));
+ 'td' => 'class="left"',
+ 'text' => $objp->subject, // Some event have no ref
+ 'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
+ );
$r++;
// Customer
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
- 'logo' => ($objp->fk_soc>0?'company':''),
- 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email),
- 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'')
+ 'td' => 'class="left"',
+ 'logo' => ($objp->fk_soc>0?'company':''),
+ 'text' => ($objp->company_name?$objp->company_name:$objp->origin_email),
+ 'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'')
);
$r++;
// Date creation
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="right"',
- 'text' => dol_print_date($db->idate($objp->datec), 'dayhour')
+ 'td' => 'class="right"',
+ 'text' => dol_print_date($db->idate($objp->datec), 'dayhour')
);
$r++;
@@ -159,8 +165,8 @@ class box_last_modified_ticket extends ModeleBoxes
$ticketstat = new Ticket($this->db);
$ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="right"',
- 'text' => $ticketstat->getLibStatut(3)
+ 'td' => 'class="right"',
+ 'text' => $ticketstat->getLibStatut(3)
);
$r++;
@@ -168,14 +174,16 @@ class box_last_modified_ticket extends ModeleBoxes
}
if ($num==0) {
- $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("BoxLastModifiedTicketNoRecordedTickets"));
+ $this->info_box_contents[$i][0] = array('td' => 'class="center"','text'=>$langs->trans("BoxLastModifiedTicketNoRecordedTickets"));
}
} else {
dol_print_error($db);
}
} else {
- $this->info_box_contents[0][0] = array('td' => 'align="left"',
- 'text' => $langs->trans("ReadPermissionNotAllowed"));
+ $this->info_box_contents[0][0] = array(
+ 'td' => 'class="left"',
+ 'text' => $langs->trans("ReadPermissionNotAllowed"),
+ );
}
}
diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php
index a1a52c3070d..45a4b5e8f02 100644
--- a/htdocs/core/boxes/box_last_ticket.php
+++ b/htdocs/core/boxes/box_last_ticket.php
@@ -34,12 +34,12 @@ class box_last_ticket extends ModeleBoxes
public $boximg = "ticket";
public $boxlabel;
public $depends = array("ticket");
-
+
/**
* @var DoliDB Database handler.
*/
public $db;
-
+
public $param;
public $info_box_head = array();
public $info_box_contents = array();
@@ -75,8 +75,10 @@ class box_last_ticket extends ModeleBoxes
'limit' => dol_strlen($text),
);
- $this->info_box_contents[0][0] = array('td' => 'align="left"',
- 'text' => $langs->trans("BoxLastTicketContent"));
+ $this->info_box_contents[0][0] = array(
+ 'td' => 'class="left"',
+ 'text' => $langs->trans("BoxLastTicketContent"),
+ );
if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
@@ -120,28 +122,31 @@ class box_last_ticket extends ModeleBoxes
// Picto
$this->info_box_contents[$i][0] = array(
- 'td' => 'align="left" width="16"',
+ 'td' => 'class="left" width="16"',
'logo' => $this->boximg,
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1));
+ 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
+ );
$r++;
// Id
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
+ 'td' => 'class="left"',
'text' => $objp->ref,
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1));
+ 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
+ );
$r++;
// Subject
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
+ 'td' => 'class="left"',
'text' => $objp->subject, // Some event have no ref
- 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1));
+ 'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
+ );
$r++;
// Customer
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="left"',
+ 'td' => 'class="left"',
'logo' => ($objp->fk_soc > 0 ? 'company' : ''),
'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email),
'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''),
@@ -150,7 +155,7 @@ class box_last_ticket extends ModeleBoxes
// Date creation
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="right"',
+ 'td' => 'class="right"',
'text' => dol_print_date($db->idate($objp->datec), 'dayhour'),
);
$r++;
@@ -159,7 +164,7 @@ class box_last_ticket extends ModeleBoxes
$ticketstat = new Ticket($this->db);
$ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array(
- 'td' => 'align="right"',
+ 'td' => 'class="right"',
'text' => $ticketstat->getLibStatut(3),
);
$r++;
@@ -168,13 +173,13 @@ class box_last_ticket extends ModeleBoxes
}
if ($num == 0) {
- $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("BoxLastTicketNoRecordedTickets"));
+ $this->info_box_contents[$i][0] = array('td' => 'class="center"', 'text' => $langs->trans("BoxLastTicketNoRecordedTickets"));
}
} else {
dol_print_error($db);
}
} else {
- $this->info_box_contents[0][0] = array('td' => 'align="left"',
+ $this->info_box_contents[0][0] = array('td' => 'class="left"',
'text' => $langs->trans("ReadPermissionNotAllowed"));
}
}
diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php
index 9ec075c6d29..e6ddca4ac1e 100644
--- a/htdocs/core/boxes/box_members.php
+++ b/htdocs/core/boxes/box_members.php
@@ -41,7 +41,7 @@ class box_members extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $enabled = 1;
@@ -141,7 +141,7 @@ class box_members extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $memberstatic->LibStatut($objp->status, $objp->subscription, $db->jdate($objp->date_end_subscription), 3),
);
@@ -150,7 +150,7 @@ class box_members extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedCustomers"),
);
@@ -164,7 +164,7 @@ class box_members extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php
index ba8843f51cd..a44992832d9 100644
--- a/htdocs/core/boxes/box_produits.php
+++ b/htdocs/core/boxes/box_produits.php
@@ -183,13 +183,13 @@ class box_produits extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => ''.$productstatic->LibStatut($objp->tosell, 3, 0).'',
'asis' => 1
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => ''.$productstatic->LibStatut($objp->tobuy, 3, 1).' ',
'asis' => 1
);
@@ -198,7 +198,7 @@ class box_produits extends ModeleBoxes
}
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedProducts"),
);
@@ -212,7 +212,7 @@ class box_produits extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php
index cac4d20ed80..c8c3d9c94b6 100644
--- a/htdocs/core/boxes/box_produits_alerte_stock.php
+++ b/htdocs/core/boxes/box_produits_alerte_stock.php
@@ -44,7 +44,7 @@ class box_produits_alerte_stock extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -187,18 +187,19 @@ class box_produits_alerte_stock extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="center"',
- 'text' => $objp->total_stock . ' / '.$objp->seuil_stock_alerte,
- 'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit", $objp->seuil_stock_alerte)));
+ 'td' => 'class="center"',
+ 'text' => $objp->total_stock . ' / '.$objp->seuil_stock_alerte,
+ 'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit", $objp->seuil_stock_alerte)),
+ );
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => ''.$productstatic->LibStatut($objp->tosell, 3, 0).'',
'asis' => 1
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => ''.$productstatic->LibStatut($objp->tobuy, 3, 0).'',
'asis' => 1
);
@@ -207,7 +208,7 @@ class box_produits_alerte_stock extends ModeleBoxes
}
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoTooLowStockProducts"),
);
@@ -224,7 +225,7 @@ class box_produits_alerte_stock extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php
index 3d7fb62837a..7ab97832637 100644
--- a/htdocs/core/boxes/box_project.php
+++ b/htdocs/core/boxes/box_project.php
@@ -174,11 +174,11 @@ class box_project extends ModeleBoxes
'text' => " ",
);
$this->info_box_contents[$i][] = array(
- 'td' => 'align="right" ',
+ 'td' => 'class="right" ',
'text' => round($num, 0)." ".$langs->trans("Projects"),
);
$this->info_box_contents[$i][] = array(
- 'td' => 'align="right" ',
+ 'td' => 'class="right" ',
'text' => (($max < $num) ? '' : (round($totalnbTask, 0)." ".$langs->trans("Tasks"))),
);
$this->info_box_contents[$i][] = array(
diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php
index 57c7f056572..9176cb9f013 100644
--- a/htdocs/core/boxes/box_propales.php
+++ b/htdocs/core/boxes/box_propales.php
@@ -41,7 +41,7 @@ class box_propales extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
@@ -151,7 +151,7 @@ class box_propales extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $propalstatic->LibStatut($objp->fk_statut, 3),
);
@@ -160,7 +160,7 @@ class box_propales extends ModeleBoxes
if ($num==0)
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedProposals"),
);
@@ -174,7 +174,7 @@ class box_propales extends ModeleBoxes
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php
index a730a33f8b1..ab82dc7a490 100644
--- a/htdocs/core/boxes/box_prospect.php
+++ b/htdocs/core/boxes/box_prospect.php
@@ -43,7 +43,7 @@ class box_prospect extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $enabled = 1;
var $info_box_head = array();
@@ -134,35 +134,36 @@ class box_prospect extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => str_replace('img ', 'img height="14" ', $thirdpartystatic->LibProspCommStatut($objp->fk_stcomm, 3)),
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $thirdpartystatic->LibStatut($objp->status, 3),
);
$line++;
}
- if ($num==0)
+ if ($num==0) {
$this->info_box_contents[$line][0] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text'=>$langs->trans("NoRecordedProspects"),
- );
+ );
+ }
$db->free($resql);
} else {
$this->info_box_contents[0][0] = array(
'td' => '',
- 'maxlength'=>500,
+ 'maxlength' => 500,
'text' => ($db->error().' sql='.$sql),
);
}
} else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php
index 65ed4ca98a0..00193fc427e 100644
--- a/htdocs/core/boxes/box_services_contracts.php
+++ b/htdocs/core/boxes/box_services_contracts.php
@@ -190,44 +190,52 @@ class box_services_contracts extends ModeleBoxes
}
- $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
- 'text' => $s,
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
+ 'text' => $s,
+ 'asis' => 1
);
- $this->info_box_contents[$i][] = array('td' => '',
- 'text' => $contractstatic->getNomUrl(1),
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => '',
+ 'text' => $contractstatic->getNomUrl(1),
+ 'asis' => 1
);
- $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
- 'text' => $thirdpartytmp->getNomUrl(1),
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
+ 'text' => $thirdpartytmp->getNomUrl(1),
+ 'asis' => 1
);
- $this->info_box_contents[$i][] = array('td' => '',
- 'text' => dol_print_date($datem, 'day'));
+ $this->info_box_contents[$i][] = array(
+ 'td' => '',
+ 'text' => dol_print_date($datem, 'day'),
+ );
- $this->info_box_contents[$i][] = array('td' => 'align="right" width="18"',
- 'text' => $contratlignestatic->LibStatut($objp->statut, 3)
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right" width="18"',
+ 'text' => $contratlignestatic->LibStatut($objp->statut, 3)
);
$i++;
}
- if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoContractedProducts"));
+ if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'class="center"','text'=>$langs->trans("NoContractedProducts"));
$db->free($result);
}
else
{
- $this->info_box_contents[0][0] = array( 'td' => '',
- 'maxlength'=>500,
- 'text' => ($db->error().' sql='.$sql));
+ $this->info_box_contents[0][0] = array(
+ 'td' => '',
+ 'maxlength' => 500,
+ 'text' => ($db->error().' sql='.$sql),
+ );
}
}
else {
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php
index d93875fbd0c..0c5d1a01632 100644
--- a/htdocs/core/boxes/box_services_expired.php
+++ b/htdocs/core/boxes/box_services_expired.php
@@ -132,22 +132,28 @@ class box_services_expired extends ModeleBoxes
$dateline=$db->jdate($objp->date_line);
if (($dateline + $conf->contrat->services->expires->warning_delay) < $now) $late=img_warning($langs->trans("Late"));
- $this->info_box_contents[$i][] = array('td' => '',
- 'text' => $contract->getNomUrl(1),
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => '',
+ 'text' => $contract->getNomUrl(1),
+ 'asis' => 1
);
- $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone" align="left"',
- 'text' => $thirdpartytmp->getNomUrl(1, 'customer'),
- 'asis' => 1
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone left"',
+ 'text' => $thirdpartytmp->getNomUrl(1, 'customer'),
+ 'asis' => 1
);
- $this->info_box_contents[$i][] = array('td' => 'align="center"',
- 'text' => dol_print_date($dateline, 'day'),
- 'text2'=> $late);
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="center"',
+ 'text' => dol_print_date($dateline, 'day'),
+ 'text2'=> $late,
+ );
- $this->info_box_contents[$i][] = array('td' => 'class="right"',
- 'text' => $objp->nb_services);
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="right"',
+ 'text' => $objp->nb_services,
+ );
$i++;
@@ -156,22 +162,27 @@ class box_services_expired extends ModeleBoxes
if ($num==0)
{
$langs->load("contracts");
- $this->info_box_contents[$i][] = array('td' => 'align="center" class="nohover opacitymedium"','text'=>$langs->trans("NoExpiredServices"));
+ $this->info_box_contents[$i][] = array(
+ 'td' => 'class="nohover opacitymedium center"',
+ 'text' => $langs->trans("NoExpiredServices"),
+ );
}
$db->free($resql);
}
else
{
- $this->info_box_contents[0][] = array( 'td' => '',
- 'maxlength'=>500,
- 'text' => ($db->error().' sql='.$sql));
+ $this->info_box_contents[0][] = array(
+ 'td' => '',
+ 'maxlength'=>500,
+ 'text' => ($db->error().' sql='.$sql),
+ );
}
}
else
{
$this->info_box_contents[0][0] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php
index 7a14d2ac1fe..f9a47fe8c83 100644
--- a/htdocs/core/boxes/box_supplier_orders.php
+++ b/htdocs/core/boxes/box_supplier_orders.php
@@ -40,7 +40,7 @@ class box_supplier_orders extends ModeleBoxes
* @var DoliDB Database handler.
*/
public $db;
-
+
var $param;
var $info_box_head = array();
var $info_box_contents = array();
@@ -145,7 +145,7 @@ class box_supplier_orders extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
- 'td' => 'align="right" width="18"',
+ 'td' => 'class="right" width="18"',
'text' => $supplierorderstatic->LibStatut($objp->fk_statut, 3),
);
@@ -154,7 +154,7 @@ class box_supplier_orders extends ModeleBoxes
if ($num == 0)
$this->info_box_contents[$line][] = array(
- 'td' => 'align="center"',
+ 'td' => 'class="center"',
'text' => $langs->trans("NoSupplierOrder"),
);
@@ -170,7 +170,7 @@ class box_supplier_orders extends ModeleBoxes
else
{
$this->info_box_contents[0][] = array(
- 'td' => 'align="left" class="nohover opacitymedium"',
+ 'td' => 'class="nohover opacitymedium left"',
'text' => $langs->trans("ReadPermissionNotAllowed")
);
}
diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php
index b15380fed98..181de1f8696 100644
--- a/htdocs/core/boxes/box_task.php
+++ b/htdocs/core/boxes/box_task.php
@@ -84,7 +84,7 @@ class box_task extends ModeleBoxes
$totalDuree=0;
$totalplannedtot=0;
$totaldurationtot=0;
-
+
include_once DOL_DOCUMENT_ROOT."/projet/class/task.class.php";
$taskstatic=new Task($db);
@@ -125,7 +125,7 @@ class box_task extends ModeleBoxes
$this->info_box_contents[$i][] = array('td' => 'class="right"', 'text' => ConvertSecondToTime($objp->durationtot, 'all', 25200, 5));
$totaldurationtot += $objp->durationtot;
- $this->info_box_contents[$i][] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut, 3));
+ $this->info_box_contents[$i][] = array('td' => 'class="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut, 3));
$i++;
}
@@ -136,9 +136,9 @@ class box_task extends ModeleBoxes
// Add the sum at the bottom of the boxes
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
- $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
- $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot, 'all', 25200, 5));
- $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot, 'all', 25200, 5));
+ $this->info_box_contents[$i][] = array('td' => 'class="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
+ $this->info_box_contents[$i][] = array('td' => 'class="right" ', 'text' => ConvertSecondToTime($totalplannedtot, 'all', 25200, 5));
+ $this->info_box_contents[$i][] = array('td' => 'class="right" ', 'text' => ConvertSecondToTime($totaldurationtot, 'all', 25200, 5));
$this->info_box_contents[$i][] = array('td' => '', 'text' => "");
}
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index c46c40999f5..c64b408336c 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -1292,21 +1292,20 @@ class CMailFile
dol_syslog("Try socket connection to host=".$host." port=".$port);
//See if we can connect to the SMTP server
- if ($socket = @fsockopen(
+ if ($socket = @fsockopen(
$host, // Host to test, IP or domain. Add ssl:// for SSL/TLS.
$port, // which Port number to use
$errno, // actual system level error
$errstr, // and any text that goes with the error
- $timeout
- )) // timeout for reading/writing data over the socket
- {
+ $timeout // timeout for reading/writing data over the socket
+ )) {
// Windows still does not have support for this timeout function
if (function_exists('stream_set_timeout')) stream_set_timeout($socket, $timeout, 0);
dol_syslog("Now we wait for answer 220");
// Check response from Server
- if ( $_retVal = $this->server_parse($socket, "220") ) $_retVal = $socket;
+ if ($_retVal = $this->server_parse($socket, "220")) $_retVal = $socket;
}
else
{
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 42d138402e9..235dde63096 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -882,7 +882,7 @@ abstract class CommonDocGenerator
// Sorting
- uasort ( $this->cols, array( $this, 'columnSort' ) );
+ uasort ($this->cols, array( $this, 'columnSort' ));
// Positionning
$curX = $this->page_largeur-$this->marge_droite; // start from right
@@ -899,7 +899,7 @@ abstract class CommonDocGenerator
if(!empty($colDef['scale'])){
// In case of column widht is defined by percentage
- $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100 );
+ $colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100);
}
if(empty($colDef['width'])){
@@ -1049,7 +1049,7 @@ abstract class CommonDocGenerator
if(empty($columnText)) return;
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
$colDef = $this->cols[$colKey];
- $pdf->writeHTMLCell( $this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']);
+ $pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']);
}
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 7fe050d8c59..1f86d60598c 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -7183,8 +7183,8 @@ abstract class CommonObject
if (! $error)
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element;
- $sql.= ' ('.implode( ", ", $keys ).')';
- $sql.= ' VALUES ('.implode( ", ", $values ).')';
+ $sql.= ' ('.implode(", ", $keys).')';
+ $sql.= ' VALUES ('.implode(", ", $values).')';
$res = $this->db->query($sql);
if ($res===false) {
@@ -7312,7 +7312,7 @@ abstract class CommonObject
}*/
}
- $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode( ',', $tmp ).' WHERE rowid='.$this->id ;
+ $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id ;
$this->db->begin();
if (! $error)
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 973bfe961b8..921878aef73 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1346,11 +1346,11 @@ class ExtraFields
// Init des compteurs
$nbPregRepl = $nbPregSel = 0;
// On retire toutes les parenthèses sans = avant
- $InfoFieldList[4]=preg_replace( '#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl);
+ $InfoFieldList[4]=preg_replace('#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl);
// On retire les espaces autour des = et parenthèses
$InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]);
// On retire toutes les parenthèses avec = avant
- $InfoFieldList[4]=preg_replace( '#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel);
+ $InfoFieldList[4]=preg_replace('#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel);
// On retire les espaces autour des = et parenthèses
$InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]);
diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index 64b67263335..0db47d1ade0 100644
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -145,7 +145,7 @@ class HookManager
// Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray).
$hooktype='output';
- if (in_array(
+if (in_array(
$method,
array(
'addCalendarChoice',
@@ -265,8 +265,14 @@ class HookManager
//dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG);
$resaction = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
- if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
+ if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray=array_merge($this->resArray, $actionclassinstance->results);
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
+ if (is_numeric($resaction) && $resaction < 0)
+ {
+ $error++;
+ $this->error=$actionclassinstance->error; $this->errors=array_merge($this->errors, (array) $actionclassinstance->errors);
+ dol_syslog("Error on hook module=".$module.", method ".$method.", class ".get_class($actionclassinstance).", hooktype=".$hooktype.(empty($this->error)?'':" ".$this->error).(empty($this->errors)?'':" ".join(",", $this->errors)), LOG_ERR);
+ }
// TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string but an int. you must use $actionclassinstance->resprints to return a string
if (! is_array($resaction) && ! is_numeric($resaction))
{
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 3ed57a60aec..1eb83393652 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1526,7 +1526,7 @@ class Form
'showsoc'=>$showsoc,
);
- $reshook = $hookmanager->executeHooks( 'afterSelectContactOptions', $parameters, $this, $action ); // Note that $action and $object may have been modified by some hooks
+ $reshook = $hookmanager->executeHooks('afterSelectContactOptions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($htmlname != 'none' && ! $options_only)
{
@@ -4076,7 +4076,7 @@ class Form
$formconfirm.= ' ';
$formconfirm.= $this->selectyesno("confirm", $newselectedchoice);
$formconfirm.= ' ';
- $formconfirm.= ' ';
+ $formconfirm.= ' trans("Validate").'"> ';
$formconfirm.= ' '."\n";
$formconfirm.= '
'."\n";
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index dd9cb1da961..f8733420abb 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -220,12 +220,12 @@ class FormActions
print '';
print '
';
print '';
- print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
- print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
- print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
+ print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
+ print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
+ print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1);
- print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1);
- print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1);
+ print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1);
+ print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1);
print ' ';
print "\n";
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 282320444cd..c60b6675a1d 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -757,6 +757,9 @@ class FormCompany
}
print "";
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+
+ print ajax_combobox($htmlname);
+
print "\n";
}
}
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 9bf04b4ee1e..bfd84a1795e 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1722,7 +1722,7 @@ class FormFile
print '';
print '';
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("Links"),
$_SERVER['PHP_SELF'],
"name",
@@ -1732,7 +1732,7 @@ class FormFile
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
"",
"",
"",
@@ -1740,7 +1740,7 @@ class FormFile
"",
'class="right"'
);
- print_liste_field_titre(
+print_liste_field_titre(
$langs->trans("Date"),
$_SERVER['PHP_SELF'],
"date",
@@ -1750,7 +1750,7 @@ class FormFile
$sortfield,
$sortorder
);
- print_liste_field_titre(
+print_liste_field_titre(
'',
$_SERVER['PHP_SELF'],
"",
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 06fd860a560..752d2406ea4 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -426,12 +426,11 @@ class FormMail extends Form
$out.= ' ';
$out.= ' ';
$out.= '';
- }
- elseif (! empty($this->param['models']) && in_array($this->param['models'], array(
+ } elseif (! empty($this->param['models']) && in_array($this->param['models'], array(
'propal_send','order_send','facture_send',
'shipping_send','fichinter_send','supplier_proposal_send','order_supplier_send',
'invoice_supplier_send','thirdparty','contract','user','all'
- )))
+ )))
{
// If list of template is empty
$out.= ''."\n";
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 4404e5563d3..765f7d00d79 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -90,7 +90,7 @@ class FormProjets
$selected_input_value=$project->ref;
}
$urloption='socid='.$socid.'&htmlname='.$htmlname.'&discardclosed='.$discard_closed;
- $out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
+$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
// 'update' => array(
// 'projectid' => 'id'
// )
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 770e1fe08d0..4b03886a714 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -157,12 +157,12 @@ class FormTicket
}
print '
';
- print '
';
+ print '';
if ($this->withref) {
// Ref
$defaultref = $ticketstat->getDefaultRef();
- print '' . $langs->trans("Ref") . ' ';
+ print '' . $langs->trans("Ref") . ' ';
}
// FK_USER_CREATE
@@ -249,6 +249,7 @@ class FormTicket
// If no socid, set to -1 to avoid full contacts list
$selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
$nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
+ print ' ';
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');
print '';
} else {
@@ -293,16 +294,16 @@ class FormTicket
print $this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
print '';
- // Category
- print '' . $langs->trans("TicketCategory") . ' ';
- print $this->selectCategoriesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
- print ' ';
-
// Severity
print '' . $langs->trans("TicketSeverity") . ' ';
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
print ' ';
+ // Category
+ print '' . $langs->trans("TicketCategory") . ' ';
+ print $this->selectAnalyticCodesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
+ print ' ';
+
// Notify thirdparty at creation
if (empty($this->ispublic))
{
@@ -338,7 +339,7 @@ class FormTicket
}
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$uselocalbrowser = true;
- $doleditor = new DolEditor('message', GETPOST('message', 'alpha'), '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser);
+ $doleditor = new DolEditor('message', GETPOST('message', 'alpha'), '100%', 230, 'dolibarr_details', 'In', true, $uselocalbrowser);
$doleditor->Create();
print '';
@@ -519,7 +520,7 @@ class FormTicket
}
/**
- * Return html list of ticket categories
+ * Return html list of ticket anaytic codes
*
* @param string $selected Id categorie pre-selectionnée
* @param string $htmlname Nom de la zone select
@@ -531,7 +532,7 @@ class FormTicket
* @param string $morecss More CSS
* @return void
*/
- public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
+ public function selectAnalyticCodesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
{
global $langs, $user;
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 85e0059c22c..772b3db29e3 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -530,7 +530,7 @@ class Notify
if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message'];
}
- $mailfile = new CMailFile(
+ $mailfile = new CMailFile(
$subject,
$sendto,
$replyto,
@@ -758,7 +758,7 @@ class Notify
if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject'];
if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message'];
}
- $mailfile = new CMailFile(
+ $mailfile = new CMailFile(
$subject,
$sendto,
$replyto,
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index 61c8f2a4bed..f59ad79c430 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -377,14 +377,13 @@ class SMTPs
else
{
//See if we can connect to the SMTP server
- if ($this->socket = @fsockopen(
+ if ($this->socket = @fsockopen(
preg_replace('@tls://@i', '', $this->getHost()), // Host to 'hit', IP or domain
$this->getPort(), // which Port number to use
$this->errno, // actual system level error
$this->errstr, // and any text that goes with the error
- $this->_smtpTimeout
- )) // timeout for reading/writing data over the socket
- {
+ $this->_smtpTimeout // timeout for reading/writing data over the socket
+ )) {
// Fix from PHP SMTP class by 'Chris Ryan'
// Sometimes the SMTP server takes a little longer to respond
// so we will give it a longer timeout for the first read
@@ -990,7 +989,7 @@ class SMTPs
$aryHost = $this->_msgRecipients;
// Only run this if we have something
- if ( !empty ($_addrList ))
+ if ( !empty ($_addrList))
{
// $_addrList can be a STRING or an array
if ( is_string($_addrList) )
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index 1899d78694e..6cacf353ca1 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -613,12 +613,13 @@ class Utils
$FILENAMEASCII=strtolower($module).'.asciidoc';
$FILENAMEDOC=strtolower($module).'.html'; // TODO Use/text PDF
- $dirofmodule = dol_buildpath(strtolower($module), 0).'/doc';
+ $dirofmodule = dol_buildpath(strtolower($module), 0);
+ $dirofmoduledoc = dol_buildpath(strtolower($module), 0).'/doc';
$dirofmoduletmp = dol_buildpath(strtolower($module), 0).'/doc/temp';
- $outputfiledoc = $dirofmodule.'/'.$FILENAMEDOC;
- if ($dirofmodule)
+ $outputfiledoc = $dirofmoduledoc.'/'.$FILENAMEDOC;
+ if ($dirofmoduledoc)
{
- if (! dol_is_dir($dirofmodule)) dol_mkdir($dirofmodule);
+ if (! dol_is_dir($dirofmoduledoc)) dol_mkdir($dirofmoduledoc);
if (! dol_is_dir($dirofmoduletmp)) dol_mkdir($dirofmoduletmp);
if (! is_writable($dirofmoduletmp))
{
@@ -626,6 +627,13 @@ class Utils
return -1;
}
+ $conf->global->MODULEBUILDER_ASCIIDOCTOR='asciidoctor';
+ if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR))
+ {
+ $this->error = 'Setup of module ModuleBuilder not complete';
+ return -1;
+ }
+
$destfile=$dirofmoduletmp.'/'.$FILENAMEASCII;
$fhandle = fopen($destfile, 'w+');
@@ -637,6 +645,7 @@ class Utils
foreach ($specs as $spec)
{
if (preg_match('/notindoc/', $spec['relativename'])) continue; // Discard file
+ if (preg_match('/example/', $spec['relativename'])) continue; // Discard file
if (preg_match('/disabled/', $spec['relativename'])) continue; // Discard file
$pathtofile = strtolower($module).'/doc/'.$spec['relativename'];
@@ -662,17 +671,26 @@ class Utils
// TODO
fwrite($fhandle, "TODO...");
+
+ fwrite($fhandle, "\n\n\n== CHANGELOG...\n\n");
+
+ // TODO
+ fwrite($fhandle, "TODO...");
+
+
+
fclose($fhandle);
}
- $conf->global->MODULEBUILDER_ASCIIDOCTOR='asciidoctor';
- if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR))
- {
- dol_print_error('', 'Module setup not complete');
- exit;
- }
+ // Copy some files into temp directory
+ dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1);
+ dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1);
- $command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmodule.'/'.$FILENAMEDOC;
+ // Launch doc generation
+ $currentdir = getcwd();
+ chdir($dirofmodule);
+
+ $command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC;
$outfile=$dirofmoduletmp.'/out.tmp';
require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php';
@@ -683,6 +701,8 @@ class Utils
$this->error = $resarray['error'].' '.$resarray['output'];
}
$result = ($resarray['result'] == 0) ? 1 : 0;
+
+ chdir($currentdir);
}
else
{
diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php
index 72722a1a948..9f202644238 100644
--- a/htdocs/core/filemanagerdol/connectors/php/basexml.php
+++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php
@@ -93,7 +93,7 @@ function SendError($number, $text)
if ( $_GET['Command'] == 'FileUpload' )
SendUploadResults($number, "", "", $text);
- if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] )
+ if ( isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent'] )
{
SendErrorNode($number, $text);
CreateXmlFooter();
diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php
index cf7caa6dc2b..f54fcc61c0d 100644
--- a/htdocs/core/filemanagerdol/connectors/php/commands.php
+++ b/htdocs/core/filemanagerdol/connectors/php/commands.php
@@ -140,7 +140,7 @@ function CreateFolder($resourceType, $currentFolder)
$sErrorNumber = '0' ;
$sErrorMsg = '' ;
- if ( isset( $_GET['NewFolderName'] ) )
+ if ( isset($_GET['NewFolderName']) )
{
$sNewFolderName = $_GET['NewFolderName'] ;
$sNewFolderName = SanitizeFolderName($sNewFolderName);
@@ -202,7 +202,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
$sErrorNumber = '0' ;
$sFileName = '' ;
- if ( isset( $_FILES['NewFile'] ) && !is_null($_FILES['NewFile']['tmp_name'])
+ if ( isset($_FILES['NewFile']) && !is_null($_FILES['NewFile']['tmp_name'])
// This is for the QuickUpload tab box
or (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name'])))
{
@@ -223,7 +223,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
$sExtension = substr($sFileName, (strrpos($sFileName, '.') + 1));
$sExtension = strtolower($sExtension);
- if ( isset( $Config['SecureImageUploads'] ) )
+ if ( isset($Config['SecureImageUploads']) )
{
if ( ( $isImageValid = IsImageValid($oFile['tmp_name'], $sExtension) ) === false )
{
@@ -231,7 +231,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
}
}
- if ( isset( $Config['HtmlExtensions'] ) )
+ if ( isset($Config['HtmlExtensions']) )
{
if (!IsHtmlExtension($sExtension, $Config['HtmlExtensions']) &&
($detectHtml = DetectHtml($oFile['tmp_name'])) === true)
@@ -261,13 +261,13 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
if ( is_file($sFilePath) )
{
- if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] )
+ if ( isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload'] )
{
break ;
}
$permissions = '0777';
- if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] )
+ if ( isset($Config['ChmodOnUpload']) && $Config['ChmodOnUpload'] )
{
$permissions = (string) $Config['ChmodOnUpload'] ;
}
@@ -285,12 +285,12 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
if ( file_exists($sFilePath) )
{
//previous checks failed, try once again
- if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false )
+ if ( isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false )
{
@unlink($sFilePath);
$sErrorNumber = '202' ;
}
- elseif ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true )
+ elseif ( isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true )
{
@unlink($sFilePath);
$sErrorNumber = '202' ;
@@ -318,7 +318,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
else
{
//issue the CKEditor Callback
- SendCKEditorResults(
+SendCKEditorResults(
$CKEcallback,
$sFileUrl,
($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful')
diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.php b/htdocs/core/filemanagerdol/connectors/php/connector.php
index 2f3c6f64388..12eea88b5c0 100644
--- a/htdocs/core/filemanagerdol/connectors/php/connector.php
+++ b/htdocs/core/filemanagerdol/connectors/php/connector.php
@@ -45,7 +45,7 @@ function DoResponse()
if (!isset($_GET)) {
global $_GET;
}
- if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
+ if ( !isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder']) )
return;
// Get the main request informaiton.
diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php
index 505d790935c..76bcf6250ae 100644
--- a/htdocs/core/filemanagerdol/connectors/php/io.php
+++ b/htdocs/core/filemanagerdol/connectors/php/io.php
@@ -175,14 +175,14 @@ function CreateServerFolder($folderPath, $lastFolder = null)
// Enable error tracking to catch the error.
ini_set('track_errors', '1');
- if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] )
+ if ( isset($Config['ChmodOnFolderCreate']) && !$Config['ChmodOnFolderCreate'] )
{
mkdir($folderPath);
}
else
{
$permissions = '0777';
- if ( isset( $Config['ChmodOnFolderCreate'] ) && $Config['ChmodOnFolderCreate'])
+ if ( isset($Config['ChmodOnFolderCreate']) && $Config['ChmodOnFolderCreate'])
{
$permissions = (string) $Config['ChmodOnFolderCreate'];
}
@@ -315,7 +315,7 @@ function GetCurrentFolder()
if (!isset($_GET)) {
global $_GET;
}
- $sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? GETPOST('CurrentFolder', '', 1) : '/' ;
+ $sCurrentFolder = isset($_GET['CurrentFolder']) ? GETPOST('CurrentFolder', '', 1) : '/' ;
// Check the current folder syntax (must begin and start with a slash).
if (!preg_match('|/$|', $sCurrentFolder))
diff --git a/htdocs/core/filemanagerdol/connectors/php/upload.php b/htdocs/core/filemanagerdol/connectors/php/upload.php
index 3e019e38062..7527847cf19 100644
--- a/htdocs/core/filemanagerdol/connectors/php/upload.php
+++ b/htdocs/core/filemanagerdol/connectors/php/upload.php
@@ -47,7 +47,7 @@ if ( !$Config['Enabled'] )
$sCommand = 'QuickUpload' ;
// The file type (from the QueryString, by default 'File').
-$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;
+$sType = isset($_GET['Type']) ? $_GET['Type'] : 'File' ;
$sCurrentFolder = "/" ;
diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index 18efdd0da70..96f4bba5c40 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -136,7 +136,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit)
$interval = new DateInterval($deltastring);
if($sub) $date->sub($interval);
- else $date->add( $interval );
+ else $date->add($interval);
return $date->getTimestamp();
}
@@ -809,7 +809,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
// Easter sunday
// Monday after easter
- $date_eastermonday = mktime(
+ $date_eastermonday = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@@ -823,7 +823,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
// Easter monday
// Christi Himmelfahrt (39 days after easter sunday)
- $date_ch = mktime(
+ $date_ch = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@@ -837,7 +837,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
// Christi Himmelfahrt
// Pfingsten (50 days after easter sunday)
- $date_pentecote = mktime(
+ $date_pentecote = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
@@ -851,7 +851,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
// Pfingsten
// Fronleichnam (60 days after easter sunday)
- $date_fronleichnam = mktime(
+ $date_fronleichnam = mktime(
date("H", $date_paques),
date("i", $date_paques),
date("s", $date_paques),
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 67217f9837f..be046ae889d 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -13,7 +13,7 @@
* Copyright (C) 2014 Cédric GROSS
* Copyright (C) 2014-2015 Marcos García
* Copyright (C) 2015 Jean-François Ferry
- * Copyright (C) 2018 Frédéric France
+ * Copyright (C) 2018-2019 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -843,7 +843,7 @@ function dol_string_unaccent($str)
else
{
// See http://www.ascii-code.com/
- $string = strtr(
+$string = strtr(
$str,
"\xC0\xC1\xC2\xC3\xC4\xC5\xC7
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
@@ -2969,14 +2969,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$picto .= '.png';
}
$fullpathpicto = $picto;
- }
- else {
+ } else {
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
- if (empty($srconly) && in_array($pictowithoutext, array(
+ if (empty($srconly) && in_array($pictowithoutext, array(
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
- 'note', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
+ 'note', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
'jabber','skype','twitter','facebook'
)
)) {
@@ -3015,6 +3014,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
elseif ($pictowithoutext == 'edit') {
$fakey = 'fa-pencil';
$facolor = '#444';
+ if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-pencil-alt';
}
elseif ($pictowithoutext == 'filter') {
$fakey = 'fa-'.$pictowithoutext;
@@ -3054,6 +3054,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-caret-down';
$marginleftonlyshort = 1;
}
+ elseif ($pictowithoutext == 'sign-out') {
+ $fakey = 'fa-sign-out';
+ $marginleftonlyshort=0;
+ if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fakey = 'fa-sign-out-alt';
+ }
elseif ($pictowithoutext == 'unlink') {
$fakey = 'fa-chain-broken';
$facolor = '#555';
@@ -3092,7 +3097,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fa='fa';
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
- $enabledisablehtml = '';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
$enabledisablehtml.= $titlealt;
@@ -3894,6 +3899,8 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
global $conf, $langs, $form;
//print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder \n";
+ if ($moreattrib == 'class="right"') $prefix.='right '; // For backward compatibility
+
$sortorder=strtoupper($sortorder);
$out='';
$sortimg='';
@@ -5247,7 +5254,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
// We will enhance here a common way of forging path for document storage
// Here, object->id, object->ref and modulepart are required.
//var_dump($modulepart);
- if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
+ if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
'supplier_order','supplier_proposal','shipment','contract','expensereport')))
{
$path=($object->ref?$object->ref:$object->id);
@@ -5306,7 +5313,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = null)
umask(0);
$dirmaskdec=octdec($newmask);
if (empty($newmask)) {
- $dirmaskdec = empty( $conf->global->MAIN_UMASK ) ? octdec( '0755' ) : octdec( $conf->global->MAIN_UMASK );
+ $dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK);
}
$dirmaskdec |= octdec('0111'); // Set x bit required for directories
if (! @mkdir($ccdir_osencoded, $dirmaskdec))
@@ -5792,7 +5799,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
// Add SIGNATURE into substitutionarray first, so, when we will make the substitution,
// this will include signature content first and then replace var found into content of signature
$signature = $user->signature;
- $substitutionarray=array_merge($substitutionarray, array(
+$substitutionarray=array_merge($substitutionarray, array(
'__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '')
)
);
@@ -5802,7 +5809,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '');
}
- $substitutionarray=array_merge($substitutionarray, array(
+$substitutionarray=array_merge($substitutionarray, array(
'__USER_ID__' => (string) $user->id,
'__USER_LOGIN__' => (string) $user->login,
'__USER_LASTNAME__' => (string) $user->lastname,
@@ -5815,7 +5822,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
}
if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc))
{
- $substitutionarray=array_merge($substitutionarray, array(
+$substitutionarray=array_merge($substitutionarray, array(
'__MYCOMPANY_NAME__' => $mysoc->name,
'__MYCOMPANY_EMAIL__' => $mysoc->email,
'__MYCOMPANY_PROFID1__' => $mysoc->idprof1,
@@ -6072,7 +6079,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
$tmp5=dol_get_next_month($tmp['mon'], $tmp['year']);
- $substitutionarray=array_merge($substitutionarray, array(
+$substitutionarray=array_merge($substitutionarray, array(
'__DAY__' => (string) $tmp['mday'],
'__DAY_TEXT__' => $outputlangs->trans('Day'.$tmp['wday']), // Monday
'__DAY_TEXT_SHORT__' => $outputlangs->trans($tmp['weekday'].'Min'), // Mon
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index b58e3061af3..7ffc09625a3 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -1120,17 +1120,17 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
if (! empty($yearoffsettype) && ! is_numeric($yearoffsettype) && $yearoffsettype != '=') // yearoffsettype is - or +, so we don't want current year
{
$numFinal = preg_replace('/\{yyyy\}/i', date("Y", $date)+$yearoffset, $numFinal);
- $numFinal = preg_replace('/\{yy\}/i', date("y", $date)+$yearoffset, $numFinal);
- $numFinal = preg_replace('/\{y\}/i', substr(date("y", $date), 1, 1)+$yearoffset, $numFinal);
+ $numFinal = preg_replace('/\{yy\}/i', date("y", $date)+$yearoffset, $numFinal);
+ $numFinal = preg_replace('/\{y\}/i', substr(date("y", $date), 1, 1)+$yearoffset, $numFinal);
}
else // we want yyyy to be current year
{
$numFinal = preg_replace('/\{yyyy\}/i', date("Y", $date), $numFinal);
- $numFinal = preg_replace('/\{yy\}/i', date("y", $date), $numFinal);
- $numFinal = preg_replace('/\{y\}/i', substr(date("y", $date), 1, 1), $numFinal);
+ $numFinal = preg_replace('/\{yy\}/i', date("y", $date), $numFinal);
+ $numFinal = preg_replace('/\{y\}/i', substr(date("y", $date), 1, 1), $numFinal);
}
- $numFinal = preg_replace('/\{mm\}/i', date("m", $date), $numFinal);
- $numFinal = preg_replace('/\{dd\}/i', date("d", $date), $numFinal);
+ $numFinal = preg_replace('/\{mm\}/i', date("m", $date), $numFinal);
+ $numFinal = preg_replace('/\{dd\}/i', date("d", $date), $numFinal);
// Now we replace the counter
$maskbefore='{'.$masktri.'}';
@@ -2318,7 +2318,7 @@ function getModuleDirForApiClass($module)
*/
function random_color_part($min = 0, $max = 255)
{
- return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT);
+ return str_pad(dechex(mt_rand($min, $max)), 2, '0', STR_PAD_LEFT);
}
/*
diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php
index c6b27a3e2eb..b275025084a 100644
--- a/htdocs/core/lib/modulebuilder.lib.php
+++ b/htdocs/core/lib/modulebuilder.lib.php
@@ -273,7 +273,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
if ($val['default'] != '')
{
if (preg_match('/^null$/i', $val['default'])) $texttoinsert.= " DEFAULT NULL";
- elseif (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'";
+ elseif (preg_match('/varchar/', $type)) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'";
else $texttoinsert.= (($val['default'] > 0)?' DEFAULT '.$val['default']:'');
}
}
diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php
index 9c2d25819c3..399983dbd16 100644
--- a/htdocs/core/lib/tax.lib.php
+++ b/htdocs/core/lib/tax.lib.php
@@ -124,7 +124,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$invoicefieldref='ref';
}
- if ( strpos( $type, 'localtax' ) === 0 ) {
+ if ( strpos($type, 'localtax') === 0 ) {
$f_rate = $type . '_tx';
} else {
$f_rate = 'tva_tx';
@@ -593,7 +593,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$invoicefieldref='ref';
}
- if ( strpos( $type, 'localtax' ) === 0 ) {
+ if ( strpos($type, 'localtax') === 0 ) {
$f_rate = $type . '_tx';
} else {
$f_rate = 'tva_tx';
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index f2287d6a69e..40c12d302c9 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -210,11 +210,11 @@ function dolWebsiteOutput($content)
$content=preg_replace('/(]*href=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
$content=preg_replace('/( ]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
- $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
+ $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)modulepart=medias([^\)]*)file=([^\)]*)(["\']?\))/', '\1/wrapper.php\2modulepart=medias\3file=\4\5', $content, -1, $nbrep);
$content=preg_replace('/( ]*href=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
$content=preg_replace('/( ]*src=")[^\"]*viewimage\.php([^\"]*)hashp=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2hashp=\3\4', $content, -1, $nbrep);
- $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)hashp=([^\)]*)(["\']?\))/', '\1/wrapper.php\2hashp\3\4', $content, -1, $nbrep);
+ $content=preg_replace('/(url\(["\']?)[^\)]*viewimage\.php([^\)]*)hashp=([^\)]*)(["\']?\))/', '\1/wrapper.php\2hashp\3\4', $content, -1, $nbrep);
$content=preg_replace('/( ]*src=")[^\"]*viewimage\.php([^\"]*)modulepart=mycompany([^\"]*)file=([^\"]*)("[^>]*>)/', '\1/wrapper.php\2modulepart=mycompany\3file=\4\5', $content, -1, $nbrep);
}
diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php
index 9684ef61d0d..eaf71d9f8af 100644
--- a/htdocs/core/modules/action/rapport.pdf.php
+++ b/htdocs/core/modules/action/rapport.pdf.php
@@ -188,6 +188,11 @@ class CommActionRapport
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
index d6fc501ed50..a1a7d13a5ed 100644
--- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
@@ -253,6 +253,11 @@ class pdf_ban extends ModeleBankAccountDoc
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index 8182b479aa9..f61758abf92 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -398,6 +398,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
index ee4e48ee384..999494ea6c3 100644
--- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
@@ -193,6 +193,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
index 5f77d6e2de7..4196022b854 100644
--- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
+++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
@@ -339,7 +339,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->commande->dir_temp,
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index db38ef45452..5354e6bc2c7 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -457,7 +457,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// VAT Rate
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN))
@@ -626,6 +626,11 @@ class pdf_einstein extends ModelePDFCommandes
$parameters=array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 3cde5d4de0f..75db1887e4d 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -507,7 +507,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// VAT Rate
if ($this->getColumnStatus('vat'))
@@ -691,6 +691,11 @@ class pdf_eratosthene extends ModelePDFCommandes
$parameters=array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -1228,7 +1233,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if (empty($hidetop))
{
- $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
+ $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
index d9c7b041c7f..74ab8b04fc9 100644
--- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
+++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
@@ -343,7 +343,7 @@ class doc_generic_contract_odt extends ModelePDFContract
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->contrat->dir_temp,
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index 07094bd55a2..84f363af74c 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -475,6 +475,11 @@ class pdf_strato extends ModelePDFContract
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index 77ea8d01fe0..2fa786f096e 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -337,7 +337,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->expedition->dir_temp,
diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
index 78caf3b1c76..628d9102e96 100644
--- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
@@ -422,6 +422,11 @@ class pdf_merou extends ModelePdfExpedition
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 90e2ea21308..116fae7c354 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -638,6 +638,11 @@ class pdf_rouget extends ModelePdfExpedition
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
index ac61582c7bb..615b44b81bf 100644
--- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
@@ -510,6 +510,11 @@ class pdf_standard extends ModeleExpenseReport
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -601,7 +606,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalttc, 4, price($object->lines[$linenumber]->total_ttc), 0, 'R');
// Comments
- $pdf->SetXY($this->posxcomment, $curY );
+ $pdf->SetXY($this->posxcomment, $curY);
$comment = $outputlangs->trans("Date").':'. dol_print_date($object->lines[$linenumber]->date, "day", false, $outputlangs).' ';
$comment .= $outputlangs->trans("Type").':'. $expensereporttypecodetoshow.' ';
if (! empty($object->lines[$linenumber]->projet_ref)) {
@@ -1023,7 +1028,7 @@ class pdf_standard extends ModeleExpenseReport
if ($num > 0 && $object->paid == 0)
{
$y+=$tab3_height;
-
+
$pdf->SetXY($tab3_posx+17, $tab3_top+$y);
$pdf->MultiCell(15, 3, price($totalpaid), 0, 'R', 0);
$pdf->SetXY($tab3_posx+35, $tab3_top+$y);
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index dc8e65a9b0f..136f75f56cf 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -344,7 +344,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->facture->dir_temp,
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 4765c6b692d..d11c24bd6c2 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -755,6 +755,11 @@ class pdf_crabe extends ModelePDFFactures
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 098ef40ff4a..9dde0a49566 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -824,6 +824,11 @@ class pdf_sponge extends ModelePDFFactures
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -1519,7 +1524,7 @@ class pdf_sponge extends ModelePDFFactures
if (empty($hidetop))
{
- $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
+ $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 66bd746647b..e2c27fd293c 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -458,6 +458,11 @@ class pdf_soleil extends ModelePDFFicheinter
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php
index 3ac4e213855..3903d6154e5 100644
--- a/htdocs/core/modules/fichinter/modules_fichinter.php
+++ b/htdocs/core/modules/fichinter/modules_fichinter.php
@@ -2,7 +2,7 @@
/* Copyright (C) 2003 Rodolphe Quiedeville
* Copyright (C) 2004-2011 Laurent Destailleur
* Copyright (C) 2005-2012 Regis Houssin
- * Copyright (C) 2011-2012 Philippe Grand
+ * Copyright (C) 2011-2019 Philippe Grand
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@
/**
* \file htdocs/core/modules/fichinter/modules_fichinter.php
* \ingroup ficheinter
- * \brief Fichier contenant la classe mere de generation des fiches interventions en PDF
- * et la classe mere de numerotation des fiches interventions
+ * \brief File that contains parent class for PDF interventions models
+ * and parent class for interventions numbering models
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
@@ -54,18 +54,18 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
global $conf;
$type='ficheinter';
- $liste=array();
+ $list=array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db, $type, $maxfilenamelength);
+ $list=getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
/**
- * Classe mere des modeles de numerotation des references de fiches d'intervention
+ * Parent class numbering models of intervention sheet references
*/
abstract class ModeleNumRefFicheinter
{
@@ -85,9 +85,9 @@ abstract class ModeleNumRefFicheinter
}
/**
- * Renvoi la description par defaut du modele de numerotation
+ * Returns the default description of the numbering template
*
- * @return string Texte descripif
+ * @return string Descriptive text
*/
function info()
{
@@ -97,7 +97,7 @@ abstract class ModeleNumRefFicheinter
}
/**
- * Renvoi un exemple de numerotation
+ * Return a numbering example
*
* @return string Example
*/
@@ -109,8 +109,8 @@ abstract class ModeleNumRefFicheinter
}
/**
- * Test si les numeros deja en vigueur dans la base ne provoquent pas de
- * de conflits qui empechera cette numerotation de fonctionner.
+ * Tests if the numbers already in force in the database do not cause conflicts
+ * that would prevent this numbering from working.
*
* @return boolean false si conflit, true si ok
*/
@@ -120,9 +120,9 @@ abstract class ModeleNumRefFicheinter
}
/**
- * Renvoi prochaine valeur attribuee
+ * Return the next assigned value
*
- * @return string Valeur
+ * @return string Value
*/
function getNextValue()
{
@@ -131,9 +131,9 @@ abstract class ModeleNumRefFicheinter
}
/**
- * Renvoi version du module numerotation
+ * Return the version of the numbering module
*
- * @return string Valeur
+ * @return string Value
*/
function getVersion()
{
diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
index 6a2ac0d5607..b34c5ae87ab 100644
--- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
@@ -613,6 +613,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php
index 2524cf8f128..68aad4e3533 100644
--- a/htdocs/core/modules/modHRM.class.php
+++ b/htdocs/core/modules/modHRM.class.php
@@ -44,7 +44,7 @@ class modHRM extends DolibarrModules
$this->family = "hr";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
- $this->name = preg_replace( '/^mod/i', '', get_class($this));
+ $this->name = preg_replace('/^mod/i', '', get_class($this));
$this->description = "Management of employees carrier and feelings (department, employment contract)";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php
index fa4b131c056..aa64d7222a2 100644
--- a/htdocs/core/modules/modProduct.class.php
+++ b/htdocs/core/modules/modProduct.class.php
@@ -67,7 +67,7 @@ class modProduct extends DolibarrModules
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
- $this->requiredby = array("modStock","modBarcode","modProductBatch"); // List of module ids to disable if this one is disabled
+ $this->requiredby = array("modStock","modBarcode","modProductBatch","modVariants"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
@@ -438,7 +438,7 @@ class modProduct extends DolibarrModules
if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR'));
if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type'));
if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type'));
- $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array(
+$this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array(
'sp.price'=>"PriceQtyMinHT*",
'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty
'sp.remise_percent'=>'DiscountQtyMin'
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index 98252c655b4..e08def907a1 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -63,7 +63,7 @@ class modTicket extends DolibarrModules
// (where XXX is value of numeric property 'numero' of module)
$this->description = "Incident/support ticket management";
// Possible values for version are: 'development', 'experimental' or version
- $this->version = 'experimental';
+ $this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled
// (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
@@ -280,6 +280,19 @@ class modTicket extends DolibarrModules
'target' => '',
'user' => 0);
$r++;
+
+ $this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
+ 'type' => 'left',
+ 'titre' => 'Statistics',
+ 'mainmenu' => 'ticket',
+ 'url' => '/ticket/stats/index.php',
+ 'langs' => 'ticket',
+ 'position' => 107,
+ 'enabled' => '$conf->ticket->enabled',
+ 'perms' => '$user->rights->ticket->read',
+ 'target' => '',
+ 'user' => 0);
+ $r++;
}
/**
diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php
index eeb99cdc883..ed50ebaa870 100644
--- a/htdocs/core/modules/printing/printgcp.modules.php
+++ b/htdocs/core/modules/printing/printgcp.modules.php
@@ -95,7 +95,7 @@ class printing_printgcp extends PrintingDriver
$storage = new DoliStorage($this->db, $this->conf);
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);
// Setup the credentials for the requests
- $credentials = new Credentials(
+ $credentials = new Credentials(
$this->google_id,
$this->google_secret,
$urlwithroot.'/core/modules/oauth/google_oauthcallback.php'
diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
index 59b102ecfe7..f713b3a2a53 100644
--- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
+++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
@@ -357,7 +357,7 @@ class doc_generic_product_odt extends ModelePDFProduct
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->produit->dir_temp,
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index af19b93835f..d3a37ffa6b0 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -568,6 +568,11 @@ class pdf_standard extends ModelePDFProduct
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -677,7 +682,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
- $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
+ $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
'C');
}
}
diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
index edb3828ff41..22003125439 100644
--- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
+++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
@@ -588,7 +588,7 @@ class doc_generic_project_odt extends ModelePDFProjects
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->projet->dir_temp,
diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
index cd1abbc0b4d..0fd2385b9c2 100644
--- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
@@ -373,7 +373,7 @@ class pdf_baleine extends ModelePDFProjects
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);
@@ -408,7 +408,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// Ref of task
$pdf->SetXY($this->posxref, $curY);
@@ -494,6 +494,11 @@ class pdf_baleine extends ModelePDFProjects
$parameters=array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
index 6e7ab4001f6..8f9c9932389 100644
--- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
@@ -501,7 +501,7 @@ class pdf_beluga extends ModelePDFProjects
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);
@@ -536,7 +536,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// Date
if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order')
@@ -646,6 +646,11 @@ class pdf_beluga extends ModelePDFProjects
$parameters=array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
index f8ccfffe6d4..047f1cf946f 100644
--- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
@@ -304,7 +304,7 @@ class pdf_timespent extends ModelePDFProjects
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);
@@ -339,7 +339,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->setPage($pageposafter); $curY = $tab_top_newpage + $heightoftitleline + 1;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// Ref of task
$pdf->SetXY($this->posxref, $curY);
@@ -425,6 +425,11 @@ class pdf_timespent extends ModelePDFProjects
$parameters=array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
index 80bd4958932..fefaefc426c 100644
--- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
+++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
@@ -515,7 +515,7 @@ class doc_generic_task_odt extends ModelePDFTask
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->projet->dir_temp,
diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
index bedcefb5d9c..7620b923b9d 100644
--- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
+++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
@@ -369,7 +369,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity],
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index 7cb4e6c565d..bb0ffdd786a 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -811,6 +811,11 @@ class pdf_azur extends ModelePDFPropales
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 369c63fdf53..c88852ea610 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -852,6 +852,11 @@ class pdf_cyan extends ModelePDFPropales
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -1398,7 +1403,7 @@ class pdf_cyan extends ModelePDFPropales
if (empty($hidetop))
{
- $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
+ $pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php
index 126f08a9fe6..15682551670 100644
--- a/htdocs/core/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/core/modules/rapport/pdf_paiement.class.php
@@ -326,6 +326,11 @@ class pdf_paiement
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -446,7 +451,7 @@ class pdf_paiement
if ($yp > $this->tab_height -15)
{
$pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp);
- $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $langs->transnoentities('SubTotal')." : ".price($total_page), 0, 'R', 0);
+ $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $langs->transnoentities('SubTotal')." : ".price($total_page), 0, 'R', 0);
$page++;
$pdf->AddPage();
$this->_pagehead($pdf, $page, 0, $outputlangs);
diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
index 3b269513e76..fb93998ef84 100644
--- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
+++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php
@@ -318,7 +318,7 @@ class doc_generic_reception_odt extends ModelePdfReception
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->reception->dir_temp,
diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
index 16e403dd8f9..9a4c3b2010d 100644
--- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php
+++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
@@ -568,6 +568,11 @@ class pdf_squille extends ModelePdfReception
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
index 556a711479b..4ded1d5391a 100644
--- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
+++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
@@ -265,7 +265,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity],
diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
index 2cfec34bcf8..c28751e9074 100644
--- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
+++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
@@ -357,7 +357,7 @@ class doc_generic_stock_odt extends ModelePDFStock
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->produit->dir_temp,
diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
index e1cf00990d0..c2ddf01aa3d 100644
--- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
@@ -404,7 +404,7 @@ class pdf_standard extends ModelePDFStock
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
$productstatic->id=$objp->rowid;
$productstatic->ref = $objp->ref;
@@ -804,6 +804,11 @@ class pdf_standard extends ModelePDFStock
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -909,7 +914,7 @@ class pdf_standard extends ModelePDFStock
if (empty($hidetop))
{
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
- $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
+$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
'C');
}
diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
index c276a78a14a..5ad967e1e13 100644
--- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
@@ -563,7 +563,7 @@ class pdf_stdmovement extends ModelePDFMovement
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
- $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
+ $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
// $objp = $db->fetch_object($resql);
@@ -783,6 +783,11 @@ class pdf_stdmovement extends ModelePDFMovement
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index 977819bb796..4e2b32463fb 100644
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -584,6 +584,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index bcd8445c3ab..73d22e88d50 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -681,6 +681,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
index 26bdbd89ada..ec217c6a961 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
@@ -491,6 +491,11 @@ class pdf_standard extends ModelePDFSuppliersPayments
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
index 287fbb9753b..f30b696db67 100644
--- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
@@ -365,7 +365,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->supplier_proposal->dir_temp,
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 9fb7ac18d31..95b7b41341b 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -678,6 +678,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
+ if ($reshook < 0)
+ {
+ $this->error = $hookmanager->error;
+ $this->errors = $hookmanager->errors;
+ }
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
@@ -1244,7 +1249,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
- $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
+ $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
'C');
}
}
diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
index 67dde2b7efa..9e018a4d6c6 100644
--- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
+++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
@@ -331,7 +331,7 @@ class doc_generic_user_odt extends ModelePDFUser
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->user->dir_temp,
diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
index fc0992ea5b1..c14a1953042 100644
--- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
+++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
@@ -353,7 +353,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
- $odfHandler = new odf(
+ $odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->user->dir_temp,
diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php
index a750481a3d1..ea5b6e06e4d 100644
--- a/htdocs/core/tpl/advtarget.tpl.php
+++ b/htdocs/core/tpl/advtarget.tpl.php
@@ -146,7 +146,7 @@ print '
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Congratulations!
-
- If you can see CKEditor below, it means that the installation succeeded.
- You can now try out your new editor version, see its features, and when you are ready to move on, check some of the most useful resources recommended below.
-
-
-
-
-
-
-
-
-
Hello world!
-
I'm an instance of CKEditor .
-
-
-
-
-
-
-
-
- Customize Your Editor
- Modular build and numerous configuration options give you nearly endless possibilities to customize CKEditor. Replace the content of your config.js file with the following code and refresh this page (remember to clear the browser cache )!
- CKEDITOR .editorConfig = function ( config ) {
- config .language = 'es' ;
- config .uiColor = '#F7B42C' ;
- config .height = 300 ;
- config .toolbarCanCollapse = true ;
-};
-
-
-
- Toolbar Configuration
- If you want to reorder toolbar buttons or remove some of them, check this handy tool !
-
-
-
- More Samples!
- Visit the CKEditor SDK for a huge collection of samples showcasing editor features, with source code readily available to copy and use in your own implementation.
-
-
-
- Developer's Guide
- The most important resource for all developers working with CKEditor, integrating it with their websites and applications, and customizing to their needs. You can start from here:
-
- Getting Started – Explains most crucial editor concepts and practices as well as the installation process and integration with your website.
- Advanced Installation Concepts – Describes how to upgrade, install additional components (plugins, skins), or create a custom build.
-
- When you have the basics sorted out, feel free to browse some more advanced sections like:
-
-
-
-
- CKEditor JavaScript API
- CKEditor boasts a rich JavaScript API that you can use to adjust the editor to your needs and integrate it with your website or application.
-
-
-
-
-
-
-
-
-
-