diff --git a/ChangeLog b/ChangeLog
index 9b91afd128f..70144f80733 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,20 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
+***** ChangeLog for 11.0.0 compared to 10.0.0 *****
+For Users:
+
+
+For Developers:
+
+
+WARNING:
+
+Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
+* Properties ->libelle_incoterms were renamed into ->label_incoterms
+
+
+
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
For Users:
NEW: Module "Ticket" is available as a stable module.
@@ -58,7 +72,7 @@ NEW: Can generate invoices from the timespent entered on a project
NEW: Can update product supplier price ref
NEW: Can upload files from the edit page of expense report
NEW: Color for hover and for checked line is on by default
-NEW: Column of parent company is available in list of third parties
+NEW: Column of p...arent company is available in list of third parties
NEW: conditionnal add member button by statut
NEW: constant KEEP_DISCOUNT_LINES_FROM_ORIGIN
NEW: Contact related items tab
@@ -182,6 +196,55 @@ Following changes may create regressions for some external modules, but were nec
called $dolibarr_main_instance_unique_id is now generated at each installation. It will be used by some future features.
+***** ChangeLog for 9.0.4 compared to 9.0.3 *****
+FIX: #5249
+FIX: #11025
+FIX: #11032
+FIX: #11097
+FIX: #11169
+FIX: #11202
+FIX: #11244
+FIX: #11296
+FIX: #11316
+FIX: #11335
+FIX: Add missing end date of subscription in export
+FIX: A user may read holiday and expense report without permissions
+FIX: better syntax
+FIX: condition
+FIX: confirmation of mass email sending + option MAILING_NO_USING_PHPMAIL
+FIX: crabe pdf: bad detailed VAT for situation invoices, in situations S2 and above
+FIX: default value for duration of validity can be set from generic
+FIX: do not include tpl from disabled modules
+FIX: Error management when MAILING_NO_USING_PHPMAIL is set
+FIX: Even with permission, can't validate leave once validator defined.
+FIX: extrafield list search: SQL error when field is multiselect
+FIX: if last char of customercode is accent making the truncate of first
+FIX: Import of chart of account
+FIX: in edit mode, dictionary inputs do not escape the string inside the 'value' attribute, causing errors if there are any double quotes
+FIX: invalid link on user.fk_user
+FIX: invoice class: bad SQL request if product type not set
+FIX: javascript error when ckeditor module not enabled
+FIX: mail presend: can overwrite a file previously uploaded (Issue #11056)
+FIX: mass send mail
+FIX: missing compatibility with multicompany transverse mode
+FIX: missing llx_const encrypt
+FIX: modulebuilder: hardcoded llx_
+FIX: Not showing Contract and Project columns on ficheinter list
+FIX: only profid1 to 4 were editable for pdf option to show. Not 5 and 6.
+FIX: productaccount buylist with pages
+FIX: remove isolated transaction commit
+FIX: security (a user can read leave or holiday of other without perm.
+FIX: situation invoices: bad detailed VAT in situations following the first one
+FIX: situation invoices: block progress percentage change for discount lines
+FIX: syntax error
+FIX: the id was not loaded in fetch of accounting system
+FIX: try to use WHERE EXISTS instead of DISTINCT
+FIX: use dol_sanitizeFileName() function to remove double spaces in filenames, as well as done on document.php when we want to download pdf
+FIX: Use of cron with multicompany
+FIX: var name
+FIX: we need to fetch fourn invoice with ref in current entity
+FIX: Wrong stock movement on supplier credit notes
+FIX: Import of record in ledger
***** ChangeLog for 9.0.3 compared to 9.0.2 *****
FIX: #11013
diff --git a/build/debian/copyright b/build/debian/copyright
index 72e531d7007..a5832aa7754 100644
--- a/build/debian/copyright
+++ b/build/debian/copyright
@@ -52,7 +52,7 @@ License: GPL-3+
details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU General Public
License version 3 can be found in the file
@@ -98,7 +98,7 @@ License: GPL-2+
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
@@ -192,7 +192,7 @@ License: GPL-2+
details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
@@ -212,7 +212,7 @@ License: LGPL-2.1+
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file
@@ -236,7 +236,7 @@ License: GPL-2+ or MIT
details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
@@ -291,7 +291,7 @@ License: GPL-2+
details.
.
You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
@@ -311,7 +311,7 @@ License: LGPL-2.1+
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file
@@ -358,7 +358,7 @@ License: LGPL-2.1+
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see .
+ along with this program. If not, see .
.
On Debian systems, the full text of the GNU Lesser General Public
License version 2.1 can be found in the file
@@ -378,7 +378,7 @@ License: LGPL-3.0+
See the GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License
- along with TCPDF. If not, see .
+ along with TCPDF. If not, see .
.
On Debian systems, the complete text of the GNU Lesser General
Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php
index 88b194f362b..d5af14f9171 100755
--- a/build/generate_filelist_xml.php
+++ b/build/generate_filelist_xml.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
@@ -106,6 +106,7 @@ if (empty($includecustom)) {
}
print "Release : ".$release."\n";
+print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) {
diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php
index 792341f5c79..dbbe9d84c1c 100755
--- a/dev/examples/code/create_invoice.php
+++ b/dev/examples/code/create_invoice.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php
index fa3fa573223..30265d5462e 100755
--- a/dev/examples/code/create_order.php
+++ b/dev/examples/code/create_order.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php
index 7ca09246980..234658388df 100755
--- a/dev/examples/code/create_product.php
+++ b/dev/examples/code/create_product.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php
index 2fed1a51972..96d369085d2 100755
--- a/dev/examples/code/create_user.php
+++ b/dev/examples/code/create_user.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/examples/code/get_contracts.php b/dev/examples/code/get_contracts.php
index eafc0dfeed5..aec246e9480 100755
--- a/dev/examples/code/get_contracts.php
+++ b/dev/examples/code/get_contracts.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php
index 0f04a4d236f..bfdda2896a1 100755
--- a/dev/initdata/generate-invoice.php
+++ b/dev/initdata/generate-invoice.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/
diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php
index f07905f1edd..b66d3a3abc9 100755
--- a/dev/initdata/generate-order.php
+++ b/dev/initdata/generate-order.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/
diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php
index 9e1b15331d4..e9703fbfd6e 100755
--- a/dev/initdata/generate-product.php
+++ b/dev/initdata/generate-product.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/
diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php
index 4bd9c2c654b..30c9471a281 100755
--- a/dev/initdata/generate-proposal.php
+++ b/dev/initdata/generate-proposal.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/
diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php
index cc2e85e544a..54e17c7f8d7 100755
--- a/dev/initdata/generate-thirdparty.php
+++ b/dev/initdata/generate-thirdparty.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION
*/
diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php
index fa9cfd6592b..e55f13c7c82 100755
--- a/dev/initdata/import-products.php
+++ b/dev/initdata/import-products.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/
diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php
index 8826ca18544..558745e8d06 100755
--- a/dev/initdata/import-thirdparties.php
+++ b/dev/initdata/import-thirdparties.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/
diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php
index 34130890f4b..64af2f9eb64 100755
--- a/dev/initdata/import-users.php
+++ b/dev/initdata/import-users.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* WARNING, THIS WILL LOAD MASS DATA ON YOUR INSTANCE
*/
diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php
index 42d6d28eadf..62f41ce825f 100755
--- a/dev/initdata/purge-data.php
+++ b/dev/initdata/purge-data.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* THIS SCRIPT DELETE ALL MAIN TABLE CONTENT
* WARNING, DO NOT USE ON A PRODUCTION INSTANCE
diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php
index e261895b617..e5ade3aa2f6 100755
--- a/dev/initdemo/sftpget_and_loaddump.php
+++ b/dev/initdemo/sftpget_and_loaddump.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
* or see http://www.gnu.org/
*
* Get a distant dump file and load it into a mysql database
diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php
index 53ae2251f35..dcaa44c43a6 100755
--- a/dev/initdemo/updatedemo.php
+++ b/dev/initdemo/updatedemo.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
* or see http://www.gnu.org/
*
* Get a distant dump file and load it into a mysql database
diff --git a/dev/resources/licence/Links on GPL.txt b/dev/resources/licence/Links on GPL.txt
index 1bb3053da2a..bb9c1597f68 100644
--- a/dev/resources/licence/Links on GPL.txt
+++ b/dev/resources/licence/Links on GPL.txt
@@ -1,8 +1,8 @@
* Page with licence compatibility
-http://www.gnu.org/licenses/quick-guide-gplv3.fr.html
+https://www.gnu.org/licenses/quick-guide-gplv3.fr.html
* FAQ on GPL licence
-http://www.fsf.org/licensing/licenses/gpl-faq.html
+https://www.fsf.org/licensing/licenses/gpl-faq.html
* Questions/Answers on Fork for using Dolibarr as a SaaS
-http://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas
+https://stackoverflow.com/questions/539291/rebranding-a-gpld-app-as-saas
diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php
index 789bd8173c4..f9657482c86 100644
--- a/dev/translation/autotranslator.class.php
+++ b/dev/translation/autotranslator.class.php
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php
index eb0f53ead65..5e8cc13c3c8 100755
--- a/dev/translation/autotranslator.php
+++ b/dev/translation/autotranslator.php
@@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
/**
diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index 4db931f7dae..7f095a744db 100755
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
$sapi_type = php_sapi_name();
diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php
index d439397a512..ce28ca5de63 100755
--- a/dev/translation/strip_language_file.php
+++ b/dev/translation/strip_language_file.php
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*
* -----
*
diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index 102d268e218..527cb13fcfd 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -4,7 +4,7 @@
* Copyright (C) 2004 Benoit Mortier
* Copyright (C) 2005-2012 Regis Houssin
* Copyright (C) 2010-2016 Juanjo Menent
- * Copyright (C) 2011-2018 Philippe Grand
+ * Copyright (C) 2011-2019 Philippe Grand
* Copyright (C) 2011 Remy Younes
* Copyright (C) 2012-2015 Marcos García
* Copyright (C) 2012 Christophe Battarel
diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php
index dfec49949a3..8a5213f5ab8 100644
--- a/htdocs/accountancy/admin/fiscalyear_info.php
+++ b/htdocs/accountancy/admin/fiscalyear_info.php
@@ -12,7 +12,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, seehttp://www.gnu.org/licenses/>.
+ * along with this program. If not, see .
*/
/**
diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 4fc30bb0c30..0c92bcb8950 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -104,7 +104,7 @@ $formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
-if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && ! GETPOST('noreset', 'int'))
+if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && ! GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export)
{
if (empty($search_date_start) && empty($search_date_end) && ! GETPOSTISSET('restore_lastsearch_values'))
{
@@ -300,7 +300,7 @@ if (! empty($search_lettering_code)) {
}
-if ($action == 'delbookkeeping') {
+if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) {
$import_key = GETPOST('importkey', 'alpha');
@@ -315,7 +315,7 @@ if ($action == 'delbookkeeping') {
exit;
}
}
-if ($action == 'delbookkeepingyearconfirm') {
+if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) {
$delyear = GETPOST('delyear', 'int');
if ($delyear==-1) {
@@ -346,7 +346,7 @@ if ($action == 'delbookkeepingyearconfirm') {
setEventMessages("NoRecordDeleted", null, 'warnings');
}
}
-if ($action == 'delmouvconfirm') {
+if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) {
$mvt_num = GETPOST('mvt_num', 'int');
@@ -366,7 +366,8 @@ if ($action == 'delmouvconfirm') {
}
// Export into a file with format defined into setup (FEC, CSV, ...)
-if ($action == 'export_file') {
+if ($action == 'export_file' && $user->rights->accounting->mouvements->export) {
+
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT);
if ($result < 0)
@@ -514,11 +515,11 @@ if (! empty($conf->global->ACCOUNTING_REEXPORT)) {
}
$newcardbutton.= ''.$langs->trans("IncludeDocsAlreadyExported").'';
-$newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''));
+$newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:''), $user->rights->accounting->mouvements->export);
$newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
-$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create');
+$newcardbutton.= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create', '', $user->rights->accounting->mouvements->creer);
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
@@ -818,12 +819,17 @@ if ($num > 0)
// Action column
print '
';
$result.=$link;
+ if ($withpictoimg) $result.='
';
if ($withpictoimg)
{
$paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="margin-right: 3px;"';
// Only picto
- if ($withpictoimg > 0) $picto='
';
$out.=$form->textwithpicto($langs->trans('MailText'), $helpforsubstitution, 1, 'help', '', 0, 2, 'substittooltipfrombody');
@@ -1155,6 +1154,12 @@ class FormMail extends Form
return -1;
}
+ $languagetosearch = (is_object($outputlangs) ? $outputlangs->defaultlang : '');
+ // Define $languagetosearchmain to fall back on main language (for example to get 'es_ES' for 'es_MX')
+ $tmparray = explode('_', $languagetosearch);
+ $languagetosearchmain = $tmparray[0].'_'.strtoupper($tmparray[0]);
+ if ($languagetosearchmain == $languagetosearch) $languagetosearchmain = '';
+
$sql = "SELECT rowid, label, topic, joinfiles, content, content_lines, lang";
$sql.= " FROM ".MAIN_DB_PREFIX.'c_email_templates';
$sql.= " WHERE (type_template='".$db->escape($type_template)."' OR type_template='all')";
@@ -1162,10 +1167,10 @@ class FormMail extends Form
$sql.= " AND (private = 0 OR fk_user = ".$user->id.")"; // Get all public or private owned
if ($active >= 0) $sql.=" AND active = ".$active;
if ($label) $sql.=" AND label ='".$db->escape($label)."'";
- if (! ($id > 0) && is_object($outputlangs)) $sql.= " AND (lang = '".$db->escape($outputlangs->defaultlang)."' OR lang IS NULL OR lang = '')";
+ if (! ($id > 0) && $languagetosearch) $sql.= " AND (lang = '".$db->escape($languagetosearch)."'".($languagetosearchmain ? " OR lang = '".$db->escape($languagetosearchmain)."'" : "")." OR lang IS NULL OR lang = '')";
if ($id > 0) $sql.= " AND rowid=".$id;
if ($id == -1) $sql.= " AND position=0";
- if (is_object($outputlangs)) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or ''
+ if ($languagetosearch) $sql.= $db->order("position,lang,label", "ASC,DESC,ASC"); // We want line with lang set first, then with lang null or ''
else $sql.= $db->order("position,lang,label", "ASC,ASC,ASC"); // If no language provided, we give priority to lang not defined
$sql.= $db->plimit(1);
//print $sql;
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php
index 9e0063ac414..f86d6570e5c 100644
--- a/htdocs/core/class/utils.class.php
+++ b/htdocs/core/class/utils.class.php
@@ -50,33 +50,36 @@ class Utils
* Purge files into directory of data files.
* CAN BE A CRON TASK
*
- * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than 24h, 'allfiles', 'logfile')
- * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
+ * @param string $choice Choice of purge mode ('tempfiles', '' or 'tempfilesold' to purge temp older than $nbsecondsold seconds, 'allfiles', 'logfile')
+ * @param int $nbsecondsold Nb of seconds old to accept deletion of a directory if $choice is 'tempfilesold'
+ * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
*/
- public function purgeFiles($choice = 'tempfilesold')
+ public function purgeFiles($choice = 'tempfilesold', $nbsecondsold = 86400)
{
global $conf, $langs, $dolibarr_main_data_root;
$langs->load("admin");
- dol_syslog("Utils::purgeFiles choice=".$choice, LOG_DEBUG);
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$filesarray=array();
if (empty($choice)) $choice='tempfilesold';
+ dol_syslog("Utils::purgeFiles choice=".$choice, LOG_DEBUG);
+
if ($choice=='tempfiles' || $choice=='tempfilesold')
{
// Delete temporary files
if ($dolibarr_main_data_root)
{
- $filesarray=dol_dir_list($dolibarr_main_data_root, "directories", 1, '^temp$', '', 'name', SORT_ASC, 2, 0, '', 1); // Do not follow symlinks
- if ($choice == 'tempfilesold')
+ $filesarray=dol_dir_list($dolibarr_main_data_root, "directories", 1, '^temp$', '', 'name', SORT_ASC, 2, 0, '', 1); // Do not follow symlinks
+
+ if ($choice == 'tempfilesold')
{
$now = dol_now();
foreach($filesarray as $key => $val)
{
- if ($val['date'] > ($now - (24 * 3600))) unset($filesarray[$key]); // Discard files not older than 24h
+ if ($val['date'] > ($now - ($nbsecondsold))) unset($filesarray[$key]); // Discard temp dir not older than $nbsecondsold
}
}
}
@@ -119,13 +122,14 @@ class Utils
$counterror=0;
if (count($filesarray))
{
- foreach($filesarray as $key => $value)
+ foreach($filesarray as $key => $value)
{
//print "x ".$filesarray[$key]['fullname']."-".$filesarray[$key]['type']." \n";
- if ($filesarray[$key]['type'] == 'dir')
+ if ($filesarray[$key]['type'] == 'dir')
{
$startcount=0;
$tmpcountdeleted=0;
+
$result=dol_delete_dir_recursive($filesarray[$key]['fullname'], $startcount, 1, 0, $tmpcountdeleted);
$count+=$result;
$countdeleted+=$tmpcountdeleted;
@@ -165,6 +169,13 @@ class Utils
}
else $this->output=$langs->trans("PurgeNothingToDelete").($choice == 'tempfilesold' ? ' (older than 24h)':'');
+ // Recreate temp dir that are not automatically recreated by core code for performance purpose, we need them
+ if (! empty($conf->api->enabled))
+ {
+ dol_mkdir($conf->api->dir_temp);
+ }
+ dol_mkdir($conf->user->dir_temp);
+
//return $count;
return 0; // This function can be called by cron so must return 0 if OK
}
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 56ca215e118..db3b8763941 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -36,25 +36,31 @@
/**
* Return array with format properties of default PDF format
*
- * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done
+ * @param Translate $outputlangs Output lang to use to autodetect output format if we need 'auto' detection
+ * @param string $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup
* @return array Array('width'=>w,'height'=>h,'unit'=>u);
*/
-function pdf_getFormat(Translate $outputlangs = null)
+function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup')
{
- global $conf,$db;
+ global $conf, $db, $langs;
+
+ dol_syslog("pdf_getFormat Get paper format with mode=".$mode." MAIN_PDF_FORMAT=".(empty($conf->global->MAIN_PDF_FORMAT)?'null':$conf->global->MAIN_PDF_FORMAT)." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')." and langs->defaultlang=".(is_object($langs) ? $langs->defaultlang : 'null'));
// Default value if setup was not done and/or entry into c_paper_format not defined
$width=210; $height=297; $unit='mm';
- if (empty($conf->global->MAIN_PDF_FORMAT))
+ if ($mode == 'auto' || empty($conf->global->MAIN_PDF_FORMAT) || $conf->global->MAIN_PDF_FORMAT == 'auto')
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$pdfformat=dol_getDefaultFormat($outputlangs);
}
- else $pdfformat=$conf->global->MAIN_PDF_FORMAT;
+ else
+ {
+ $pdfformat=$conf->global->MAIN_PDF_FORMAT;
+ }
$sql="SELECT code, label, width, height, unit FROM ".MAIN_DB_PREFIX."c_paper_format";
- $sql.=" WHERE code = '".$pdfformat."'";
+ $sql.=" WHERE code = '".$db->escape($pdfformat)."'";
$resql=$db->query($sql);
if ($resql)
{
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index 4d79d0d4db3..68a6d9082f2 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -127,7 +127,7 @@ function product_prepare_head($object)
$h++;
}
}
-
+
// Tab to link resources
if (!empty($conf->resource->enabled))
{
@@ -173,7 +173,7 @@ function product_prepare_head($object)
if (! empty($conf->service->enabled) && ($object->type==Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
- if (! empty($conf->product->enabled) && ($object->type==Product::TYPE_PRODUCT)) $upload_dir = $conf->produit->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos';
+ if (! empty($conf->product->enabled) && ($object->type==Product::TYPE_PRODUCT)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos';
if (! empty($conf->service->enabled) && ($object->type==Product::TYPE_SERVICE)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir($object->id, 2, 0, 0, $object, 'product').$object->id.'/photos';
$nbFiles += count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index efcfeca61dd..77ac518c384 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -371,12 +371,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
$numlines=count($lines);
// We declare counter as global because we want to edit them into recursive call
- global $total_projectlinesa_spent,$total_projectlinesa_planned,$total_projectlinesa_spent_if_planned,$total_projectlinesa_tobill,$total_projectlinesa_billed;
+ global $total_projectlinesa_spent,$total_projectlinesa_planned,$total_projectlinesa_spent_if_planned,$total_projectlinesa_declared_if_planned,$total_projectlinesa_tobill,$total_projectlinesa_billed;
if ($level == 0)
{
$total_projectlinesa_spent=0;
$total_projectlinesa_planned=0;
$total_projectlinesa_spent_if_planned=0;
+ $total_projectlinesa_declared_if_planned=0;
$total_projectlinesa_tobill=0;
$total_projectlinesa_billed=0;
}
@@ -624,6 +625,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
$total_projectlinesa_spent += $lines[$i]->duration;
$total_projectlinesa_planned += $lines[$i]->planned_workload;
if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration;
+ if ($lines[$i]->planned_workload) $total_projectlinesa_declared_if_planned += $lines[$i]->planned_workload * $lines[$i]->progress / 100;
}
}
else
@@ -652,7 +654,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print '
';
if ($action != 'editincoterm')
{
- print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
+ print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
}
else
{
diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
index 2df656e3308..bf6c12e92ef 100644
--- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
+++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
@@ -82,3 +82,6 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN entity integer DEFAULT 1 NOT NULL;
ALTER TABLE llx_c_shipment_mode DROP INDEX uk_c_shipment_mode;
ALTER TABLE llx_c_shipment_mode ADD UNIQUE INDEX uk_c_shipment_mode (code, entity);
+
+ALTER TABLE llx_facture_fourn DROP COLUMN total;
+
diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
index 2a841834735..57cb3ec16af 100644
--- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
+++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql
@@ -96,6 +96,8 @@ ALTER TABLE llx_adherent ADD gender VARCHAR(10);
ALTER TABLE llx_adherent_type ADD morphy VARCHAR(3);
ALTER TABLE llx_subscription ADD fk_type integer;
+UPDATE llx_subscription as s SET fk_type = (SELECT fk_adherent_type FROM llx_adherent as a where a.rowid = s.fk_adherent) where fk_type IS NULL;
+
-- Add url_id into unique index of bank_url
ALTER TABLE llx_bank_url DROP INDEX uk_bank_url;
ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type);
diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql
index 5317254d79d..88aa6d4e129 100644
--- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql
+++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql
@@ -21,8 +21,9 @@ CREATE TABLE llx_accounting_bookkeeping
(
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1 NOT NULL, -- | multi company id
- doc_date date NOT NULL, -- FEC:PieceDate
- doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
+ piece_num integer NOT NULL, -- FEC:EcritureNum | accounting transaction id
+ doc_date date NOT NULL, -- FEC:PieceDate | date of source document
+ doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur/import
doc_ref varchar(300) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/... reference number
fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid
fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid
@@ -48,7 +49,6 @@ CREATE TABLE llx_accounting_bookkeeping
fk_user integer NULL, -- The id of user that validate the accounting source document
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
journal_label varchar(255), -- FEC:JournalLib
- piece_num integer NOT NULL, -- FEC:EcritureNum | accounting source document
date_validated datetime, -- FEC:ValidDate | if empty: movement not validated / if not empty: movement validated (No deleting / No modification)
date_export datetime DEFAULT NULL, --
import_key varchar(14),
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 167b2bde2fd..17ab05b0101 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -149,7 +149,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to
Purge=Purge
PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server.
PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data)
-PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data)
+PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago.
PurgeDeleteTemporaryFilesShort=Delete temporary files
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s. This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files.
PurgeRunNow=Purge now
@@ -907,6 +907,9 @@ Permission50202=Import transactions
Permission50401=Bind products and invoices with accounting accounts
Permission50411=Read operations in ledger
Permission50412=Write/Edit operations in ledger
+Permission50414=Delete operations in ledger
+Permission50415=Delete all operations by year and journal in ledger
+Permission50418=Export operations of the ledger
Permission50420=Report and export reports (turnover, balance, journals, ledger)
Permission50430=Define and close a fiscal year
Permission50440=Manage chart of accounts, setup of accountancy
@@ -1110,7 +1113,7 @@ AreaForAdminOnly=Setup parameters can be set by administrator users only.
SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only.
SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction.
CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page.
-AccountantDesc=Edit the details of your accountant/bookkeeper
+AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information.
AccountantFileNumber=Accountant code
DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here.
AvailableModules=Available app/modules
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index ba334d69a22..8b92cef3103 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -78,9 +78,9 @@ GroupEmails=Group emails
OneEmailPerRecipient=One email per recipient (by default, one email per record selected)
WarningIfYouCheckOneRecipientPerEmail=Warning, if you check this box, it means only one email will be sent for several different record selected, so, if your message contains substitution variables that refers to data of a record, it becomes not possible to replace them.
ResultOfMailSending=Result of mass Email sending
-NbSelected=No. selected
-NbIgnored=No. ignored
-NbSent=No. sent
+NbSelected=Number selected
+NbIgnored=Number ignored
+NbSent=Number sent
SentXXXmessages=%s message(s) sent.
ConfirmUnvalidateEmailing=Are you sure you want to change email %s to draft status?
MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index 8b33117cc66..acae5aa73fb 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -171,7 +171,7 @@ MembersStatisticsDesc=Choose statistics you want to read...
MenuMembersStats=Statistics
LastMemberDate=Latest member date
LatestSubscriptionDate=Latest subscription date
-Nature=Nature
+MemberNature=Nature of member
Public=Information are public
NewMemberbyWeb=New member added. Awaiting approval
NewMemberForm=New member form
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 5f07a7f2eb0..46555a84528 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -159,7 +159,7 @@ SuppliersPrices=Vendor prices
SuppliersPricesOfProductsOrServices=Vendor prices (of products or services)
CustomCode=Customs / Commodity / HS code
CountryOrigin=Origin country
-Nature=Product Type (material/finished)
+Nature=Nature of produt (material/finished)
ShortLabel=Short label
Unit=Unit
p=u.
diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php
index cdc12553401..45a851b43a5 100644
--- a/htdocs/livraison/card.php
+++ b/htdocs/livraison/card.php
@@ -529,7 +529,7 @@ else
print '
';
if ($action != 'editincoterm')
{
- print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1);
+ print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1);
}
else
{
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 9a84274d0c5..9a5780b351d 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -278,7 +278,7 @@ class Livraison extends CommonObject
$sql.= ", l.date_delivery, l.fk_address, l.model_pdf";
$sql.= ", el.fk_source as origin_id, el.sourcetype as origin";
$sql.= ', l.fk_incoterms, l.location_incoterms';
- $sql.= ", i.libelle as libelle_incoterms";
+ $sql.= ", i.libelle as label_incoterms";
$sql.= " FROM ".MAIN_DB_PREFIX."livraison as l";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = l.rowid AND el.targettype = '".$this->db->escape($this->element)."'";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON l.fk_incoterms = i.rowid';
@@ -313,7 +313,7 @@ class Livraison extends CommonObject
//Incoterms
$this->fk_incoterms = $obj->fk_incoterms;
$this->location_incoterms = $obj->location_incoterms;
- $this->libelle_incoterms = $obj->libelle_incoterms;
+ $this->label_incoterms = $obj->label_incoterms;
$this->db->free($result);
if ($this->statut == 0) $this->brouillon = 1;
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index 0025c00165d..8f79741727a 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -531,13 +531,6 @@ class MyObject extends CommonObject
}
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
-
- /*
- $hookmanager->initHooks(array('myobjectdao'));
- $parameters=array('id'=>$this->id);
- $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
- if ($reshook > 0) $linkclose = $hookmanager->resPrint;
- */
}
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index 0f4df0012f4..2f2e8c45a1a 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -81,8 +81,8 @@ $extralabels = $extrafields->fetch_name_optionals_label('myobject');
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
-//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:1] . "/myobject/" . dol_sanitizeFileName($object->id);
-if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:1] . "/myobject/" . dol_sanitizeFileName($object->ref);
+//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->id);
+if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mymodule->multidir_output[$object->entity?$object->entity:$conf->entity] . "/myobject/" . dol_sanitizeFileName($object->ref);
/*
diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php
index d50e474026e..5b2e931e7b6 100644
--- a/htdocs/product/admin/price_rules.php
+++ b/htdocs/product/admin/price_rules.php
@@ -113,7 +113,7 @@ while ($result = $db->fetch_object($query)) {
$title = $langs->trans('ProductServiceSetup');
$tab = $langs->trans("ProductsAndServices");
-if (empty($conf->produit->enabled)) {
+if (empty($conf->product->enabled)) {
$title = $langs->trans('ServiceSetup');
$tab = $langs->trans('Services');
} elseif (empty($conf->service->enabled)) {
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index 888863e5e66..95f61d2f20a 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -272,7 +272,7 @@ $formbarcode=new FormBarCode($db);
$title = $langs->trans('ProductServiceSetup');
$tab = $langs->trans("ProductsAndServices");
-if (empty($conf->produit->enabled))
+if (empty($conf->product->enabled))
{
$title = $langs->trans('ServiceSetup');
$tab = $langs->trans('Services');
diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php
index a01ba46b624..e70e09a9640 100644
--- a/htdocs/product/admin/product_extrafields.php
+++ b/htdocs/product/admin/product_extrafields.php
@@ -61,7 +61,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
$title = $langs->trans('ProductServiceSetup');
$textobject = $langs->trans("ProductsAndServices");
-if (empty($conf->produit->enabled))
+if (empty($conf->product->enabled))
{
$title = $langs->trans('ServiceSetup');
$textobject = $langs->trans('Services');
diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 847c6325b50..cdd94ae4a3c 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -148,7 +148,7 @@ if (empty($reshook))
}
// Actions to build doc
- $upload_dir = $conf->produit->dir_output;
+ $upload_dir = $conf->product->dir_output;
$permissioncreate = $usercancreate;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
@@ -1601,7 +1601,7 @@ else
print '
';
// Type
- if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled))
+ if (! empty($conf->product->enabled) && ! empty($conf->service->enabled))
{
// TODO change for compatibility with edit in place
$typeformat='select;0:'.$langs->trans("Product").',1:'.$langs->trans("Service");
@@ -2158,7 +2158,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete')
// Documents
$objectref = dol_sanitizeFileName($object->ref);
$relativepath = $comref . '/' . $objectref . '.pdf';
- $filedir = $conf->produit->dir_output . '/' . $objectref;
+ $filedir = $conf->product->dir_output . '/' . $objectref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed=$usercanread;
$delallowed=$usercancreate;
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 02de9b4d47d..50ddded3600 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -4034,13 +4034,6 @@ class Product extends CommonObject
$linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"';
$linkclose.= ' class="classfortooltip"';
-
- /*
- $hookmanager->initHooks(array('productdao'));
- $parameters=array('id'=>$this->id);
- $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
- if ($reshook > 0) $linkclose = $hookmanager->resPrint;
- */
}
if ($option == 'supplier' || $option == 'category') {
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index dbcdec666e3..f1e27c02501 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -688,7 +688,7 @@ SCRIPT;
print '
';
}
else
{
diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php
index 17e22a314ef..f570dd21285 100644
--- a/htdocs/user/class/api_users.class.php
+++ b/htdocs/user/class/api_users.class.php
@@ -378,7 +378,7 @@ class Users extends DolibarrApi
unset($object->total_localtax2);
unset($object->total_ttc);
- unset($object->libelle_incoterms);
+ unset($object->label_incoterms);
unset($object->location_incoterms);
unset($object->fk_delivery_address);
diff --git a/htdocs/webservices/README.md b/htdocs/webservices/README.md
index 915fa2b0b84..bb26c480c1e 100644
--- a/htdocs/webservices/README.md
+++ b/htdocs/webservices/README.md
@@ -3,11 +3,13 @@ API SOAP howto
This directory contains files to make Dolibarr a server of SOAP Web Services.
+WARNING: It is highly recommended to use the REST APIs instead of SOAP APIs: You will find more API, faster and easier to use in the the module REST API than into this module.
+
Explore the api
---------------
-* To see all Webservices provided by Dolibarr, just call following Url:
+* To see all Webservices provided by Dolibarr, just call the following Url:
http://mydomain.com/mydolibarr/webservices/admin/index.php
diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php
index 0f20675cbfc..1bf31ebfd4b 100755
--- a/scripts/cron/cron_run_jobs.php
+++ b/scripts/cron/cron_run_jobs.php
@@ -174,9 +174,9 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) {
echo "cron_run_jobs.php cronjobid: ".$line->id." priority=".$line->priority." entity=".$line->entity." label=".$line->label;
// Force reload of setup for the current entity
- if ($line->entity != $conf->entity)
+ if ((empty($line->entity)?1:$line->entity) != $conf->entity)
{
- dol_syslog("cron_run_jobs.php we work on another entity so we reload user and conf", LOG_DEBUG);
+ dol_syslog("cron_run_jobs.php we work on another entity conf than ".$conf->entity." so we reload user and conf", LOG_DEBUG);
echo " -> we change entity so we reload user and conf";
$conf->entity = (empty($line->entity)?1:$line->entity);
diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php
index 2d6218471aa..33d503825ac 100644
--- a/test/phpunit/FactureFournisseurTest.php
+++ b/test/phpunit/FactureFournisseurTest.php
@@ -135,7 +135,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
$localobject->initAsSpecimen();
$result=$localobject->create($user);
- $this->assertLessThan($result, 0);
+ $this->assertLessThan($result, 0, $localobject->errorsToString());
print __METHOD__." result=".$result."\n";
return $result;
}
@@ -160,7 +160,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
$localobject=new FactureFournisseur($this->savdb);
$result=$localobject->fetch($id);
- $this->assertLessThan($result, 0);
+ $this->assertLessThan($result, 0, $localobject->errorsToString());
print __METHOD__." id=".$id." result=".$result."\n";
return $localobject;
}
@@ -186,7 +186,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
$result=$localobject->update($user);
print __METHOD__." id=".$localobject->id." result=".$result."\n";
- $this->assertLessThan($result, 0);
+ $this->assertLessThan($result, 0, $localobject->errorsToString());
return $localobject;
}
@@ -210,7 +210,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
$result=$localobject->validate($user);
print __METHOD__." id=".$localobject->id." result=".$result."\n";
- $this->assertLessThan($result, 0);
+ $this->assertLessThan($result, 0, $localobject->errorsToString());
return $localobject;
}
@@ -265,7 +265,7 @@ class FactureFournisseurTest extends PHPUnit_Framework_TestCase
$result=$localobject->delete($user);
print __METHOD__." id=".$id." result=".$result."\n";
- $this->assertLessThan($result, 0);
+ $this->assertLessThan($result, 0, $localobject->errorsToString());
return $result;
}
}