diff --git a/ChangeLog b/ChangeLog
index c52a486523c..f4b13d1e3ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,69 +24,65 @@ Dolibarr better:
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
check you make a fetch on object before calling the delete.
- The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default.
+- Remove not used function calculate_byte(). Use dol_print_size() instead.
+- Function pdf_getTotalQty is now deprecated. Not used by Dolibarr core.
***** ChangeLog for 4.0.0 compared to 3.9.* *****
For users:
-NEW: Add reccuring invoice feature and automatic generation of invoices.
+NEW: Add recurring invoice feature and automatic generation of invoices.
NEW: Add module "Loan" as stable.
-NEW: Add module "Supplier commercial proposal" (price request) is set to stable status.
-NEW: Experimental module Accountancy Expert
-NEW: Experimental module Multicurency
-NEW: Show into badge on tab head the number of dedicated contacts for all objects.
+NEW: Add module "Supplier commercial proposal" (price request) with stable status.
+NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties.
+NEW: Can select fields to show on list also for list of customer orders, supplier orders, shipments, proposals and invoices.
+NEW: Show into badge on tab head, the number of dedicated contacts for all objects.
NEW: Add a checkbox to select/unselect all lines on page that support mass actions (like invoice list page)
-NEW: Add a new method for margin calculation. Added margin on "cost price" to margin on WAP price and margin on "best supplier price".
+NEW: Add a new method for margin calculation. Added margin on "cost price" in addition to margin on WAP price and margin on "best supplier price".
NEW: Add an explanation message on shipment page to explain you can't make shipment if order is not validated
NEW: Add date_rum into table of thirdparty bank account.
NEW: The probability of lead/opportunity can be defined per lead.
NEW: Added Malta VAT into migration script
-NEW: #4972 Translated Charges sociales (type 0) and Charges sociales (type 1) in reports page
NEW: Add Expense report into accountancy report
NEW: Add Expense report to approve into workboard
-NEW: Selection of boxes is move on top of home page
-NEW: Add filter on a keyword, status and nature into list of modules
+NEW: Selection of boxes is moved on top of home page
+NEW: Add filter on a keyword, status and nature into list of modules.
NEW: Add hidden option BANK_DISABLE_CHECK_DEPOSIT to disable check deposit feature.
-NEW: Add option MAIN_PUBLIC_NOTE_IN_ADDRESS
-NEW: add html id/class to locate value in the DOM html
+NEW: Add hidden option MAIN_PUBLIC_NOTE_IN_ADDRESS
NEW: Add index on invoice status
-NEW: Add constant MAIN_LOGTOHTML to 0 into other setup by default to save time when we need to make debug on hosted instance.
+NEW: Add constant MAIN_LOGTOHTML to 0 into setup by default to save time when we need to make debug on hosted instance.
NEW: Add list of billed
NEW: Add minimum stock and desired stock into import/export profiles.
-NEW: Add state into thirdparty export fields
+NEW: Add state into thirdparty export fields.
NEW: Add more trackable events (create, submit and receive supplier order).
-NEW: Add option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
+NEW: Add hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN
NEW: Add picto on module list to show warning and if module is an external module.
-NEW: add product type filter on turnover report
+NEW: Add product type filter on turnover report
NEW: Add state into list of fields available for personalized fields of thirdparties
NEW: Add statistics for interventions module
NEW: Add statistics on number of projets on home page
-NEW: Add stats and late records into dashboard for supplier proposals.
+NEW: Add statistics and late records into dashboard for supplier proposals.
NEW: Add the admin info on combo of type of contact
-NEW: Add the event BILL_PAYED to list of supported events for module notification.
-NEW: Add total weight and volume on PDF
+NEW: Add the event BILL_PAYED to the list of supported events for module notification.
+NEW: Add total weight and volume on PDF.
NEW: Add hidden option to hide column qty ordered on shipments.
-NEW: Add view of virtual stock into product list (when appropriate)
-NEW: Add warning on tasks when they are late (add also the warning tolerance parameter)
-NEW: Add weight/volume for one product into shipment export
+NEW: Add view of virtual stock into product list (when appropriate).
+NEW: Add warning on tasks when they are late (add also the warning tolerance parameter).
+NEW: Add weight/volume for one product into shipment export.
NEW: Add width and height on product card
-NEW: allow a document to be linked to project from another customer on config
-NEW: allow project to be shared across entities (for multicompany module)
+NEW: allow a document to be linked to project of another customer by config setup.
+NEW: allow project to be shared across entities (for multicompany module).
NEW: All variant of ckeditor config can be tested into the setup page of module.
NEW: Can change dynamically number of records visible into lists.
-NEW: Can change type of extrafields for some combinations.
-NEW: Can define number of first and last line into import wizard.
+NEW: Can change type of extrafields (for some combinations only).
+NEW: Can define number of first and last line to import into import wizard.
NEW: Can edit next execution date of a cron job.
NEW: Can edit value date of a vat payment after recording it.
-NEW: Can filter modules on publisher
-NEW: Can filter on employee status when building emailing from users
-NEW: Can reopen an closed shipment
-NEW: Can search on shipments into the quick search box
-NEW: Can select dynamicaly number of lines to show on page on product, shipment, contact, orders, thirdparties
-NEW: Can select fields to show on supplier orders list.
-NEW: Can select fields to show on list also for list of customer orders, shipments and invoices.
-NEW: Can select fields to show on proposal lists.
-NEW: Can select language from combo list on page to overwrite a translation
+NEW: Can filter modules on publisher.
+NEW: Can filter on employee status when building emailing from users.
+NEW: Can reopen an closed shipment.
+NEW: Can search on shipments into the quick search box.
+NEW: Can select language from a combo list on page to overwrite a translation.
NEW: Can select number of lines on page list for projects and tasks.
NEW: Can use ^ and $ (to say start with or end with like regex syntax) into search fields when search field is text. Bonus: ^$ can filter all lines with field not defined.
NEW: Clean and enhance code for cron engine
@@ -108,33 +104,35 @@ NEW: Into GED module, filename is truncated only if there is not enough space in
NEW: Introduce a predefined job to run database backup
NEW: Introduce option MAIN_WEIGHT_DEFAULT_UNIT and MAIN_VOLUME_DEFAULT_UNIT to force output unit for weight and volume.
NEW: Introduce position of records into dictionnary of type of contacts
-NEW: Link on user in leave context reach to leave tab.
-NEW: List of user in agenda view per user show photo thumb
+NEW: Link on a user in leave page reach to leave tab of user.
+NEW: List of user in agenda view per user show photo thumb.
NEW: Margins module - Check/update buying price on invoice lines
NEW: Merge all admin tools (system and module admin tools) into same entry "Admin tools", so now things are clear: All features restricted to an admin user is inside "setup" (for setup) or "admin tools" (for action tools) instead of 3 different entries.
NEW: Merge all boxes "related objects" into one. This save a lot of room on most card and avoid often horizontal scoll.
NEW: Moved code that deals with bank categories to BankCateg. Created BankCateg::fetchAll function
-NEW: Move Expense report menu from module to menu files
-NEW: Move HRM dictionary from module to core dictionaries
+NEW: Move HRM dictionary from module to core dictionaries.
NEW: Mutualize code to manage email substitution variables. Show available variables into page to edit email templates.
NEW: Mutualize code: Use one call of function "addThumbs", when possible, to generate thumbs files instead of several call of "vignette" function.
NEW: On translation admin page, admin can overwrite a translation value.
-NEW: Option MAIN_LIST_FILTER_ON_DAY is supported on proposal list
-NEW: Add reputation field for price supplier
-NEW: Rest API token is no more reset at each call. We can reset it with param reset=1 on login call.
+NEW: Option MAIN_LIST_FILTER_ON_DAY is supported on proposal list.
+NEW: Add reputation field for price supplier.
NEW: Selection of fields is available on member list.
NEW: Show a badge with number of withdraw requests done on the withdraw tab of invoice.
-NEW: Add option to show detail per warehouse into reassort
-NEW: Show total number of modules into the module list
+NEW: Add option to show detail per warehouse into reassort.
+NEW: Show total number of modules into the module list.
NEW: Survey system has now a status like other objects. You can close or reopen a survey.
-NEW: The note on time spent can be entered when using the view per day.
-NEW: Use ellipsis truncation on too large left menu text
+NEW: The note on time spent can be entered when using the "view per day".
+NEW: Use ellipsis truncation on too large left menu text.
NEW: When a new field to show into lists is selected, the form is automatically submited and field added.
NEW: When creating a template invoice from a draft invoice, if there is link to contract on draft invoice, link is kept on template invoice.
NEW: When emailing is not sent completely, show progression.
-NEW: Add entity field in llx_societe_remise_except and llx_societe_remise
+NEW: Experimental module Accountancy Expert.
+NEW: Experimental module Multicurency
For developers:
+NEW: Add entity field in llx_societe_remise_except and llx_societe_remise.
+NEW: Rest API token is no more reset at each call. We can reset it with param reset=1 on login call.
+NEW: Add html id/class to locate value in the DOM html
NEW: Add a css class style called 'reposition', so when clicking on a link with this class will move scrollbarr to be placed at same page location.
NEW: TimeZone can be supplied to mktime
NEW: hook in shipment card
@@ -154,8 +152,9 @@ NEW: Removed deprecated CommonObject::client property. Please use CommonObject::
NEW: Removed unused FormOrder::selectSourcesCommande function
NEW: Renamed ActionComm::add function to ActionComm::create
NEW: Rename Form::select_date to Form::selectDate and Form::form_date to Form::formDate
-NEW: Rename path for generiN
+NEW: Rename path for generic media files
NEW: More phpunit tests. Include some REST API into automatic tests.
+NEW: Move Expense report menu from module to menu files.
WARNING:
diff --git a/build/debian/control b/build/debian/control
index 9a76856505a..d5c4a913713 100755
--- a/build/debian/control
+++ b/build/debian/control
@@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
# Misc dependencies
# fonts-dejavu-core | ttf-dejavu-core,
xdg-utils,
- mysql-server,
- mysql-client,
+ virtual-mysql-client,
${misc:Depends},
${perl:Depends}
-Recommends: apache2 | lighttpd | httpd
+Recommends: apache2 | lighttpd | httpd,
+ virtual-mysql-server
Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for
diff --git a/composer.json b/composer.json
index 87f9822f376..dbe3b9e303f 100644
--- a/composer.json
+++ b/composer.json
@@ -2,14 +2,22 @@
"name": "dolibarr/dolibarr",
"type": "project",
"description": "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business",
- "keywords": ["erp","crm","invoice","sme","proposal","order","stock"],
- "homepage": "http://www.dolibarr.org",
+ "keywords": [
+ "erp",
+ "crm",
+ "invoice",
+ "sme",
+ "proposal",
+ "order",
+ "stock",
+ "agenda"
+ ],
+ "homepage": "https://www.dolibarr.org",
"license": "GPL-3.0+",
"support": {
"issues": "https://github.com/Dolibarr/dolibarr/issues",
- "forum": "http://www.dolibarr.org/forum",
- "wiki": "http://wiki.dolibarr.org",
- "irc": "irc://chat.freenode.net/dolibarr",
+ "forum": "https://www.dolibarr.org/forum",
+ "wiki": "https://wiki.dolibarr.org",
"source": "https://github.com/Dolibarr/dolibarr"
},
"config": {
@@ -48,6 +56,5 @@
"ext-zip": "ODT and Excel support",
"ext-xml": "Excel support",
"firephp/firephp-core": "Logging to Firebug console support",
- "raven/raven": "Sentry logging server support"
}
}
diff --git a/doc/images/dolibarr_screenshot1_1280x800.jpg b/doc/images/dolibarr_screenshot1_1280x800.jpg
new file mode 100644
index 00000000000..c6d5776d1fc
Binary files /dev/null and b/doc/images/dolibarr_screenshot1_1280x800.jpg differ
diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php
index 6211f5752b1..ff7f764ea31 100644
--- a/htdocs/accountancy/class/accountancycategory.class.php
+++ b/htdocs/accountancy/class/accountancycategory.class.php
@@ -47,8 +47,6 @@ class AccountancyCategory
*/
public function __construct($db) {
$this->db = $db;
-
- return 1;
}
/**
diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php
index 5832d44cd52..0d863e064d4 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -95,7 +95,6 @@ class BookKeeping extends CommonObject
*/
public function __construct(DoliDB $db) {
$this->db = $db;
- return 1;
}
/**
diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index f3cfcff9807..ae32c073349 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -27,6 +27,8 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+global $conf;
+
if (!$user->admin) accessforbidden();
$langs->load("admin");
@@ -40,34 +42,37 @@ $activeModules = array();
if (defined('SYSLOG_HANDLERS')) $activeModules = json_decode(constant('SYSLOG_HANDLERS'));
-$dir = dol_buildpath('/core/modules/syslog/');
+$dirsyslogs = array_merge(array('/core/modules/syslog/'), $conf->modules_parts['syslog']);
+foreach ($dirsyslogs as $reldir) {
+ $dir = dol_buildpath($reldir, 0);
+ $newdir = dol_osencode($dir);
+ if (is_dir($newdir)) {
+ $handle = opendir($newdir);
-if (is_dir($dir))
-{
- $handle = opendir($dir);
+ if (is_resource($handle)) {
+ $var = true;
- if (is_resource($handle))
- {
- $var=true;
+ while (($file = readdir($handle)) !== false) {
+ if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
+ $file = substr($file, 0, dol_strlen($file) - 4);
- while (($file = readdir($handle))!==false)
- {
- if (substr($file, 0, 11) == 'mod_syslog_' && substr($file, dol_strlen($file)-3, 3) == 'php')
- {
- $file = substr($file, 0, dol_strlen($file)-4);
+ require_once $newdir . $file . '.php';
- require_once $dir.$file.'.php';
+ $module = new $file;
- $module = new $file;
+ // Show modules according to features level
+ if ($module->getVersion() == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
+ continue;
+ }
+ if ($module->getVersion() == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
+ continue;
+ }
- // Show modules according to features level
- if ($module->getVersion() == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
- if ($module->getVersion() == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
-
- $syslogModules[] = $file;
+ $syslogModules[] = $file;
+ }
}
+ closedir($handle);
}
- closedir($handle);
}
}
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index bfd21deee33..bf313be16c2 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -23,6 +23,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$langs->load("companies");
@@ -36,10 +37,14 @@ if (!$user->admin) accessforbidden();
$id=GETPOST('rowid','int');
$action=GETPOST('action','alpha');
+
$langcode=GETPOST('langcode','alpha');
$transkey=GETPOST('transkey','alpha');
$transvalue=GETPOST('transvalue','alpha');
+
+$mode = GETPOST('mode')?GETPOST('mode'):'overwrite';
+
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@@ -56,6 +61,28 @@ if (! $sortorder) $sortorder='ASC';
* Actions
*/
+/*
+ * Actions
+ */
+
+if (GETPOST('cancel')) { $action='list'; $massaction=''; }
+if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
+
+$parameters=array('socid'=>$socid);
+$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
+
+// Purge search criteria
+if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
+{
+ $transkey='';
+ $transvalue='';
+ $toselect='';
+ $search_array_options=array();
+}
+
if ($action == 'add' || (GETPOST('add') && $action != 'update'))
{
@@ -124,182 +151,290 @@ $formadmin = new FormAdmin($db);
$wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración';
llxHeader('',$langs->trans("Setup"),$wikihelp);
-print load_fiche_titre($langs->trans("TranslationSetup"),'','title_setup');
+print load_fiche_titre($langs->trans("Translation"),'','title_setup');
print $langs->trans("TranslationDesc")." \n";
print " \n";
-print $langs->trans("CurrentUserLanguage").': '.$langs->defaultlang.' ';
+$current_language_code=$langs->defaultlang;
+$s=picto_from_langcode($current_language_code);
+print $langs->trans("CurrentUserLanguage").': '.$s.' '.$current_language_code.' ';
print ' ';
-print img_info().' '.$langs->trans("SomeTranslationAreUncomplete");
-$urlwikitranslatordoc='https://wiki.dolibarr.org/index.php/Translator_documentation';
-print ' ('.$langs->trans("SeeAlso").': '.$urlwikitranslatordoc.') ';
-print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("NewTranslationStringToShow"))." \n";
+$param='&mode='.$mode;
+if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+if ($optioncss != '') $param.='&optioncss='.$optioncss;
+if ($langcode) $param.='&langcode='.urlencode($langcode);
+if ($transkey) $param.='&transkey='.urlencode($transkey);
+if ($transvalue) $param.='&transvalue='.urlencode($transvalue);
-print ' ';
-$param='';
+print '
';
}
-print ' ';
-
-print load_fiche_titre($langs->trans("TranslationOverwriteKey"), '', '')."\n";
-
-print '\n";
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 7c6b3622920..548cd3bb7e4 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -71,7 +71,7 @@ if (! empty($conf->supplier_proposal->enabled)) $supplierproposalstatic=new Supp
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
-llxHeader();
+llxHeader("",$langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index b8a4aa6d2fa..8b471fdcfe2 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2513,7 +2513,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// Create contract
- if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
+ if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
if ($user->rights->contrat->creer) {
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index cc4a156746f..5625b153ab1 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -95,11 +95,11 @@ $pagenext = $page + 1;
if (! $sortfield) $sortfield='c.ref';
if (! $sortorder) $sortorder='DESC';
+$viewstatut=GETPOST('viewstatut');
+
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$contextpage='orderlist';
-$viewstatut=GETPOST('viewstatut');
-
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('orderlist'));
$extrafields = new ExtraFields($db);
@@ -594,7 +594,7 @@ if ($resql)
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'],$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'],$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'],$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
- if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
+ if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'],$_SERVER["PHP_SELF"],'c.tva','',$param, 'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'],$_SERVER["PHP_SELF"],'c.total_ttc','',$param, 'align="right"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 5ca13cb06df..c2633a59496 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2185,31 +2185,34 @@ if ($action == 'create')
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
{
// Deposit
- print '