diff --git a/.travis.yml b/.travis.yml index 54d937625ba..5d613e1dfca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -131,8 +131,9 @@ script: # - cat upgrade370380.log - php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log - php upgrade.php 3.8.0 3.9.0 ignoredbversion > upgrade380390.log + - cat upgrade380390.log - php upgrade2.php 3.8.0 3.9.0 ignoredbversion > upgrade380390-2.log -# - cat upgrade370380-2.log +# - cat upgrade380390-2.log - cd ../.. - date - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php diff --git a/ChangeLog b/ChangeLog index fb67d07ec43..57d217f8a38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,9 @@ English Dolibarr ChangeLog -------------------------------------------------------------- -WARNING: Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40. +WARNING: + +Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40. Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost. You may also experience troubles with Mysql 5.5.41 with error "Lost connection" during migration. Upgrading to any other version or any other database system is abolutely required BEFORE trying @@ -11,11 +13,82 @@ make a Dolibarr upgrade. ***** ChangeLog for 3.9 compared to 3.8.* ***** -WARNING: Following changes may create regression for some external modules, but were necessary to make +WARNING: + +Following changes may create regression for some external modules, but were necessary to make Dolibarr better: - Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead. - Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination. + +***** ChangeLog for 3.8.1 compared to 3.8.0 ***** +FIX: #3521 postgresql migration error +FIX: #3524 +FIX: #3529 +FIX: #3530 +FIX: #3533 +FIX: #3533 Load categories language +FIX: #3534 +FIX: #3572 Impossible to attach project in order +FIX: #3599 Not saving legal form +FIX: #3606 +FIX: #3607 Better categories setting and unsetting +FIX: #3628 +FIX: #3630 - Wrong balance report when module salaries and donation disabled +FIX: Add a test to save life when ref of object (invoice ref, order ref, ...) was empty. The was no way to go back to a clean situation, even after vaidating again the object. +FIX: Admin fiche inter page do not take good action +FIX: Always use type send in parameters in showCategories method +FIX: avoid SQL error in getValueFrom common object when all params are not send +FIX: avoid SQL error when no sortfield send to method +FIX: bad link into project box +FIX: Bad title line in project view when using jmobile +FIX: Bad translation key for project "Overview" +FIX: Can create Proposal on close thridparty #3526 +FIX: Can't change state on a contact +FIX: Can't change the admin with default setup +FIX: Can't delete thirdparty if there is some discounts +FIX: Can't reopen a canceled invoice. +FIX: Creation of tables or keys must not be done with a random order. +FIX: debian install when module mysqli is not installed. +FIX: Description of tags was mandatory in edit mode but not in create mode. Should not be mandatory. +FIX: display error on extrafields on ficheinter +FIX: Email selector contact must not include inactive contact +FIX: error in SQL due to a previous fix +FIX: Error retrieving customer prices +FIX: Event from ical stream should not be movable into calendar view +FIX: facturestat bad sql when customer view is limited +FIX: Filter on status of thirdparty list and bad encoding of url +FIX: icon into export profile may be not correctly output +FIX: Init into bad var +FIX: Link of project must be cickable if user has permission to read all projects FIX: Missing information into the alt of project picto +FIX: List of project for user that are restrited as sale repreentative to some thirdparties. +FIX: Mass Mailing activity don't display all status +FIX: Missing contracts into list in page of Refering objects of a thirdparty. +FIX: Missing menu entry for list of thirdparties when using auguria menu manager +FIX: Missing validate button if permission are not valid. +FIX: New adherent from, always redirect on entity +FIX: not closing CSS. +FIX: not responsive part for project page +FIX: Only are showing one object linked +FIX: order ref must not be translated +FIX: Payment form for paypal and paybox was not centered. +FIX: Pb into pagination scroll widget FIX: Style of previous-next card when using dolidroid +FIX: Regression on bad use of fk_account showing the bad bank account on PDF. +FIX: Removed warnings +FIX: remove twice same test +FIX: select of project using ajax autocomplete option +FIX: sortder field was missing so manually added values were moved to begin. +FIX: Syntax error in Debian Apache configuration +FIX: The admin flag is mising. +FIX: The filter on thirdparty prices should be visible if there is at least one thirdparty price. +FIX: Thirdparty is missing on card +FIX: update2.php test res befre assign it +FIX: When delete actioncomm also delete actioncomm_resources +FIX: when editing time spent, date of line suggested was a rubbish value +FIX: When filter with empty status, by default get canceled status (-1) +FIX: When update a member login for a member linked to a user, the login of user was not sync (not updated). +FIX: Wizard for restore does not show import command + ***** ChangeLog for 3.8 compared to 3.7.* ***** For users: @@ -279,9 +352,11 @@ FIX send mail, copy sendto don't read the list of contact FIX Properly escape untrusted data to prevent HTML injection. FIX send mail, copy sendto don't read the list of contact -Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose -your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to -restore old path. +WARNING: + +Path to save photos of products was moved to match path of other attached files. If you had loose your photo +on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other) +to restore old path and get back working links without having to resubmit images. WARNING: @@ -454,11 +529,14 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection" Upgrading to any other version or database system is abolutely required BEFORE trying to make a Dolibarr upgrade. -WARNING: Following changes may create regression for some external modules, but was necessary to make +WARNING: + +Following changes may create regression for some external modules, but was necessary to make Dolibarr better: - Path to save photos of products was moved to match path of other attached files. If you had loose your photo - on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to restore old path. + on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other) + to restore old path and get back working links without having to resubmit images. - If you can't see trips and expenses records, check that you have the new permission "read all trips and expenses". - Deprecated module "oscommerce" were removed. @@ -473,6 +551,12 @@ Dolibarr better: warehouse module and your Point Of Sale module setup if you use one. - Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it. +***** ChangeLog for 3.6.5 compared to 3.6.4 ***** +- Fix: [ bug #1776 ] Undefined $deliverycompany variable in pdf_build_address +- Fix: [ bug #1794 ] Error when cloning Proposal gives error in a malformed page + +***** ChangeLog for 3.6.4 compared to 3.6.3 ***** +- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask ***** ChangeLog for 3.6.3 compared to 3.6.2 ***** - Fix: ref_ext was not saved when recording a customer order from web service diff --git a/README-FR.md b/README-FR.md index 3f1819f6370..53ae1be8e8d 100644 --- a/README-FR.md +++ b/README-FR.md @@ -77,50 +77,56 @@ Voir fichier ChangeLog. ## CE QUE DOLIBARR PEUT FAIRE -Modules principaux: +### Modules principaux (tous optionnels): + - Annuaires des prospects et/ou client et/ou fournisseurs - Gestion de catalogue de produits et services -- Gestion de stock +- Gestion des devis, propositions commerciales +- Gestion des commandes +- Gestion des factures clients/fournisseurs et paiements +- Gestion des virements bancaires SEPA - Gestion des comptes bancaires - Agenda partagé -- Gestion des commandes -- Gestion des devis, propositions commerciales -- Gestion des factures clients et fournisseurs +- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...) - Gestion de contrats de services -- Gestion des paiements -- Gestion des virements bancaires +- Gestion de stock - Gestion des expéditions - GED (Gestion Electronique de Documents) - EMailings de masse - Réalisation de sondages - Point de vente/Caisse enregistreuse +- … + +### Autres modules: -Autres modules: - Gestion de marque-pages - Gestion des promesses de dons - Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM) - Rapports - Imports/Exports des données - Connectivité LDAP -- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...) +- … + +### Divers: -Divers: - Application multi-utilisateurs avec différents niveaux de permissions par module. +- Peux être multi-société par ajout du module externe multi-société. +- Peux-être multi-devise par ajout du module externe multi-devise. - Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs). - Application simple à utiliser. - Plusieurs thèmes visuels. - Code simple et facilement personnalisable. - Requiert PHP et Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis). - Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP ou Postgresql. +- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) ## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE) Voici un liste de fonctionnalites pas encore gérées par Dolibarr: -- Pas de compta analytique double-partie (uniquement gestion de trésorerie). +- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie). - Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise). -- Dolibarr ne gère en standard qu'une société/institution/association mère (mono-société). Pour en gérer plusieurs (comme vos filiales), il faut, soit faire plusieurs installations de Dolibarr, soit installer le module MultiCompany qui permet de gérer n société/institutions/associations dans une seule instance par une isolation logique des données. - Dolibarr ne contient pas de module de Gestion de la paie. - Les tâches du module de gestion de projets n'ont pas de dépendance entre elle. - Dolibarr ne contient pas de Webmail. diff --git a/README.md b/README.md index 8359b66cbd9..576e3153ef9 100644 --- a/README.md +++ b/README.md @@ -69,39 +69,22 @@ See the [ChangeLog](ChangeLog) file. ## FEATURES -### General features -- Users and groups with finely grained rights -- Localization in most major languages -- Very user friendly and easy to use -- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) -- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite)) -- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. -- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture) -- Support for country specific features: - - Spanish Tax RE and ISPF - - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - - Canadian double taxes (federal/province) and other countries using cumulative VAT - - Tunisian tax stamp - - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) -- ... - -### Main modules +### Main modules (all optional) - Customers, Prospects and/or Suppliers directory - Products and/or Services catalog -- Bank accounts management -- Customer and Supplier Orders management - Commercial proposals management -- Contracts management -- Invoices management +- Customer and Supplier Orders management +- Invoices and payment management +- Standing orders management (European SEPA) +- Bank accounts management +- Shared calendar +- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...) - Projects management -- Events management -- Payments management -- Standing orders management +- Contracts management - Stock management - Shipping management - Interventions management -- PDF or ODT generation for invoice, proposals, orders... - Agenda with ical and vcal export for third party tools integration - Electronic Document Management (EDM) - Foundations members management @@ -127,6 +110,25 @@ See the [ChangeLog](ChangeLog) file. - Payment platforms integration (PayBox, PayPal) - … +### Other general features +- Multi-Users and groups with finely grained rights +- Localization in most major languages +- Can manage several companies by adding external module multi-company. +- Can manage several currencies by adding external module multi-currency. +- Very user friendly and easy to use +- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) +- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite)) +- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. +- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture) +- Support for country specific features: + - Spanish Tax RE and ISPF + - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) + - Canadian double taxes (federal/province) and other countries using cumulative VAT + - Tunisian tax stamp + - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) +- PDF or ODT generation for invoice, proposals, orders... +- … + ### Extending Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com). @@ -135,10 +137,7 @@ Dolibarr can be extended with a lot of other external modules from third party d These are features that Dolibarr does **not** yet fully support: -- Double-entry bookkeeping (only bank and treasury management) -- Multiple currencies -- Multiple companies - If you want to manage several companies or foundations, you must install the software several times (on same server or not) or use the MultiCompany addon module that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas) +- Double-entry bookkeeping yet (only bank and treasury management) - Tasks dependencies in projects - Payroll module - Webmail diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 813db9bb4b8..953e207d28d 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -8,7 +8,9 @@ This files describe steps made by Dolibarr packaging team to make a beta version of Dolibarr, step by step. - Check all files are commited. -- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +- Update version/info in ChangeLog. +To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z-w in htdocs/filefunc.inc.php - Commit all changes. @@ -28,7 +30,9 @@ This files describe steps made by Dolibarr packaging team to make a complete release of Dolibarr, step by step. - Check all files are commited. -- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +- Update version/info in ChangeLog. +To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z in htdocs/filefunc.inc.php - Commit all changes. diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 1903d6f4572..2d4aea97a5f 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -231,7 +231,7 @@ class Skeleton_Class extends CommonObject } if (!empty($sortfield)) { - $sql .= ' ORDER BY ' . $sortfield . ' ' . $sortorder; + $sql .= $this->db->order($sortfield,$sortorder); } if (!empty($limit)) { $sql .= ' ' . $this->db->plimit($limit + 1, $offset); diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index a56701dada2..d1c4ef409b4 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -76,7 +76,7 @@ if ($action == 'disable') { $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } else if ($action == 'enable') { if ($accounting->fetch($id)) { @@ -84,7 +84,7 @@ if ($action == 'disable') { } $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 925bf818137..99eb49949e7 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -125,7 +125,7 @@ else if ($action == 'delete') } if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 9bde2d23c14..c0a987ddf82 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -100,9 +100,9 @@ if ($action == 'update') { } if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 0e39776946a..45e69c991de 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -66,7 +66,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -84,12 +84,12 @@ else if ($action == 'add') if (empty($object->date_start) && empty($object->date_end)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $error++; } if (empty($object->label)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); $error++; } @@ -110,7 +110,7 @@ else if ($action == 'add') { $db->rollback(); - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='create'; } } @@ -147,7 +147,7 @@ else if ($action == 'update') } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index 61e86b7df19..7c38617d66c 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -76,14 +76,14 @@ if ($_POST["action"] == 'import') { $result = $accounting->create($user); if ($result > 0) { - setEventMessage($langs->trans("AccountingAccountAdd"), 'mesgs'); + setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs'); } else { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } $cpt ++; } } else { - setEventMessage($langs->trans('AccountPlanNotFoundCheckSetting'), 'errors'); + setEventMessages($langs->trans('AccountPlanNotFoundCheckSetting'), null, 'errors'); } } else { print '
' . $sql . '
| '.$langs->trans('Ref').' | '; - print ''; - print $form->showrefnav($object, 'id', $linkback); - print ' | '; - print '||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | ||
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | ||
| '.$langs->trans("Type").' | '.$adht->getNomUrl(1)." | ||
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; /*print ''; @@ -108,9 +109,6 @@ if ($object->id > 0) print ' | ';*/ print '|
| '.$langs->trans("Type").' | '.$adht->getNomUrl(1)." | ||
| '.$langs->trans("Company").' | '.$object->societe.' | ||
| '.$langs->trans("UserTitle").' | '.$object->getCivilityLabel().' | '; print '||
| '.$langs->trans("Lastname").' | '.$object->lastname.' | '; - print '||
| '.$langs->trans("Firstname").' | '.$object->firstname.' | ||
| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ||
| '.$langs->trans("Ref").' | '; - print ''; - print $form->showrefnav($object, 'rowid', $linkback); - print ' | '; - $showphoto.=$form->showphoto('memberphoto',$object); - $showphoto.=' | '; + + dol_banner_tab($object, 'rowid', $linkback); + + print '||
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | '; - // Photo - print $showphoto; $showphoto=''; - print '
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' |
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; - print $showphoto; $showphoto=''; - print '
| '.$langs->trans("Type").' | '.$adht->getNomUrl(1)." |
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; + print '
| '.$langs->trans("Company").' | '.$object->societe.' |
| '.$langs->trans("UserTitle").' | '.$object->getCivilityLabel().' | '; print '
| '.$langs->trans("Lastname").' | '.$object->lastname.' | '; - print '
| '.$langs->trans("Firstname").' | '.$object->firstname.' |
| '.$langs->trans("EMail").' | '.dol_print_email($object->email,0,$object->fk_soc,1).' |
| '.$langs->trans("Address").' | '; - dol_print_address($object->address,'gmap','member',$object->id); - print ' |
| '.$langs->trans("Zip").' / '.$langs->trans("Town").' | '.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.' |
| '.$langs->trans("Country").' | '; - $img=picto_from_langcode($object->country_code); - if ($img) print $img.' '; - print getCountry($object->country_code); - print ' |
| '.$langs->trans('State').' | '.$object->state.' | '; - - // Tel pro. - print '
| '.$langs->trans("PhonePro").' | '.dol_print_phone($object->phone,$object->country_code,0,$object->fk_soc,1).' |
| '.$langs->trans("PhonePerso").' | '.dol_print_phone($object->phone_perso,$object->country_code,0,$object->fk_soc,1).' |
| '.$langs->trans("PhoneMobile").' | '.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).' |
| '.$langs->trans("Skype").' | '.dol_print_skype($object->skype,0,$object->fk_soc,1).' |
| '.$langs->trans("Birthday").' | '.dol_print_date($object->birth,'day').' |
| '.$langs->trans("Public").' | '.yn($object->public).' |
| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' |
| '.$langs->trans("SubscriptionEndDate").' | '; + if ($object->datefin) + { + print dol_print_date($object->datefin,'day'); + if ($object->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + print ' |
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | |
| '.$langs->trans("Ref").' | '; - print ''; - print $form->showrefnav($object, 'rowid', $linkback); - print ' | |
| '.$langs->trans("Type").' | '.$adht->getNomUrl(1)." | '.$form->showphoto('memberphoto',$object).' | '; + // Morphy + print '
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; + print '|
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | '; - print $showphoto; $showphoto=''; - print '|
| '.$langs->trans("Company").' | '.$object->societe.' | |
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; - print $showphoto; $showphoto=''; - print '|
| '.$langs->trans("UserTitle").' | '.$object->getCivilityLabel().' | '; + print '|
| '.$langs->trans("Type").' | '.$adht->getNomUrl(1)." | |
| '.$langs->trans("Password").' | '.preg_replace('/./i','*',$object->pass); + if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id)) + { + $langs->load("errors"); + $htmltext=$langs->trans("WarningPasswordSetWithNoAccount"); + print ' '.$form->textwithpicto('', $htmltext,1,'warning'); + } + print ' | |
| '.$langs->trans("Company").' | '.$object->societe.' | |
| '.$langs->trans("Skype").' | '.dol_print_skype($object->skype,0,$object->fk_soc,1).' | |
| '.$langs->trans("UserTitle").' | '.$object->getCivilityLabel().' | '; - print '|
| '.$langs->trans("Birthday").' | '.dol_print_date($object->birth,'day').' | |||
| '.$langs->trans("Lastname").' | '.$object->lastname.' | '; - print '|||
| '.$langs->trans("Public").' | '.yn($object->public).' | |||
| '.$langs->trans("Firstname").' | '.$object->firstname.' | '; - print '|||
| ' . $langs->trans("Categories") . ' | '; + print ''; + print $form->showCategories($object->id, 'member', 1); + print ' | |||
| '.$langs->trans("EMail").' | '.dol_print_email($object->email,0,$object->fk_soc,1).' | |||
| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | |||
';
+ print '
| '; + if ($action == 'editthirdparty') + { + $htmlname='socid'; + print ''; + } + else + { + if ($object->fk_soc) + { + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + print $company->getNomUrl(1); + } + else + { + print $langs->trans("NoThirdPartyAssociatedToMember"); + } + } + print ' | |||
';
+ print '
| '; + if ($action == 'editlogin') + { + $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); + } + else + { + if ($object->user_id) + { + $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); + } + else print $langs->trans("NoDolibarrAccess"); + } + print ' | |||
| '.$langs->trans("SubscriptionEndDate").' | '; @@ -632,83 +733,16 @@ if ($rowid > 0) } print ' | |||
';
- print '
| '; - if ($action == 'editthirdparty') - { - $htmlname='socid'; - print ''; - } - else - { - if ($object->fk_soc) - { - $company=new Societe($db); - $result=$company->fetch($object->fk_soc); - print $company->getNomUrl(1); - } - else - { - print $langs->trans("NoThirdPartyAssociatedToMember"); - } - } - print ' | |||
';
- print '
| '; - if ($action == 'editlogin') - { - /*$include=array(); - if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only - { - $include=array($object->user_id,$user->id); - }*/ - $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); - } - else - { - if ($object->user_id) - { - $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); - } - else print $langs->trans("NoDolibarrAccess"); - } - print ' | |||
| '.$langs->trans("Ref").' | '; - print ''; - print $form->showrefnav($object, 'rowid', $linkback); - print ' | ||
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | ||
| '.$langs->trans("Login").' / '.$langs->trans("Id").' | '.$object->login.' | ||
| '.$langs->trans("Type").' | '.$membert->getNomUrl(1)." | ||
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; + print '||
| '.$langs->trans("Nature").' | '.$object->getmorphylib().' | '; /*print ''; print $form->showphoto('memberphoto',$object); print ' | ';*/ print '|
| '.$langs->trans("Type").' | '.$membert->getNomUrl(1)." | ||
| '.$langs->trans("Company").' | '.$object->societe.' | ||
| '.$langs->trans("UserTitle").' | '.$object->getCivilityLabel().' | '; print '||
| '.$langs->trans("Lastname").' | '.$object->lastname.' | '; - print '||
| '.$langs->trans("Firstname").' | '.$object->firstname.' | '; - print '||
| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ||
| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ||
| '.$langs->trans("Statistics").' | ||||||||||||||||||||||
';
diff --git a/htdocs/adherents/info.php b/htdocs/adherents/info.php
index 27f36e9a843..36ed504dd73 100644
--- a/htdocs/adherents/info.php
+++ b/htdocs/adherents/info.php
@@ -42,23 +42,34 @@ $result=restrictedArea($user,'adherent',$id);
* View
*/
+$form = new Form($db);
+
llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
-$adh = new Adherent($db);
-$adh->fetch($id);
-$adh->info($id);
+$object = new Adherent($db);
+$object->fetch($id);
+$object->info($id);
-$head = member_prepare_head($adh);
+$head = member_prepare_head($object);
dol_fiche_head($head, 'info', $langs->trans("Member"), 0, 'user');
-print '
';
+
+print '';
+
+print ' ';
+dol_fiche_end();
+
llxFooter();
$db->close();
diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php
index 89572525c32..a2848b655b3 100644
--- a/htdocs/adherents/ldap.php
+++ b/htdocs/adherents/ldap.php
@@ -44,12 +44,11 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
-$adh = new Adherent($db);
-$adh->id = $rowid;
-$result=$adh->fetch($rowid);
+$object = new Adherent($db);
+$result=$object->fetch($rowid);
if (! $result)
{
- dol_print_error($db,"Failed to get adherent: ".$adh->error);
+ dol_print_error($db,"Failed to get adherent: ".$object->error);
exit;
}
@@ -65,8 +64,8 @@ if ($action == 'dolibarr2ldap')
$ldap=new Ldap();
$result=$ldap->connect_bind();
- $info=$adh->_load_ldap_info();
- $dn=$adh->_load_ldap_dn($info);
+ $info=$object->_load_ldap_info();
+ $dn=$object->_load_ldap_dn($info);
$olddn=$dn; // We can say that old dn = dn as we force synchro
$result=$ldap->update($dn,$info,$user,$olddn);
@@ -93,35 +92,27 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé
$form = new Form($db);
-$head = member_prepare_head($adh);
+$head = member_prepare_head($object);
dol_fiche_head($head, 'ldap', $langs->trans("Member"), 0, 'user');
+$linkback = ''.$langs->trans("BackToList").'';
-print ''; +dol_print_object_info($object); print '
';
if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr')
{
- print '';
+ print '';
}
print " \n";
@@ -187,9 +180,9 @@ $ldap=new Ldap();
$result=$ldap->connect_bind();
if ($result > 0)
{
- $info=$adh->_load_ldap_info();
- $dn=$adh->_load_ldap_dn($info,1);
- $search = "(".$adh->_load_ldap_dn($info,2).")";
+ $info=$object->_load_ldap_info();
+ $dn=$object->_load_ldap_dn($info,1);
+ $search = "(".$object->_load_ldap_dn($info,2).")";
if (empty($dn))
{
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index d89360631db..7d86c04869c 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -78,6 +78,21 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$hookmanager->initHooks(array('memberlist'));
$extrafields = new ExtraFields($db);
+// List of fields to search into when doing a "search in all"
+$fieldstosearchall = array(
+ 'd.rowid'=>'Ref',
+ //'d.ref'=>'Ref',
+ 'd.lastname'=>'Lastname',
+ 'd.firstname'=>'Firstname',
+ 'd.societe'=>"Company",
+ 'd.email'=>'EMail',
+ 'd.address'=>'Address',
+ 'd.zip'=>'Zip',
+ 'd.town'=>'Town',
+ 'd.note_public'=>'NotePublic',
+ 'd.note_private'=>'NotePrivate',
+);
+
/*
* View
@@ -111,7 +126,7 @@ if ($catid == -2) $sql.= " AND cm.fk_categorie IS NULL";
if ($search_categ > 0) $sql.= " AND cm.fk_categorie = ".$db->escape($search_categ);
if ($search_categ == -2) $sql.= " AND cm.fk_categorie IS NULL";
$sql.= " AND d.entity IN (".getEntity('adherent', 1).")";
-if ($sall) $sql.=natural_search(array("d.rowid", "d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
+if ($sall) $sql.=natural_search(array_keys($fieldstosearchall), $sall);
if ($type > 0) $sql.=" AND t.rowid=".$db->escape($type);
if (isset($_GET["statut"]) || isset($_POST["statut"])) $sql.=" AND d.statut in (".$db->escape($statut).")"; // Peut valoir un nombre ou liste de nombre separes par virgules
if ($search_ref)
@@ -180,16 +195,16 @@ if ($resql)
if ($optioncss != '') $param.='&optioncss='.$optioncss;
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
- if ($sall)
- {
- print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ";
- print ''.$sall.'';
- }
-
print ' | ||||||||||||||||||||||