diff --git a/README-FR.md b/README-FR.md
index 19d4ae25df9..4feb27893e0 100644
--- a/README-FR.md
+++ b/README-FR.md
@@ -15,37 +15,43 @@ Dolibarr est distribué sous les termes de la licence GNU General Public License
## INSTALLER DOLIBARR
-Si vous n'avez pas de connaissances techniques, et que vous recherchez
-un programme d'installation qui installe Dolibarr ERP/CRM en quelques clics,
-vous devez vous ré-orienter vers DoliWamp (la version tout-en-un
-de Dolibarr pour Windows), DoliDeb (la version tout-en-un pour Debian ou
-Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
-OpenSuse, Mandriva ou Mageia).
+### Configuration simple
-Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
-https://www.dolibarr.org/
+Si vous avez peu de compétences techniques et que vous souhaitez installer Dolibarr ERP/CRM en quelques clics, vous pouvez utiliser l'une des versions pré-packagées avec les prérequis:
-Si vous avez déjà installé un serveur Web avec PHP et une base de données (MariaDb/MySql/PostgreSql),
-vous pouvez installer Dolibarr avec cette version de la manière suivante:
+- DoliWamp pour Windows
+- DoliDeb pour Debian ou Ubuntu
+- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
-- Copiez le répertoire "dolibarr" et son contenu dans la racine de votre serveur
- web, ou bien copiez le répertoire sur le serveur et configurez ce serveur pour
- utiliser "dolibarr/htdocs" comme racine d'un nouveau virtual host (ce second
- choix requiert des compétences et habilitations en administration du serveur
- web).
-
-- Créez un fichier vide "htdocs/conf/conf.php" et attribuez les permissions
- en lecture et écriture pour le user du serveur web (les permissions en
- écriture seront supprimées une fois l'installation terminée).
+Les packages peuvent être téléchargés à partir de [site web officiel] (https://www.dolibarr.org/).
-- Depuis votre navigateur, appelez la page "install/" de dolibarr. L'url dépend
- du choix fait à la première étape:
- http://localhost/dolibarr/htdocs/install/
- ou
- http://yourdolibarrvirtualhost/install/
-
-- Suivez les instructions fournies par l'installateur...
+### Configuration avancée
+Vous pouvez aussi utiliser un serveur Web et une base de données prise en charge (MariaDB, MySQL ou PostgreSQL) pour installer la version standard.
+
+- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
+
+ git clone https://github.com/dolibarr/dolibarr -b x.y (où x.y est la version principale comme 3.6, 9.0, ...)
+
+- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
+
+- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
+
+- Depuis votre navigateur, allez à la page "install/" de dolibarr
+
+ L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
+
+ http://localhost/dolibarr/htdocs/install/
+
+ ou
+
+ http://localhost/dolibarr/install/
+
+ ou
+
+ http://yourdolibarrvirtualhost/install/
+
+- Suivez les instructions de l'installateur
## METTRE A JOUR DOLIBARR
diff --git a/README.md b/README.md
index bcff409035f..9dfd1a8a750 100644
--- a/README.md
+++ b/README.md
@@ -29,27 +29,6 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
## INSTALLING
-### Download
-
-Releases can be downloaded from [official website](https://www.dolibarr.org/).
-
-### Install from composer
-
-If you do not already have Composer installed, you may do so by following the instructions at [getcomposer.org](https://getcomposer.org/). On Linux and macOS, you may run the following commands:
-
-```bash
-curl -sS https://getcomposer.org/installer | php
-mv composer.phar /usr/local/bin/composer
-```
-
-On Windows, you can download and run https://getcomposer.org/Composer-Setup.exe
-
-You can then create a new project
-
-```bash
-composer create-project dolibarr/dolibarr erp
-```
-
### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
@@ -58,16 +37,23 @@ If you have low technical skills and you're looking to install Dolibarr ERP/CRM
- DoliDeb for Debian or Ubuntu
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
+Releases can be downloaded from [official website](https://www.dolibarr.org/).
+
### Advanced setup
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
-- Uncompress the downloaded archive
-- Copy the "dolibarr" directory and all its files inside your web server root or anywhere you'd like and set up your web server to use "*dolibarr/htdocs*" as root for a new web server virtual host (second choice need to be server administrator)
-- Create an empty `htdocs/conf/conf.php` file and set permissions for your web server user (*write* permissions will be removed once install is finished)
+- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
+
+ git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...)
+
+- Set up your web server to use "*dolibarr/htdocs*" as root if you'r web server does not have directory to point to already defined.
+
+- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
+
- From your browser, go to the dolibarr "install/" page
- The URL will depends on choices made in the first step:
+ The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
http://localhost/dolibarr/htdocs/install/
@@ -81,6 +67,11 @@ You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL)
- Follow the installer instructions
+### Saas/Cloud setup
+
+If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free.
+
+
## UPGRADING
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index 14f28a71edc..bbdfa564183 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -589,7 +589,8 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
- $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/dav/tests`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;
+ $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php
index 9ee06cd3fa7..33d42986256 100644
--- a/htdocs/adherents/admin/adherent_emails.php
+++ b/htdocs/adherents/admin/adherent_emails.php
@@ -43,6 +43,22 @@ $oldtypetonewone=array('texte'=>'text','chaine'=>'string'); // old type to new o
$action = GETPOST('action','alpha');
+$error = 0;
+
+// Editing global variables not related to a specific theme
+$constantes=array(
+ 'MEMBER_REMINDER_EMAIL'=>array('type'=>'yesno', 'label'=>$langs->trans('MEMBER_REMINDER_EMAIL', $langs->transnoentities("Module2300Name"))),
+ 'ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION' =>'emailtemplate:member',
+ 'ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER' =>'emailtemplate:member', /* old was ADHERENT_AUTOREGISTER_MAIL */
+ 'ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION' =>'emailtemplate:member', /* old was ADHERENT_MAIL_VALID */
+ 'ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION' =>'emailtemplate:member', /* old was ADHERENT_MAIL_COTIS */
+ 'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>'emailtemplate:member', /* old was ADHERENT_MAIL_RESIL */
+ 'ADHERENT_MAIL_FROM'=>'string',
+ 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'=>'string',
+ 'ADHERENT_AUTOREGISTER_NOTIF_MAIL'=>'html',
+);
+
+
/*
* Actions
@@ -133,24 +149,10 @@ $head = member_admin_prepare_head();
dol_fiche_head($head, 'emails', $langs->trans("Members"), -1, 'user');
-print '
';
+
dol_fiche_end();
// End of page
diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php
index cad250a60d0..02364a3a1d8 100644
--- a/htdocs/adherents/admin/website.php
+++ b/htdocs/adherents/admin/website.php
@@ -136,7 +136,7 @@ if ($conf->use_javascript_ajax)
}
-print $langs->trans("BlankSubscriptionFormDesc").'
';
$enabledisablehtml = $langs->trans("EnablePublicSubscriptionForm").' ';
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 959dacba2c1..f5cb86304d5 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2520,7 +2520,7 @@ class Adherent extends CommonObject
/**
- * Charge les informations d'ordre info dans l'objet adherent
+ * Load type info information in the member object
*
* @param int $id Id of member to load
* @return void
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 263012df782..dd9da927c25 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -164,7 +164,7 @@ class AdherentType extends CommonObject
}
/**
- * Met a jour en base donnees du type
+ * Updating the type in the database
*
* @param User $user Object user making change
* @param int $notrigger 1=do not execute triggers, 0 otherwise
@@ -234,9 +234,9 @@ class AdherentType extends CommonObject
}
/**
- * Fonction qui permet de supprimer le status de l'adherent
+ * Function to delete the member's status
*
- * @return int >0 if OK, 0 if not found, < 0 if KO
+ * @return int > 0 if OK, 0 if not found, < 0 if KO
*/
function delete()
{
@@ -267,7 +267,7 @@ class AdherentType extends CommonObject
}
/**
- * Fonction qui permet de recuperer le status de l'adherent
+ * Function that retrieves the status of the member
*
* @param int $rowid Id of member type to load
* @return int <0 if KO, >0 if OK
diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php
index 1c6e5c16fcf..27dad04dc32 100644
--- a/htdocs/admin/agenda.php
+++ b/htdocs/admin/agenda.php
@@ -144,7 +144,7 @@ print '
';
diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index 8c2835d856c..36ac6615efa 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -116,7 +116,7 @@ if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY)) {
// Example with a yes / no select
print '
';
}
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index 3c06198b4f2..fe6a3be96ee 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -303,13 +303,13 @@ class ChargeSociales extends CommonObject
/**
- * Met a jour une charge sociale
+ * Update social or fiscal contribution
*
- * @param User $user Utilisateur qui modifie
+ * @param User $user User that modify
* @param int $notrigger 0=launch triggers after, 1=disable triggers
- * @return int <0 si erreur, >0 si ok
+ * @return int <0 if KO, >0 if OK
*/
- function update($user,$notrigger=0)
+ function update($user, $notrigger = 0)
{
$error=0;
$this->db->begin();
@@ -325,11 +325,11 @@ class ChargeSociales extends CommonObject
dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql=$this->db->query($sql);
-
+
if (! $resql) {
$error++; $this->errors[]="Error ".$this->db->lasterror();
}
-
+
if (! $error)
{
if (! $notrigger)
@@ -340,7 +340,7 @@ class ChargeSociales extends CommonObject
// End call triggers
}
}
-
+
// Commit or rollback
if ($error)
{
@@ -357,8 +357,6 @@ class ChargeSociales extends CommonObject
$this->db->commit();
return 1;
}
-
-
}
/**
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
new file mode 100644
index 00000000000..5c8dd23a332
--- /dev/null
+++ b/htdocs/contact/consumption.php
@@ -0,0 +1,657 @@
+
+ * Copyright (C) 2004-2016 Laurent Destailleur
+ * Copyright (C) 2013-2015 Juanjo Menent
+ * Copyright (C) 2015 Marcos García
+ * Copyright (C) 2015-2017 Ferran Marcet
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * 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 .
+ */
+
+/**
+ * \file htdocs/societe/consumption.php
+ * \ingroup societe
+ * \brief Add a tab on thirpdarty view to list all products/services bought or sells by thirdparty
+ */
+
+require "../main.inc.php";
+require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
+
+// Security check
+$id = GETPOST('id', 'int');
+
+$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
+$object = new Contact($db);
+if ($id > 0) $object->fetch($id);
+if(empty($object->thirdparty)) $object->fetch_thirdparty();
+$socid = $object->thirdparty->id;
+
+// Sort & Order fields
+$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
+$sortfield = GETPOST("sortfield",'alpha');
+$sortorder = GETPOST("sortorder",'alpha');
+$page = GETPOST("page",'int');
+if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+if (! $sortorder) $sortorder='DESC';
+if (! $sortfield) $sortfield='dateprint';
+
+// Search fields
+$sref=GETPOST("sref");
+$sprod_fulldescr=GETPOST("sprod_fulldescr");
+$month = GETPOST('month','int');
+$year = GETPOST('year','int');
+
+// Clean up on purge search criteria ?
+if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers
+{
+ $sref='';
+ $sprod_fulldescr='';
+ $year='';
+ $month='';
+}
+// Customer or supplier selected in drop box
+$thirdTypeSelect = GETPOST("third_select_id");
+$type_element = GETPOST('type_element')?GETPOST('type_element'):'';
+
+// Load translation files required by the page
+$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
+
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('consumptioncontact'));
+
+
+/*
+ * Actions
+ */
+
+$parameters=array('id'=>$id);
+$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');
+
+
+/*
+ * View
+ */
+$form = new Form($db);
+$formother = new FormOther($db);
+$productstatic=new Product($db);
+$objsoc = new Societe($db);
+
+$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
+$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
+llxHeader('',$title,$help_url);
+
+if (empty($id))
+{
+ dol_print_error($db);
+ exit;
+}
+
+$head = contact_prepare_head($object);
+dol_fiche_head($head, 'consumption', $langs->trans("ContactsAddresses"), -1, 'contact');
+
+$linkback = ''.$langs->trans("BackToList").'';
+
+$morehtmlref='