diff --git a/.travis.yml b/.travis.yml
index 9d0700d3a84..709feaeaa37 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -121,19 +121,31 @@ install:
- |
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION"
- if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
- [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
+ if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
composer -n require phpunit/phpunit ^5 \
php-parallel-lint/php-parallel-lint ^1 \
php-parallel-lint/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi
+ if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
+ composer -n require phpunit/phpunit ^6 \
+ php-parallel-lint/php-parallel-lint ^1 \
+ php-parallel-lint/php-console-highlighter ^0 \
+ squizlabs/php_codesniffer ^3
+ fi
+ if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
+ composer -n require phpunit/phpunit ^7 \
+ php-parallel-lint/php-parallel-lint ^1.2 \
+ php-parallel-lint/php-console-highlighter ^0 \
+ squizlabs/php_codesniffer ^3
+ fi
+ # phpunit 9 is required for php 8
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
- composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
+ composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
- fi
+ fi
echo
- |
@@ -165,15 +177,20 @@ before_script:
- |
echo "Versions information"
+ echo
# Check PHP
echo "PHP version"
php -i | head -
- # Check PHP CodeSniffer installation
+ # Check Parallel-lin version
+ echo "Parallel-lint version"
+ which parallel-lint
+ parallel-lint -V
+ # Check PHP CodeSniffer version
echo "PHPCS version"
which phpcs
phpcs --version | head -
phpcs -i | head -
- # Check PHPUnit installation
+ # Check PHPUnit version
echo "PHPUnit version"
which phpunit
phpunit --version | head -
@@ -409,7 +426,7 @@ script:
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
# Enable modules not enabled into original dump
- php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log
+ php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP > $TRAVIS_BUILD_DIR/enablemodule.log
echo $?
cd -
set +e
diff --git a/COPYRIGHT b/COPYRIGHT
index d8cefedcd65..d43f4d506f1 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -21,6 +21,7 @@ Mobiledetect 2.8.34 MIT License Yes
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.6 MIT License Yes Markdown parser
+PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
diff --git a/ChangeLog b/ChangeLog
index d8fdafeae95..516bc270321 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,30 +8,29 @@ For users:
NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
NEW: Several security issues after a private bug bounty campaign.
-NEW: #15065 Fix formatting
NEW: #15065 Put the product label in bold in the PDF templates if configured
NEW: Accountancy - Add chart of sub accounts
NEW: Accountancy - Add options to disable binding on sales, purchases & expense reports independently of the modules
-NEW: Accountancy balance - Add a input to show subtotal by group
+NEW: Accountancy balance - Add a menu entry to show subtotal by group
NEW: Accountancy - Move to real ledger, real journals, menu disposition
NEW: Accountancy - On transfers, select the periodicity by default
NEW: New currency rate editor.
NEW: Add 2 rules for emailcollector: Message send/not sent from Dolibarr
-NEW: Add a counter of number of words of pages in website module
-NEW: add alert before change thirdparty in takepos
-NEW: Add a page to list Stock at a given date.
+NEW: Add a counter of number of words for pages in website module
+NEW: add alert before changing thirdparty in takepos
+NEW: Add a page to list Stock at a given date in the past.
NEW: Add a start date to begin binding in accountancy
-NEW: Add a stat page to list popularity of products on invoices
+NEW: Add a statistics page to list popularity of products on invoices
NEW: Add calendar selection for agenda view
-NEW: add class for ticket edition (pdf or odt)
+NEW: Support documents generation for ticket edition (pdf or odt)
NEW: Add column payment term into list of supplier invoices.
NEW: Add column quantity in product margin page
NEW: Add column vat rate in page to define accounting account on product/service
NEW: Add common list function for available app/module page
NEW: add costprice in fields of products list
-NEW: ADDED IMPORT TOOL FOR CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
-NEW: Added incoterms to substitution array
-NEW: Add employee in expense report binding page
+NEW: Added an import profile for CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
+NEW: Added incoterms dara into the substitution array
+NEW: Add employee link in expense report binding page
NEW: Add export for various payment
NEW: add extra fields labels and values in mail on create ticket
NEW: Add extrafields support on ECM module
@@ -46,13 +45,14 @@ NEW: Add helper function for table headers with numbers
NEW: add hooks on stats pages
NEW: Add link to edit property from search result of website pages
NEW: Add link to reset qty on supplier dispatch page
-NEW: add MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const to remove header in email collector
-NEW: Add Manufacturing Orders into the automatic ECM
+NEW: add MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const to remove header stored by email collector
+NEW: Add Manufacturing Orders attached files into the automatic ECM view
NEW: add margin info in invoice list
NEW: Add mass action to set category on a list of website pages.
NEW: Add mass deletion for events
+NEW: Add mass deletion for draft invoices
NEW: Add __MEMBER_TYPE__ substitution key
-NEW: Add message in error_log after detection of SQL or script injection
+NEW: Add a message in error_log after detection of SQL or script injection
NEW: Add module Credit transfer SEPA to manage payment of supplier using
NEW: Add more filters on monthly statement list
NEW: Add option TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT
diff --git a/README-FR.md b/README-FR.md
index bccb7b0143b..77bb5a3e27a 100644
--- a/README-FR.md
+++ b/README-FR.md
@@ -6,7 +6,7 @@
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
-
+
## LICENCE
diff --git a/README.md b/README.md
index 919fc62ae5b..ac8f1d06382 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ You can use it as a standalone application or as a web application to access it
Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
-
+
## LICENSE
diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index 3c0523ac877..e09f6ec14cf 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -610,7 +610,7 @@ if ($result)
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
$codesell = length_accountg($obj->accountancy_code_buy);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
// Accounting account buy intra (In EEC)
@@ -620,7 +620,7 @@ if ($result)
$codesell = length_accountg($obj->accountancy_code_buy_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
// Accounting account buy export (Out of EEC)
@@ -630,7 +630,7 @@ if ($result)
$codesell = length_accountg($obj->accountancy_code_buy_export);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
// Accounting account sell
@@ -640,7 +640,7 @@ if ($result)
$codesell = length_accountg($obj->accountancy_code_sell);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
// Accounting account sell intra (In EEC)
@@ -650,7 +650,7 @@ if ($result)
$codesell = length_accountg($obj->accountancy_code_sell_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
} else {
// Accounting account sell export (Out of EEC)
@@ -659,13 +659,13 @@ if ($result)
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
$codesell = length_accountg($obj->accountancy_code_sell_export);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
- print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
+ print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '';
}
// Checkbox select
print '
";
+ }
}
}
print '';
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 6a0eb273394..009c73cf318 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -74,17 +74,17 @@ class Adherent extends CommonObject
public $login;
/**
- * @var Clear password in memory
+ * @var string Clear password in memory
*/
public $pass;
/**
- * @var Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
+ * @var string Clear password in database (defined if DATABASE_PWD_ENCRYPTED=0)
*/
public $pass_indatabase;
/**
- * @var Encrypted password in database (always defined)
+ * @var string Encrypted password in database (always defined)
*/
public $pass_indatabase_crypted;
@@ -2013,7 +2013,8 @@ class Adherent extends CommonObject
}
$label .= '
';
- $label .= ''.$langs->trans("Member").'';
+ $label .= img_picto('', $this->picto).' '.$langs->trans("Member").'';
+ $label .= ' '.$this->getLibStatut(4);
if (!empty($this->ref)) $label .= ' '.$langs->trans('Ref').': '.$this->ref;
if (!empty($this->firstname) || !empty($this->lastname)) $label .= ' '.$langs->trans('Name').': '.$this->getFullName($langs);
if (!empty($this->company)) $label .= ' '.$langs->trans('Company').': '.$this->company;
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index e31d1e8fbc7..b5c701f2ad4 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -85,7 +85,6 @@ class AdherentType extends CommonObject
/**
* @var int Subsription required (0 or 1)
- * @since 5.0
*/
public $subscription;
@@ -95,9 +94,15 @@ class AdherentType extends CommonObject
/** @var integer Can vote */
public $vote;
- /** @var string Email sent during validation */
+ /** @var string Email sent during validation of member */
public $mail_valid;
+ /** @var string Email sent after recording a new subscription */
+ public $mail_subscription = '';
+
+ /** @var string Email sent after resiliation */
+ public $mail_resiliate = '';
+
/** @var array Array of members */
public $members = array();
@@ -116,7 +121,7 @@ class AdherentType extends CommonObject
}
/**
- * Load array this->multilangs
+ * Load array this->multilangs
*
* @return int <0 if KO, >0 if OK
*/
@@ -151,7 +156,7 @@ class AdherentType extends CommonObject
}
/**
- * Update or add a translation for a product
+ * Update or add a translation for this member type
*
* @param User $user Object user making update
* @return int <0 if KO, >0 if OK
@@ -236,12 +241,11 @@ class AdherentType extends CommonObject
}
/**
- * Delete a language for this product
+ * Delete a language for this member type
*
- * @param string $langtodelete Language code to delete
- * @param User $user Object user making delete
- *
- * @return int <0 if KO, >0 if OK
+ * @param string $langtodelete Language code to delete
+ * @param User $user Object user making delete
+ * @return int <0 if KO, >0 if OK
*/
public function delMultiLangs($langtodelete, $user)
{
@@ -268,9 +272,9 @@ class AdherentType extends CommonObject
}
/**
- * Fonction qui permet de creer le status de l'adherent
+ * Function to create the member type
*
- * @param User $user User making creation
+ * @param User $user User making creation
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
@@ -574,7 +578,7 @@ class AdherentType extends CommonObject
public function getmorphylib($morphy = '')
{
global $langs;
- if ($morphy == 'phy') { return $langs->trans("Physical"); } elseif ($morphy == 'mor') { return $langs->trans("Moral"); } else return $langs->trans("MorPhy");
+ if ($morphy == 'phy') { return $langs->trans("Physical"); } elseif ($morphy == 'mor') { return $langs->trans("Moral"); } else return $langs->trans("MorAndPhy");
//return $morphy;
}
@@ -591,7 +595,15 @@ class AdherentType extends CommonObject
global $langs;
$result = '';
- $label = $langs->trans("ShowTypeCard", $this->label);
+
+ $label = '';
+
+ $label = img_picto('', $this->picto).' '.$langs->trans("MemberType").'';
+ $label .= ' '.$this->getLibStatut(4);
+ $label .= ' '.$langs->trans("Label").': '.$this->label;
+ if (isset($this->subscription)) {
+ $label .= ' '.$langs->trans("SubscriptionRequired").': '.yn($this->subscription);
+ }
$linkstart = '';
$linkend = '';
@@ -741,4 +753,34 @@ class AdherentType extends CommonObject
return '';
}
+
+ /**
+ * getMailOnSubscription
+ *
+ * @return string Return mail content of type or empty
+ */
+ public function getMailOnSubscription()
+ {
+ // mail_subscription not defined so never used
+ if (!empty($this->mail_subscription) && trim(dol_htmlentitiesbr_decode($this->mail_subscription))) { // Property not yet defined
+ return $this->mail_subscription;
+ }
+
+ return '';
+ }
+
+ /**
+ * getMailOnResiliate
+ *
+ * @return string Return mail model content of type or empty
+ */
+ public function getMailOnResiliate()
+ {
+ // NOTE mail_resiliate not defined so never used
+ if (!empty($this->mail_resiliate) && trim(dol_htmlentitiesbr_decode($this->mail_resiliate))) { // Property not yet defined
+ return $this->mail_resiliate;
+ }
+
+ return '';
+ }
}
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index fc93f828f6c..35b0fcfb478 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -284,10 +284,10 @@ print '
';
*/
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
-$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
+$sql = "SELECT a.rowid, a.statut as status, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql .= " a.gender, a.email, a.photo, a.morphy,";
-$sql .= " a.tms as datem, datefin as date_end_subscription,";
-$sql .= " ta.rowid as typeid, ta.libelle as label, ta.subscription";
+$sql .= " a.tms as datem, a.datefin as date_end_subscription,";
+$sql .= " ta.rowid as typeid, ta.libelle as label, ta.subscription as need_subscription";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
$sql .= " WHERE a.entity IN (".getEntity('adherent').")";
$sql .= " AND a.fk_adherent_type = ta.rowid";
@@ -306,7 +306,7 @@ if ($resql) {
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
- print '