diff --git a/ChangeLog b/ChangeLog index 4119f205369..444285bdfea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,7 +26,6 @@ NEW: Add a tab "document" in donation card NEW: Add cancel button on thirdparty create page NEW: Add chart of product statistics NEW: Add color on categories -NEW: Add css class and ids on column of detail lines to allow module to easily manipulate fields. NEW: Add date value filter on account records list NEW: Add __PROJECT_NAME__ tag for customer invoice emails NEW: Add option PDF_ALLOW_HTML_FOR_FREE_TEXT to be able to enter pdf footer text with wysiwyg editor. @@ -36,99 +35,88 @@ NEW: Add filter on status on shipments NEW: Add gender property managed on user card FIX: Better error messages when uploading photo of user when permission to write are not granted NEW: Add help tooltips on fields of dictionary edit pages. NEW: Add hidden option MAIN_MAILFORM_DISABLE_ENTERKEY to disable the key enter into the form to send email. -NEW: Add hook in send mail -NEW: Add hooks on list of members to allow an external module to add more fields into list view. -NEW: Add hooks to allow an external module to complete list of events into calendar views. NEW: Add $ID$ into extrafields management to allow use of current object id on filter for select list from table and checkbox list from table NEW: Add info page on product card NEW: Add into about page, a sample text to use to promote new version release (visible only if version is last stable) NEW: Add none/all selection into list of files for FTP browser module NEW: Add opportunity amount on project card. -NEW: Add parameter to add a link to use "date of invoice" in one click when fille a payment card. +NEW: Add link "date of invoice" to select date of invoice when creating a payment in one click. NEW: Add planned workload and declared progress on project summary list on project home page (data aggregated from tasks of project) -NEW: Add "productpricecard" hook and uniformize code NEW: Add ref and label of project into export NEW: Add status into filters of graph NEW: Add tab document on salaries payment -NEW: Add thumb of users into thumbs stats on home page -NEW: A link to the bugtracker can be enabled in the GUI +NEW: Add thumb of users into stats box on home page +NEW: A link to the bugtracker report tool can be enabled in the GUI NEW: Better look for POS. More responsive design. NEW: Can add project search on left menu search area -NEW: Can assign a task to yourself to have it appear on timesheet -NEW: Can choose fields to show on project list +NEW: Can assign a task to yourself to have it appear on timesheet. NEW: Can close a project that has draft status with no need to switch it to validate status before. NEW: Can edit Background color for Top menu and Background color for table title line. -NEW: Can edit email template using WYSIWYG editor -NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status. Removed deprecated files. +NEW: Can edit email templates using WYSIWYG editor. +NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status. NEW: Can filter on contact status in prospect list. Removed deprecated menu entry. -NEW: Can filter proposal on a tag of a product Enhance also the prototype test_arrays to include select form before table. +NEW: Can filter proposal on a tag of a product. NEW: Can filter proposal, orders or invoices with criteria "contain at least one product with following tag" -NEW: Can select fields to show in product list. Extrafields are also supported. -NEW: Can select fields to show into the contact list. Extrafields are also supported. -NEW: Can select which field to show into list of users. Extrafields are also supported. -NEW: Can set default value of event type when creating an event (if type of event option is used). +NEW: Can choose fields to show on project list. +NEW: Can choose fields to show in product list. Extrafields are also supported. +NEW: Can choose fields to show into the contact list. Extrafields are also supported. +NEW: Can choose fields to show into list of users. Extrafields are also supported. +NEW: Can set default value of event type when creating an event (if option "manage type of event" is used). NEW: Can upload files on leave requests. Use more standard permissions. -NEW: Can use a "|" to make a OR search on several different criterias into text filters of tables. -NEW: Can use the * as a joker characters into search boxes of lists -NEW: Clean code into salary module, debug and add indexes NEW: Can filter on user list and salary payments on user with naural search. -NEW: clone action on agenda events +NEW: Can use a "|" to make a OR search on several different criterias into search text filters of tables. +NEW: Can use the * as a joker characters into search boxes of lists. +NEW: Clean code into salary module, debug and add indexes +NEW: Can filter on user list and salary payments on user with naural search. +NEW: Can clone agenda events. NEW: Color category is visible onto the thumb of tags on thirdparty, or products cards. -NEW: conf to use next product/service ref when we clone a product/service +NEW: Conf to use next product/service ref when we clone a product/service NEW: Contract module can be used to follow both sold and bought contracts/recurring subscriptions. -NEW: Enhance prototype, project list and proposal list with new hooks to have an external module able to add more fields. -NEW: Enhance style engine. Add option to set color of links. -NEW: Enter amount for withdraws requests +NEW: Can change amount when creating withdraws requests. NEW: FEATURE PROPOSAL: on proposal, order or invoice creation from scratch, reload page after customer selection so its informations can be loaded NEW: Filter "active" by default on user list. Fix label of permission of project module. -NEW: Forms are using the tab look, even in creation mode. +NEW: Forms are using the "tab look", even in creation mode. NEW: Free text for cheque deposit receipt can be HTML content. NEW: Hidden option THEME_ELDY_USE_HOVER is stable enough to become officialy visible into setup. -NEW: If module salaries is on, you can set a hourly value for time consumed by users. Each time a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Transversal view" of project. -NEW: Import Sales representatives of third parties +NEW: If module salaries is on, you can set a hourly value for time consumed by users. When a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Overview" of project. +NEW: Add import profile to import sales representatives of third parties. NEW: Increase length of bank code to 128 char #3704 -NEW: info function for product card NEW: Into the overview of projects, the name of thirdparty appears into combo lists of elements to link to project. -NEW: Introduce a "code" into fiels to describe vat. This will allow to suggest different vat lines with same value with ability to differentiate them. -NEW: Introduce cost price on product. +NEW: Introduce a "code" into table of vats to describe VAT. This will allow to suggest different vat lines with same value with ability to differentiate them. +NEW: Introduce cost price on products. NEW: Introduce hidden option MAIN_LANDING_PAGE to decide the home page visible just after login. -NEW: Introduce hidden option MAIN_REPLACE_TRANS_xx_XX to allow simple replacement of translated string on the fly. +NEW: Introduce hidden option MAIN_REPLACE_TRANS_xx_XX to allow simple replacement of translated string on the fly. Prefer to use next method. NEW: Introduce table llx_overwrite_trans to be able to overwrite translations by simple database edition. -NEW: Introduce use of cache for thumbs images of users -NEW: Experimental level multiprice generator based on per cent variations over base price -NEW: List of projects of a thirdparty are visible on a project tab +NEW: Introduce use of cache for thumbs images of users to save bandwith. +NEW: Experimental level multiprice generator based on per cent variations over base price. +NEW: List of projects of a thirdparty are visible on a project tab for the thirdparty. NEW: Merge all left menu search boxes into one. -NEW: Merge all search fields of an area page into one search box -NEW: next ref on clone doesn't need conf, it's used if mask exists -NEW: ODT generators can set meta properties of ODT file -NEW: On list of thirdparties, user can select fields to show. Make phpunit test working again localy. Add missing columns into llx_expedition. -NEW: Only arrow of current sorted field is visible into table views. This save a lot of spaces. You can click on the column title to sort. This make clickable area larger and click to sort is easier. +NEW: Merge all search fields of an area page into one search box. +NEW: Next ref on clone doesn't need conf, it's used if mask exists. +NEW: Only arrow of current sorted field is visible into table views. This save a lot of space. You can click on the column title to sort. This make clickable area larger and click to sort is easier. NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users). -NEW: Option encrypt password into databae is set to on by default on first install. -NEW: print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1) +NEW: Option "encrypt password" into database is set to on by default on first install. +NEW: Print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1) NEW: Provide an easier way to understand if an order can be shipped. -NEW: Quick searh filter works on invoice, proposal, order, intervention, contract -NEW: Rename install "etape" into english "step" +NEW: Quick search filter works also on invoice, proposal, order, intervention, contract and expense reports. NEW: Replace category edition page on members with new select2 component. -NEW: Show photo of logged user into login top right block. NEW: If no photo is available for user, we show a generic photo depending on gender -NEW: Show photo of user into user list. A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith. -NEW: Show which fields are used for search when doing a generic search from the quick search form. +NEW: Show photo of logged user into login top right block. +NEW: If no photo is available for user, we show a generic photo depending on gender. +NEW: Show photo of user into user list. +NEW: Show which fields were used for search when doing a "generic search" from the "quick search" form on left menu. NEW: Statistic graphs on products offer a filter on product type (product / service or both) -NEW: Support logging to a Sentry server NEW: Syslog displays configuration errors NEW: The clicktodial module is now able to provide link "tel:" on phone numbers. So it is also possible to use clicktodial with a client solution like the "xivo" local client. NEW: The conditional IF into ODT templates works also on not defined var so we can show data only if defined. Close #3819 -NEW: The free text in PDF footer can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup. -NEW: The quick search box on left menu can also search into expense reports. -NEW: The search box and the bookmarks are now rendered by the menu manager. -NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new top banner, saving space and using a same way to show address, status and navigation arrows. +NEW: The free text in PDF footers can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup. +NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new "top banner", saving space and using a same way to show address, status and navigation arrows. NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb) -NEW: Translate extrafield's labels -NEW: Uniformize way of working for search filters. One filter per object. -NEW: Used matching icons for Material Design theme +NEW: Translate extrafield's labels. NEW: Use new select2 component for juridical status, country and state selection. -NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. NEW: Uniformize form creation of proposal to add public and private notes during creation like done for order and invoice. +NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. +NEW: Uniformize form creation of proposal to add public and private notes during creation like for order and invoice. For developers: +NEW: The search box and the bookmarks are now rendered by the menu manager. NEW: Add a new widget $form->selectArrayAjax() to use combo list with content coming from an Ajax URL. NEW: Add doActions hook method call in contract card NEW: Added doActions hooks to user cards @@ -144,11 +132,22 @@ NEW: A module can add its entries into cron module. NEW: Framework feature. To have a page being loaded at same scrollbar level after a click on a href link, just add the class "reposition" on this link. NEW: Add exemple of setup for multitail to render dolibarr log files NEW: Add restler framework. First step to build REST API into Dolibarr. - +NEW: Add css class and ids on column of detail lines to allow module to easily manipulate fields. +NEW: Add hook in send mail +NEW: Add hooks on list of members to allow an external module to add more fields into list view. +NEW: Add hooks to allow an external module to complete list of events into calendar views. +NEW: Add "productpricecard" hook and uniformize code +NEW: Enhance also the prototype test_arrays to include select form before table. +NEW: Enhance prototype, project list and proposal list with new hooks to have an external module able to add more fields. +NEW: Enhance style engine. Add option to set color of links. +NEW: ODT generators can now also set meta properties of ODT file. +NEW: Add missing columns into llx_expedition to match other tables. +NEW: A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith. +NEW: Support logging to a Sentry server WARNING: -Dolibarr 3.9 is not yet fully compatible with PHP 7. +Dolibarr 3.9 is not yet fully compatible with PHP 7 even if most features seems to work. Mysql minimum version is now 5.0.3 @@ -169,6 +168,84 @@ This is list of hooks modified: +***** ChangeLog for 3.8.3 compared to 3.8.2 ***** +FIX: #3805 +FIX: #3231 [Members] Public subscription page displays GeoIP error +FIX: #3240 +FIX: #3293 Login page form icons not shown +FIX: #3508 Useless tooltip in 3.8 boxes +FIX: #3661 Margin is not selected correctly when adding a product +FIX: #3679 Error when deleting a Localtax2 special payment +FIX: #3707 Thirdparty bank account page table has a glitch +FIX: #3726 When upload file, don't test if PRODUCT_USE_OLD_PATH_FOR_PHOTO variable is empty or not +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #3836 Unable to upload a document to an invoice under some circunstances +FIX: #3878 Storing and deleting files on emailing was done at wrong place +FIX: #3880 +FIX: #3882 +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3912 +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: #3953 Don't round supplier price +FIX: #3953 rounding of buying price +FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7 +FIX: #3987 Undefined variable $newref in CommandeFournisseur::approve +FIX: #3988 Undefined variable $conf and $error in CommandeFournisseur::addline +FIX: #3989 Undefined variable $conf in CommandeFournisseur::getNomUrl +FIX: #3990 +FIX: #3992 CommandeFournisseur::ref is marked as deprecated and it shouldn't be +FIX: #3996 Dictionnary hooks are not working in 3.8 +FIX: #3997 Wrong permission key used for Margins > Read all +FIX: #4016 User link is not correctly formed in emailing receivers +FIX: #4018 SQL error if trying to access the mailing/card.php page without an ID defined +FIX: #4036 Direct printing module without any driver configured, shows an unformatted error message +FIX: #4043 Incorrect translation in error mesage in menu creation admin page +FIX: #4049 PHP warning when trying to access a non-existing product/service +FIX: #4055 SQL error when trying to access a non-existing expedition +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4182 SQL error when deleting an unexisting bank entry +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: #4281 +FIX: #4282 Defined shipping time were not shown in Customer order's PDF documents +FIX: #4285 SQL query shown when accessing an unexisting invoice +FIX: #4287 SQL error when accessing an unexisting proposal +FIX: #4302 Undefined variable $conf in Commande::LibStatut +FIX: Allow to search on alias name into select +FIX: Add a protection to not make release if ChangeLog was not generated. +FIX: autofocus on input search product +FIX: bad calculation for stock value +FIX: Better compatibility for users that used the not supported option MAIN_USE_JQUERY_MULTISELECT set to 1. +FIX: Bug: $this is not accessible in static context in Mailing::libStatutDest #4050 +FIX: can not have access to the new ids or propal lines on PROPAL_CLONE +FIX: Can't update line's duration +FIX: Can use formated float number on old expense report module. +FIX: change object statut on close shipping and remove erratic db commit +FIX: change order date on clone (as everywhere else) +FIX: event's data lost on user assign update +FIX: export propal and order with extrafields +FIX: export with category contact extrafields +FIX: jquery select of project generate js error on change event +FIX: label of line is set in description field if empty +FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch +FIX: mail isn't display in title on event in mode view +FIX: Missing to set context into workflow actions, so triggers can't know we are creating an invoice from order or an order from a proposal. +FIX: NB task and percent progress in box project +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table +FIX: Not use localtaxes when invoice some orders +FIX: only active customer should be available into select list thirdparty on invoice creation +FIX: only active customer should be return into new invoice creation select list +FIX: AWP calculation +FIX: product link in project box +FIX: Remove column creation for table llx_product_fournisseur_price, the column use un calss is fk_supplier_price_expression, and fk_price_expression does not exist into lx_product_fournisseur_price sql file declaration +FIX: Show category selector if we have permission to view products or services +FIX: showrefnav htmlspecialchar instead of < > +FIX: The label hidden was not supported when using jmobile +FIX: Too many information were hidden. A lot of users still need bank account on PDF. +FIX: Use "WHERE true" instead of "WHERE 1" #4132 + ***** ChangeLog for 3.8.2 compared to 3.8.1 ***** FIX: Add a protection to not make release if ChangeLog was not generated. FIX: 1/ update_extra() function must not be in "if(!empty(MAIN_DISABLE_CONTACTS_TAB)" test. 2/ Reindented code @@ -513,6 +590,25 @@ Dolibarr better: - Function get_exdir require now 6 parameters. This is to prepare a future feature. +***** ChangeLog for 3.7.3 compared to 3.7.2 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7 +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Can use formated float number on old expense report module. +FIX: Change object statut when closing shipment and remove erratic db commit +FIX: Export with category contact extrafields +FIX: NB task and percent progress in box project +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table +FIX: Not use localtaxes when invoice some orders +FIX: Product link in project box +FIX: Use "WHERE true" instead of "WHERE 1" #4132 + ***** ChangeLog for 3.7.2 compared to 3.7.1 ***** FIX: #2957 : missing $langs object for trigger FIX: #2983 Load gravatar avatar images securely over HTTPS @@ -826,6 +922,17 @@ Dolibarr better: - Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it. +***** ChangeLog for 3.6.6 compared to 3.6.5 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5 +FIX: export with category contact extrafields +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table + ***** ChangeLog for 3.6.5 compared to 3.6.4 ***** FIX: #2957 : missing $langs object for trigger FIX: #2983 Load gravatar avatar images securely over HTTPS diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 8fc8e49aaf8..9a6a9175ca7 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -495,6 +495,8 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`; @@ -506,6 +508,7 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index f6bdb81345c..0ef1f4bd62b 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -140,7 +140,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 0b6e65f7d1f..51d0a6174c8 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -48,13 +48,15 @@ if (! defined("MAIN_MOTD")) define("MAIN_MOTD",""); // List of supported permanent search area $searchform=array(); +/* deprecated if (empty($conf->use_javascript_ajax)) { - $searchform=array("MAIN_SEARCHFORM_SOCIETE", "MAIN_SEARCHFORM_CONTACT", "MAIN_SEARCHFORM_PRODUITSERVICE", "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER", "MAIN_SEARCHFORM_ADHERENT", "MAIN_SEARCHFORM_PROJECT", "MAIN_SEARCHFORM_EMPLOYEE"); - $searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER,$conf->global->MAIN_SEARCHFORM_ADHERENT,$conf->global->MAIN_SEARCHFORM_PROJECT,$conf->global->MAIN_SEARCHFORM_EMPLOYEE); - $searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices"), $langs->trans("ProductsAndServices").' ('.$langs->trans("SupplierRef").')', $langs->trans("Members"), $langs->trans("Projects"), $langs->trans("Users")); - $searchformmodule=array('Module1Name','Module1Name','Module50Name','Module50Name','Module310Name','Module400Name'); + $searchform=array("MAIN_SEARCHFORM_SOCIETE", "MAIN_SEARCHFORM_CONTACT", "MAIN_SEARCHFORM_PRODUITSERVICE", "MAIN_SEARCHFORM_ADHERENT", "MAIN_SEARCHFORM_PROJECT", "MAIN_SEARCHFORM_EMPLOYEE"); + $searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_ADHERENT,$conf->global->MAIN_SEARCHFORM_PROJECT,$conf->global->MAIN_SEARCHFORM_EMPLOYEE); + $searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices"), $langs->trans("Members"), $langs->trans("Projects"), $langs->trans("Users")); + $searchformmodule=array('Module1Name','Module1Name','Module50Name','Module310Name','Module400Name'); } +*/ /* @@ -96,16 +98,6 @@ if ($action == 'update') if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', join(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array())),'chaine',0,'',$conf->entity); - /* - dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE", $_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT", $_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_PROJECT", $_POST["MAIN_SEARCHFORM_PROJECT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_EMPLOYEE", $_POST["MAIN_SEARCHFORM_EMPLOYEE"],'chaine',0,'',$conf->entity); - */ - dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index b993b1ea276..3e6a9df4a25 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -297,7 +297,7 @@ jQuery(document).ready(function() { var compjsstring; getjsurl = $.ajax({ type: "GET", - url: \''.DOL_URL_ROOT.'/core/js/lib_head.js\', + url: \''.DOL_URL_ROOT.'/core/js/lib_rare.js\', cache: false, /* async: false, */ /* crossDomain: true,*/ diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 18ae5e764e3..a35fc566ea1 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1305,7 +1305,7 @@ class Categorie extends CommonObject if (is_numeric( $type )) { // We want to reverse lookup $map_type = array_flip( $this->MAP_ID ); - $type = $map_type; + $type = $map_type[$type]; dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING ); } diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index d55c05102d5..00bba632d1c 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -114,7 +114,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; diff --git a/htdocs/compta/hrm.php b/htdocs/compta/hrm.php index d4639947529..2f176bc0c32 100644 --- a/htdocs/compta/hrm.php +++ b/htdocs/compta/hrm.php @@ -96,7 +96,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 099a3063127..70e2564829e 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -115,7 +115,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 5e20815469c..ceeef191aee 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -73,7 +73,7 @@ if ($resql) */ print '
'; -print load_fiche_titre($langs->trans("WithdrawStatistics")); +print load_fiche_titre($langs->trans("WithdrawStatistics"), '', ''); $ligne=new LignePrelevement($db,$user); @@ -138,12 +138,11 @@ else /* - * - * Stats sur les rejets - * + * Stats on errors */ + print '
'; -print load_fiche_titre($langs->trans("WithdrawRejectStatistics")); +print load_fiche_titre($langs->trans("WithdrawRejectStatistics"), '', ''); // Define total and nbtotal diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 920419a8769..3f952ef15c6 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * * 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 @@ -19,7 +19,7 @@ /** * \file htdocs/compta/recap-compta.php * \ingroup compta - * \brief Page de fiche recap compta + * \brief Page de fiche recap customer */ require '../main.inc.php'; @@ -61,10 +61,11 @@ if ($socid > 0) dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company'); dol_banner_tab($societe, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); - + dol_fiche_end(); + if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - // Factures + // Invoice list print load_fiche_titre($langs->trans("CustomerPreview")); print ''; @@ -226,10 +227,7 @@ if ($socid > 0) } print "
"; - print "
"; } - - print ''; } else { diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 0e8e69b8353..cc66d7c7978 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -36,6 +36,7 @@ $langs->load("banks"); $langs->load("bills"); $langs->load("users"); $langs->load("salaries"); +$langs->load('hrm'); $id=GETPOST("id",'int'); $action=GETPOST('action'); diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index c1a374ceec2..3d6db94d801 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -323,4 +323,4 @@ $dolibarr_main_db_prefix=''; // Examples: // $multicompany_transverse_mode='1'; -?> + diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index fdd69a26a5b..1f5e8493d7b 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -173,7 +173,8 @@ class box_actions extends ModeleBoxes { global $langs, $conf; parent::showBox($this->info_box_head, $this->info_box_contents); - if ($conf->global->SHOW_DIALOG_HOMEPAGE) { + if (! empty($conf->global->SHOW_DIALOG_HOMEPAGE)) + { $actioncejour=false; $contents=$this->info_box_contents; $nblines=count($contents); @@ -182,7 +183,7 @@ class box_actions extends ModeleBoxes $bcx[1] = 'class="box_impair"'; if ($contents[0][0]['text'] != $langs->trans("NoActionsToDo")) { - print '
trans("ActionsToDo").'">'; + print '
trans("ActionsToDo").'">'; print ''; for ($line=0, $n=$nblines; $line < $n; $line++) { @@ -219,11 +220,11 @@ class box_actions extends ModeleBoxes if ($actioncejour) { print ''; @@ -231,7 +232,7 @@ class box_actions extends ModeleBoxes else { print ''; } } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index c2634cbaaed..5804ab4cf9f 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Marcos García + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Marcos García + * Copyright (C) 2016 Charlie Benke * * 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 @@ -560,7 +561,7 @@ abstract class CommonDocGenerator * @param Object $object Object with extrafields (must have $object->array_options filled) * @param array $array_to_fill Substitution array * @param Extrafields $extrafields Extrafields object - * @param string $array_key Name of the key for return array + * @param string $array_key Prefix for name of the keys into returned array * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ @@ -581,12 +582,25 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } else if($extrafields->attribute_type[$key] == 'date') - { - $object->array_options['options_'.$key] = (strlen($object->array_options['options_'.$key])>0?dol_print_date($object->array_options['options_'.$key],'day'):''); + { + if (strlen($object->array_options['options_'.$key])>0) + { + $object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); // using company output language + $object->array_options['options_'.$key.'_locale'] = dol_print_date($object->array_options['options_'.$key],'day','tzserver',$outputlangs); // using output language format + $object->array_options['options_'.$key.'_rfc'] = dol_print_date($object->array_options['options_'.$key],'dayrfc'); // international format + } + else + { + $object->array_options['options_'.$key] = ''; + $object->array_options['options_'.$key.'_locale'] = ''; + $object->array_options['options_'.$key.'_rfc'] = ''; + } } else if($extrafields->attribute_type[$key] == 'datetime') { - $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); + $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); // using company output language + $object->array_options['options_'.$key.'_locale'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour','tzserver',$outputlangs):''); // using output language format + $object->array_options['options_'.$key.'_rfc'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhourrfc'):''); // international format } $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key => $object->array_options['options_'.$key])); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 659ff4d3c5a..2929b66e80c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2054,7 +2054,7 @@ abstract class CommonObject $forcedroundingmode=$roundingadjust; if ($forcedroundingmode == 'auto' && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)) $forcedroundingmode=$conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND; - if ($forcedroundingmode == 'auto') $forcedroundingmode='0'; + elseif ($forcedroundingmode == 'auto') $forcedroundingmode='0'; $error=0; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 60d24558d86..35c3b3909ef 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -60,7 +60,7 @@ class DolEditor * @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content. * @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor) * @param int $rows Size of rows for textarea tool - * @param int $cols Size of cols for textarea tool (textarea number of cols or %) + * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') * @param int $readonly 0=Read/Edit, 1=Read only */ function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 05c190e3bfc..efc994a0446 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4248,6 +4248,7 @@ class Form // Show date with combo selects else { + //$retstring.='
'; // Day $retstring.=''; @@ -4293,6 +4294,7 @@ class Form } $retstring.="\n"; } + //$retstring.='
'; } } @@ -4848,7 +4850,7 @@ class Form
-
    +
      '.$lis.'
diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index aad079d2b0e..234a2348590 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -940,10 +940,11 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, function copyToClipboard(text,text2) { text = text.replace(/
/g,"\n"); - var newElem = '

'+text2; - $("#dialog").html(newElem); - $("#dialog").dialog(); - $("#coords").select(); + var newElem = '

'+text2; + /* alert(newElem); */ + $("#dialogforpopup").html(newElem); + $("#dialogforpopup").dialog(); + $("#coordsforpopup").select(); return false; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index c7b370b287f..fc544a51d93 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -767,9 +767,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') print ''."\n"; - // A div for the address popup - print ''; - return $i; } diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 7ec92e17fa6..ea611fe947a 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -76,13 +76,6 @@ class modAdherent extends DolibarrModules $this->const = array(); $r=0; - $this->const[$r][0] = "MAIN_SEARCHFORM_ADHERENT"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Show form for quick member search"; - $this->const[$r][4] = 0; - $r++; - $this->const[$r][0] = "ADHERENT_MAIL_RESIL"; $this->const[$r][1] = "texte"; $this->const[$r][2] = "Votre adhésion vient d'être résiliée.\r\nNous espérons vous revoir très bientôt"; diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index e0f1c2af8fe..295e348dc98 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -84,13 +84,6 @@ class modProduct extends DolibarrModules $this->const[$r][4] = 0; $r++; - $this->const[$r][0] = "MAIN_SEARCHFORM_PRODUITSERVICE"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Show form for quick product search"; - $this->const[$r][4] = 0; - $r++; - // Boxes $this->boxes = array( 0=>array('file'=>'box_produits.php','enabledbydefaulton'=>'Home'), diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index dd2aa0a6711..41fd00e5463 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -96,20 +96,6 @@ class modSociete extends DolibarrModules $this->const[$r][4] = 0; $r++; - $this->const[$r][0] = "MAIN_SEARCHFORM_SOCIETE"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Show form for quick company search"; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "MAIN_SEARCHFORM_CONTACT"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Show form for quick contact search"; - $this->const[$r][4] = 0; - $r++; - $this->const[$r][0] = "COMPANY_ADDON_PDF_ODT_PATH"; $this->const[$r][1] = "chaine"; $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/thirdparties"; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index fa63a9e9c06..8bb7e654b2f 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -66,48 +66,62 @@ $hookmanager->initHooks(array('searchform')); // Define $searchform $searchform = ''; + // TODO Mutualize code here with function left_menu into main.inc.php page -if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) +if ($conf->use_javascript_ajax && 1 == 2) { - $langs->load("companies"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'sall', '', 'company'); - $nbofsearch++; + if (! is_object($form)) $form=new Form($db); + $selected=-1; + $searchform.=$form->selectArrayAjax('searchselectcombo', DOL_URL_ROOT.'/core/ajax/selectsearchbox.php', $selected, 'data-role="none"', '', 0, 1, 'vmenusearchselectcombo', 1, $langs->trans("Search"), 0); } - -if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire) +else { - $langs->load("companies"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'sall', '', 'contact'); - $nbofsearch++; -} + // Define $searchform + if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && $user->rights->societe->lire) + { + $langs->load("companies"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_object('','company')); + } -if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) - && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) -{ - $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', '', 'product'); - $nbofsearch++; -} + if (! empty($conf->societe->enabled) && $user->rights->societe->lire) + { + $langs->load("companies"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_object('','contact')); + } -if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) - && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) -{ - $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier'); - $nbofsearch++; -} + if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) + ) + { + $langs->load("products"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_object('','product')); + } -if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) -{ - $langs->load("members"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall', '', 'member'); - $nbofsearch++; + if (! empty($conf->projet->enabled) && $user->rights->projet->lire) + { + $langs->load("projects"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_object('','projectpub')); + } + + if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire) + { + $langs->load("members"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_object('','user')); + } + + if (! empty($conf->user->enabled) && $user->rights->user->user->lire) + { + $langs->load("users"); + $searchform.=printSearchForm(DOL_URL_ROOT.'/user/list.php', DOL_URL_ROOT.'/user/list.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user')); + } } // Execute hook printSearchForm -$parameters=array(); -$reshook=$hookmanager->executeHooks('printSearchForm',$parameters); -if (empty($reshook)) $searchform.=$hookmanager->resPrint; +$parameters=array('searchform'=>$searchform); +$reshook=$hookmanager->executeHooks('printSearchForm',$parameters); // Note that $action and $object may have been modified by some hooks +if (empty($reshook)) +{ + $searchform.=$hookmanager->resPrint; +} else $searchform=$hookmanager->resPrint; @@ -121,7 +135,7 @@ print $searchform; print ''."\n"; //print ''; print ''; -print "\n"; +print "\n\n"; print ''; print ''."\n"; diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 405571ef98e..638d54a62ef 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -50,7 +50,7 @@ $userstatic=new User($db);
trans("Source"); ?>
-
trans("Company"); ?>
+
trans("ThirdParty"); ?>
trans("Contacts"); ?>
trans("ContactType"); ?>
 
@@ -102,10 +102,10 @@ $userstatic=new User($db); socid; ?> dol_use_jmobile)) { $companystatic->fetch($selectedCompany); - echo $companystatic->getNomUrl(2); + echo $companystatic->getNomUrl(2, '', 0, 1); } ?> selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', '', 0); ?> @@ -130,7 +130,7 @@ $userstatic=new User($db);
trans("Source"); ?>
-
trans("Company"); ?>
+
trans("ThirdParty"); ?>
trans("Contacts"); ?>
trans("ContactType"); ?>
trans("Status"); ?>
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 30642ad09c5..a14e006fd7c 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1153,7 +1153,7 @@ if ($action == 'create') print '
'; print ''; @@ -1163,7 +1163,7 @@ if ($action == 'create') print ''; print ''; } @@ -1303,7 +1303,7 @@ else print ''; print ''; @@ -1313,7 +1313,7 @@ else print ''; print ''; } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 424f9ad65d4..4865eac6951 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -122,7 +122,9 @@ class ProductFournisseur extends Product function remove_product_fournisseur_price($rowid) { global $conf, $user; - + + $error=0; + $this->db->begin(); // Call trigger @@ -289,7 +291,7 @@ class ProductFournisseur extends Product $error++; } - if (! $error && !empty($cong->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) + if (! $error && !empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) { // Add record into log table $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price_log("; @@ -353,7 +355,7 @@ class ProductFournisseur extends Product function fetch_product_fournisseur_price($rowid, $ignore_expression = 0) { $sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability,"; - $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.cost_price, pfp.unitcharges, pfp.fk_supplier_price_expression, pfp.delivery_time_days"; // , pfp.recuperableonly as fourn_tva_npr"; FIXME this field not exist in llx_product_fournisseur_price + $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.fk_product, pfp.charges, pfp.unitcharges, pfp.fk_supplier_price_expression, pfp.delivery_time_days"; // , pfp.recuperableonly as fourn_tva_npr"; FIXME this field not exist in llx_product_fournisseur_price $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.rowid = ".$rowid; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 41837da45c9..edda6ea421e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -447,7 +447,7 @@ if (empty($reshook)) 'HT', $product_type, $lines[$i]->rang, - 1, + 0, $lines[$i]->array_options, $lines[$i]->fk_unit ); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 4778aeb48a1..6731c70d328 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -261,7 +261,8 @@ if ($resql) if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($search_status >= 0) $param.="&search_status=".$search_status; - print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); + print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy'); + print ''; if ($optioncss != '') print ''; print ''; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index acf4c9400d3..1137f0de14b 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * * 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 @@ -19,7 +19,7 @@ /** * \file htdocs/fourn/recap-fourn.php * \ingroup fournisseur - * \brief Page de fiche recap fournisseur + * \brief Page de fiche recap supplier */ require '../main.inc.php'; @@ -30,7 +30,7 @@ $langs->load("companies"); $langs->load("bills"); // Security check -$socid = $_GET["socid"]; +$socid = GETPOST("socid",'int'); if ($user->societe_id > 0) { $action = ''; @@ -43,6 +43,9 @@ if ($user->societe_id > 0) * View */ +$form = new Form($db); +$userstatic=new User($db); + llxHeader(); if ($socid > 0) @@ -56,36 +59,12 @@ if ($socid > 0) $head = societe_prepare_head($societe); dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"), 0, 'company'); - - - print "
' . $langs->trans('NotePublic') . ''; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
' . $langs->trans('NotePrivate') . ''; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
' . $langs->trans('NotePublic') . ''; - $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); + $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
' . $langs->trans('NotePrivate') . ''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); + $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print '
\n"; - print '
'; - - print ''; - - // Nom - print ''; - - // Prefix - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - - print "
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Prefix").''; - print ($societe->prefix_comm?$societe->prefix_comm:' '); - print '
"; - - print "
\n"; - - print '
'; - - - + dol_banner_tab($societe, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + dol_fiche_end(); if (! empty($conf->fournisseur->enabled) && $user->rights->facture->lire) { - // Invoices list + // Invoice list print load_fiche_titre($langs->trans("SupplierPreview")); print ''; @@ -203,10 +182,9 @@ if ($socid > 0) { dol_print_error($db); } + print "
"; - print "
"; } - } else { diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index c64e89b342f..e78d185661f 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -40,6 +40,7 @@ $action=GETPOST('action'); $holiday = new Holiday($db); $langs->load('users'); +$langs->load('hrm'); /* diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 5c28894fdbf..673ee101cf0 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; $langs->load('users'); $langs->load('holidays'); +$langs->load('hrm'); // Protection if external user if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index e1204429100..55b4e05942a 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -36,6 +36,7 @@ if ($user->societe_id > 0) accessforbidden(); // Si l'utilisateur n'a pas le droit de lire cette page if(!$user->rights->holiday->read_all) accessforbidden(); +$langs->load('hrm'); /* diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 3ba9e41c670..81a950d3f81 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -536,5 +536,5 @@ $(".runupgrade").click(function() { '; dolibarr_install_syslog("--- check: end"); -pFooter(true); // Never display next button +pFooter(1); // Never display next button diff --git a/htdocs/install/default.css b/htdocs/install/default.css index c3d97cdaa74..abf9baa5a7d 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -55,6 +55,8 @@ background: #FDFDFD; border: 1px solid #ACBCBB; padding: 0 0 0 0; margin: 0 0 0 0; +color: #AAA !important; +cursor: not-allowed !important; } input[type=submit] { diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 0b604763737..5b010f80e0b 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -412,7 +412,7 @@ function pHeader($subtitle,$next,$action='set',$param='',$forcejqueryurl='') /** * Print HTML footer of install pages * - * @param integer $nonext No button "Next step" + * @param integer $nonext 1=No button "Next step", 2=Show button but disabled * @param string $setuplang Language code * @param string $jscheckfunction Add a javascript check function * @param integer $withpleasewait Add also please wait tags @@ -429,9 +429,9 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='', $withpleasewait=0) print ''."\n"; print ''."\n"; - if (! $nonext) + if (! $nonext || ($nonext == '2')) { - print '
"'; + print '
"'; if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"'; print '>
'; if ($withpleasewait) print ''; diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index ed7eb22c21d..e6e92a65fc7 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -26,6 +26,9 @@ ALTER TABLE llx_don ADD COLUMN fk_country integer NOT NULL DEFAULT 0 after country; +UPDATE llx_user set api_key = null where api_key = ''; + + UPDATE llx_commande_fourn set billed=1 where statut = 8; UPDATE llx_commande_fourn set statut=5 where statut = 8 and billed=1; diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 53034338932..fafe5a4ad9f 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -6,6 +6,9 @@ -- Requests to clean corrupted database +UPDATE llx_user set api_key = null where api_key = ''; + + -- delete foreign key that should never exists ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency; ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_currency; diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index d1eca1211ba..e8bb030ed81 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -727,7 +727,7 @@ function jsinfo() dolibarr_install_syslog("--- step1: end"); -pFooter($error,$setuplang,'jsinfo',1); +pFooter($error?1:0,$setuplang,'jsinfo',1); /** diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 8f27aa53767..bb7e37c7e47 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -616,6 +616,6 @@ else dolibarr_install_syslog("--- step2: end"); -pFooter(!$ok,$setuplang); +pFooter($ok?0:1,$setuplang); if (isset($db) && is_object($db)) $db->close(); diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index b9aef70445e..4d42e225429 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -483,8 +483,8 @@ $ret=0; if (! $ok && isset($argv[1])) $ret=1; dol_syslog("Exit ".$ret); -dolibarr_install_syslog("--- upgrade: end"); -pFooter(((! $ok && empty($_GET["ignoreerrors"])) || $dirmodule),$setuplang); +dolibarr_install_syslog("--- upgrade: end ".((! $ok && empty($_GET["ignoreerrors"])) || $dirmodule)); +pFooter(((! $ok && empty($_GET["ignoreerrors"])) || $dirmodule)?2:0,$setuplang); if ($db->connected) $db->close(); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 8729dedc0a5..60f6e082f50 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -423,7 +423,7 @@ if ($error && isset($argv[1])) $ret=1; dol_syslog("Exit ".$ret); dolibarr_install_syslog("--- upgrade2: end"); -pFooter($error,$setuplang); +pFooter($error?2:0,$setuplang); if ($db->connected) $db->close(); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 9a36531e543..4afd7402668 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -499,7 +499,7 @@ Module510Desc=Management of employees salaries and payments Module520Name=Loan Module520Desc=Management of loans Module600Name=Notifications -Module600Desc=Send EMail notifications on some Dolibarr business events to third-party contacts (setup defined on each thirdparty) +Module600Desc=Send EMail notifications (triggered by some business events) to third-party contacts (setup defined on each thirdparty) or fixed emails Module700Name=Donations Module700Desc=Donation management Module770Name=Expense reports diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 4b8c9507b92..0b471cc8c51 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -8,7 +8,6 @@ NotActiveModCP=You must enable the module Leaves to view this page. NotConfigModCP=You must configure the module Leaves to view this page. To do this, click here . NoCPforUser=You don't have any available day. AddCP=Make a leave request -Employe=Employee DateDebCP=Start date DateFinCP=End date DateCreateCP=Creation date @@ -79,7 +78,6 @@ PrevSoldeCP=Previous Balance NewSoldeCP=New Balance alreadyCPexist=A leave request has already been done on this period. UserName=Name -Employee=Employee FirstDayOfHoliday=First day of vacation LastDayOfHoliday=Last day of vacation BoxTitleLastLeaveRequests=Last %s modified leave requests diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang index 1d03a8ebbf9..1c6ec8e61fc 100644 --- a/htdocs/langs/en_US/hrm.lang +++ b/htdocs/langs/en_US/hrm.lang @@ -15,5 +15,6 @@ DictionaryFunction=HRM - Function list ListOfEmployees=List of employees Employees=Employees Employee=Employee +Employe=Employe NewEmployee=New employee EmployeeCard=Employee card diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang index 79dbeadf775..da177410860 100644 --- a/htdocs/langs/en_US/salaries.lang +++ b/htdocs/langs/en_US/salaries.lang @@ -3,7 +3,6 @@ SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accountancy code for salaries payments SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accountancy code for financial charge Salary=Salary Salaries=Salaries -Employee=Employee NewSalaryPayment=New salary payment SalaryPayment=Salary payment SalariesPayments=Salaries payments diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1c35968790c..a24eda81fb3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -219,9 +219,9 @@ if (isset($_SERVER["HTTP_USER_AGENT"])) $conf->browser->name=$tmp['browsername']; $conf->browser->os=$tmp['browseros']; $conf->browser->version=$tmp['browserversion']; - $conf->browser->layout=$tmp['layout']; - $conf->browser->phone=$tmp['phone']; // deprecated, use layout - $conf->browser->tablet=$tmp['tablet']; // deprecated, use layout + $conf->browser->layout=$tmp['layout']; // 'classic', 'phone', 'tablet' + $conf->browser->phone=$tmp['phone']; // deprecated, use layout + $conf->browser->tablet=$tmp['tablet']; // deprecated, use layout //var_dump($conf->browser); } @@ -1220,15 +1220,25 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (empty($conf->dol_use_jmobile) || ($conf->dol_use_jmobile != 2 && $conf->dol_use_jmobile != 3)) { print ''; } @@ -1596,7 +1606,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra print "\n"; - if ($conf->use_javascript_ajax) + if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone') { if (! is_object($form)) $form=new Form($db); $selected=-1; @@ -1605,45 +1615,38 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra else { // Define $searchform - if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) + if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && $user->rights->societe->lire) { $langs->load("companies"); $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/list.php', DOL_URL_ROOT.'/societe/list.php', $langs->trans("ThirdParties"), 'soc', 'sall', 'T', 'searchleftt', img_object('','company')); } - if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire) + if (! empty($conf->societe->enabled) && $user->rights->societe->lire) { $langs->load("companies"); $searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', $langs->trans("Contacts"), 'contact', 'sall', 'A', 'searchleftc', img_object('','contact')); } if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) - && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)) + ) { $langs->load("products"); $searchform.=printSearchForm(DOL_URL_ROOT.'/product/list.php', DOL_URL_ROOT.'/product/list.php', $langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall', 'P', 'searchleftp', img_object('','product')); } - if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire)) && ! empty($conf->fournisseur->enabled) - && ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER)) - { - $langs->load("products"); - $searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/list.php', DOL_URL_ROOT.'/fourn/product/list.php', $langs->trans("SupplierRef"), 'products', 'srefsupplier', '', 'searchlefts', img_object('','product')); - } - - if (! empty($conf->projet->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_PROJECT) && $user->rights->projet->lire) + if (! empty($conf->projet->enabled) && $user->rights->projet->lire) { $langs->load("projects"); $searchform.=printSearchForm(DOL_URL_ROOT.'/projet/list.php', DOL_URL_ROOT.'/projet/list.php', $langs->trans("Projects"), 'project', 'search_all', 'Q', 'searchleftproj', img_object('','projectpub')); } - if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) + if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire) { $langs->load("members"); $searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/list.php', DOL_URL_ROOT.'/adherents/list.php', $langs->trans("Members"), 'member', 'sall', 'M', 'searchleftm', img_object('','user')); } - if (! empty($conf->user->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_USER) && $user->rights->user->user->lire) + if (! empty($conf->user->enabled) && $user->rights->user->user->lire) { $langs->load("users"); $searchform.=printSearchForm(DOL_URL_ROOT.'/user/list.php', DOL_URL_ROOT.'/user/list.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user')); @@ -1659,6 +1662,19 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra } else $searchform=$hookmanager->resPrint; + if ($conf->use_javascript_ajax && $conf->browser->layout == 'phone') + { + $searchform='
'; + $searchform.='' . "\n"; + $searchform.='
'; + } + // Define $bookmarks if (! empty($conf->bookmark->enabled) && $user->rights->bookmark->lire) { @@ -1673,33 +1689,11 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra print '
'."\n\n"; - // Show other forms - /*if ($searchform) - { - print "\n"; - print "\n"; - print '
'."\n"; - print $searchform; - print '
'."\n"; - print "\n"; - }*/ - + // Show left menu with other forms $menumanager->menu_array = $menu_array_before; $menumanager->menu_array_after = $menu_array_after; $menumanager->showmenu('left', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // output menu_array and menu found in database - // Bookmarks - /* - if ($bookmarks) - { - print "\n"; - print "\n"; - print '
'."\n"; - print $bookmarks; - print '
'."\n"; - print "\n"; - }*/ - // Dolibarr version + help + bug report link print "\n"; print "\n"; @@ -1952,7 +1946,10 @@ if (! function_exists("llxFooter")) jQuery(".classfortooltip").tipTip({maxWidth: "'.dol_size(600,'width').'px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50}); }); ' . "\n"; - + + // A div for the address popup + print "\n\n"; + print ''."\n"; print "\n"; print "\n"; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index c2a702e796a..ccba0f887eb 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -94,7 +94,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index e222e77ee81..5bca7bb2b86 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012-2013 Marcos García * Copyright (C) 2013 Juanjo Menent @@ -41,6 +41,8 @@ if (! empty($conf->categorie->enabled)) $langs->load("products"); $langs->load("stocks"); $langs->load("suppliers"); +$langs->load("companies"); +if (! empty($conf->productbatch->enabled)) $langs->load("productbatch"); $action = GETPOST('action'); $sref=GETPOST("sref"); @@ -54,6 +56,9 @@ $tosell = GETPOST("tosell", 'int'); $tobuy = GETPOST("tobuy", 'int'); $fourn_id = GETPOST("fourn_id",'int'); $catid = GETPOST('catid','int'); +$search_tobatch = GETPOST("search_tobatch",'int'); +$search_accountancy_code_sell = GETPOST("search_accountancy_code_sell",'alpha'); +$search_accountancy_code_buy = GETPOST("search_accountancy_code_buy",'alpha'); $optioncss = GETPOST('optioncss','alpha'); $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; @@ -99,6 +104,7 @@ else $result=restrictedArea($user,'produit|service','','','','','',$objcanvas); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( 'p.ref'=>"Ref", + 'pfp.ref_fourn'=>"RefSupplier", 'p.label'=>"ProductLabel", 'p.description'=>"Description", "p.note"=>"Note", @@ -117,13 +123,17 @@ if (! empty($conf->barcode->enabled)) { // Definition of fields for lists $arrayfields=array( 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), + //'pfp.ref_fourn'=>array('label'=>$langs->trans("RefSupplier"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), 'p.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), 'p.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>($contextpage != 'servicelist'), 'enabled'=>(! empty($conf->barcode->enabled))), 'p.duration'=>array('label'=>$langs->trans("Duration"), 'checked'=>($contextpage != 'productlist'), 'enabled'=>(! empty($conf->service->enabled))), 'p.sellprice'=>array('label'=>$titlesellprice, 'checked'=>1, 'enabled'=>empty($conf->global->PRODUIT_MULTIPRICES)), 'p.minbuyprice'=>array('label'=>$langs->trans("BuyingPriceMinShort"), 'checked'=>1, 'enabled'=>(! empty($user->rights->fournisseur->lire))), 'p.desiredstock'=>array('label'=>$langs->trans("DesiredStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')), - 'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')), + 'p.tobatch'=>array('label'=>$langs->trans("ManageLotSerial"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))), + 'p.stock'=>array('label'=>$langs->trans("PhysicalStock"), 'checked'=>1, 'enabled'=>(! empty($conf->stock->enabled) && $user->rights->stock->lire && $contextpage != 'service')), + 'p.accountancy_code_sell'=>array('label'=>$langs->trans("ProductAccountancySellCode"), 'checked'=>0), + 'p.accountancy_code_buy'=>array('label'=>$langs->trans("ProductAccountancyBuyCode"), 'checked'=>0), 'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), 'p.tosell'=>array('label'=>$langs->trans("Status").' ('.$langs->trans("Sell").')', 'checked'=>1, 'position'=>1000), @@ -154,6 +164,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_categ=0; $tosell=""; $tobuy=""; + $search_tobatch=''; + $search_accountancy_code_sell=''; + $search_accountancy_code_buy=''; $search_array_options=array(); } @@ -192,7 +205,9 @@ else $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,'; $sql.= ' p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock,'; + $sql.= ' p.tobatch, p.accountancy_code_sell, p.accountancy_code_buy,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; + //$sql.= ' pfp.ref_fourn as ref_supplier, '; $sql.= ' MIN(pfp.unitprice) as minsellprice'; // Add fields from extrafields foreach ($extrafields->attribute_label as $key => $val) $sql.=",ef.".$key.' as options_'.$key; @@ -227,7 +242,10 @@ else if ($search_categ > 0) $sql.= " AND cp.fk_categorie = ".$db->escape($search_categ); if ($search_categ == -2) $sql.= " AND cp.fk_categorie IS NULL"; if ($fourn_id > 0) $sql.= " AND pfp.fk_soc = ".$fourn_id; - // Add where from extra fields + if ($search_tobatch != '' && $search_tobatch >= 0) $sql.= " AND p.tobatch = ".$db->escape($search_tobatch); + if ($search_accountancy_code_sell) $sql.= natural_search('p.accountancy_code_sell', $search_accountancy_code_sell); + if ($search_accountancy_code_sell) $sql.= natural_search('p.accountancy_code_buy', $search_accountancy_code_buy); + // Add where from extra fields foreach ($search_array_options as $key => $val) { $crit=$val; @@ -299,6 +317,7 @@ else } if ($sref) $param="&sref=".$sref; + if ($search_ref_supplier) $param="&search_ref_supplier=".$search_ref_supplier; if ($sbarcode) $param.=($sbarcode?"&sbarcode=".$sbarcode:""); if ($snom) $param.="&snom=".$snom; if ($sall) $param.="&sall=".$sall; @@ -308,7 +327,10 @@ else if ($seach_categ) $param.=($search_categ?"&search_categ=".$search_categ:""); if ($type != '') $param.='&type='.urlencode($type); if ($optioncss != '') $param.='&optioncss='.$optioncss; - // Add $param from extra fields + if ($search_tobatch) $param="&search_ref_supplier=".$search_ref_supplier; + if ($search_accountancy_code_sell) $param="&search_accountancy_code_sell=".$search_accountancy_code_sell; + if ($search_accountancy_code_buy) $param="&search_accountancy_code_buy=".$search_accountancy_code_buy; + // Add $param from extra fields foreach ($search_array_options as $key => $val) { $crit=$val; @@ -396,13 +418,17 @@ else print ''; print ''; if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder); + if (! empty($arrayfields['pfp.ref_fourn']['checked'])) print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"],"pfp.ref_fourn","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"],"p.label","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"],"p.barcode","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['p.desiredstock']['checked'])) print_liste_field_titre($arrayfields['p.desiredstock']['label'], $_SERVER["PHP_SELF"],"p.desirestock","",$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['p.tobatch']['checked'])) print_liste_field_titre($arrayfields['p.tobatch']['label'], $_SERVER["PHP_SELF"],"p.tobatch","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['p.stock']['checked'])) print_liste_field_titre($arrayfields['p.stock']['label'], $_SERVER["PHP_SELF"],"p.stock","",$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"],"p.accountancy_code_sell","",$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) print_liste_field_titre($arrayfields['p.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"],"p.accountancy_code_buy","",$param,'',$sortfield,$sortorder); if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { foreach($extrafields->attribute_label as $key => $val) @@ -433,6 +459,12 @@ else print ''; print ''; } + if (! empty($arrayfields['pfp.ref_fourn']['checked'])) + { + print ''; + } if (! empty($arrayfields['p.label']['checked'])) { print ''; } + // To batch + if (! empty($arrayfields['p.tobatch']['checked'])) print ''; // Stock - if (! empty($arrayfields['p.stock']['checked'])) - { - print ''; - } + if (! empty($arrayfields['p.stock']['checked'])) print ''; + // Accountancy code sell + if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print ''; + // Accountancy code sell + if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) print ''; // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -551,6 +584,7 @@ else $product_static->id = $objp->rowid; $product_static->ref = $objp->ref; + $product_static->ref_fourn = $objp->ref_supplier; $product_static->label = $objp->label; $product_static->type = $objp->fk_product_type; $product_static->status_buy = $objp->tobuy; @@ -567,7 +601,13 @@ else print $product_static->getNomUrl(1,'',24); print "\n"; } - + // Ref supplier + if (! empty($arrayfields['pfp.ref_fourn']['checked'])) + { + print '\n"; + } // Label if (! empty($arrayfields['p.label']['checked'])) { @@ -648,11 +688,18 @@ else { print $objp->desiredstock; } + print ''; } + // Desired stock + if (! empty($arrayfields['p.tobatch']['checked'])) + { + print ''; + } // Stock if (! empty($arrayfields['p.stock']['checked'])) { - print ''; print ''; } - - // Extra fields + // Accountancy code sell + if (! empty($arrayfields['p.accountancy_code_sell']['checked'])) print ''; + // Accountancy code sell + if (! empty($arrayfields['p.accountancy_code_buy']['checked'])) print ''; + // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { foreach($extrafields->attribute_label as $key => $val) diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 1be05aed2d8..9dec7555ae0 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -83,7 +83,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''; - print ''; + print ''; print ''; if ($i == 0) print ''; print ''; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 8b3d2b76c25..e1bc581453d 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -113,7 +113,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''; - print ''; + print ''; print ''; if ($i == 0) print ''; print ''; diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 8fc59b818ae..dee17b4955f 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -63,10 +63,10 @@ if (empty($reshook)) { $demoprofiles=array( array('default'=>'1', 'key'=>'profdemoservonly','label'=>'DemoCompanyServiceOnly', - 'disablemodules'=>'adherent,barcode,cashdesk,categorie,don,expedition,externalsite,mailmanspip,margin,prelevement,product,stock', + 'disablemodules'=>'adherent,barcode,cashdesk,categorie,don,expedition,externalsite,incoterm,mailmanspip,margin,prelevement,product,productbatch,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png'), array('default'=>'-1','key'=>'profdemoshopwithdesk','label'=>'DemoCompanyShopWithCashDesk', - 'disablemodules'=>'adherent,categorie,don,externalsite,ficheinter,mailmanspip,prelevement,product,stock', + 'disablemodules'=>'adherent,categorie,don,externalsite,ficheinter,incoterm,mailmanspip,prelevement,product,productbatch,stock', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'), array('default'=>'0', 'key'=>'profdemoprodstock','label'=>'DemoCompanyProductAndStocks', 'disablemodules'=>'adherent,contrat,categorie,don,externalsite,ficheinter,mailmanspip,prelevement,service', @@ -75,16 +75,16 @@ if (empty($reshook)) 'disablemodules'=>'adherent,don,externalsite,mailmanspip', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'), array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation', - 'disablemodules'=>'banque,barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,margin,prelevement,product,projet,propal,propale,service,societe,stock,tax', + 'disablemodules'=>'banque,barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,incoterm,mailmanspip,margin,prelevement,product,productbatch,projet,propal,propale,service,societe,stock,tax', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'), array('default'=>'0', 'key'=>'profdemofun2','label'=>'DemoFundation2', - 'disablemodules'=>'barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,margin,prelevement,product,projet,propal,propale,service,societe,stock,tax', + 'disablemodules'=>'barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,facture,ficheinter,fournisseur,mailmanspip,margin,prelevement,product,productbatch,projet,propal,propale,service,societe,stock,tax', 'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png') ); // Visible $alwayscheckedmodules=array('barcode','bookmark','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want - $alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want + $alwaysuncheckedmodules=array('paybox','paypal','google','printing','resource','scanner','workflow'); // Module we never want // Not visible $alwayshiddencheckedmodules=array('accounting','barcode','bookmark','clicktodial','comptabilite','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap', 'mailmanspip','notification','syslog','user','webservices', diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index e6c01eb09f4..c323ad17e69 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -624,10 +624,11 @@ class Resource extends CommonObject * Load properties id_previous and id_next * * @param string $filter Optional filter - * @param int $fieldid Name of field to use for the select MAX and MIN + * @param int $fieldid Name of field to use for the select MAX and MIN + * @param int $nodbprefix Do not include DB prefix to forge table name * @return int <0 if KO, >0 if OK */ - function load_previous_next_ref($filter,$fieldid) + function load_previous_next_ref($filter, $fieldid, $nodbprefix =0) { global $conf, $user; diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 35d03387fec..3924e8a9174 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -206,7 +206,7 @@ class CompanyBankAccount extends Account * @param User $user User deleting * @return int <0 if KO, >0 if OK */ - function delete($user) + function delete($user='') { global $conf; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 4dc16739158..0c5e6646889 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -180,10 +180,8 @@ dol_fiche_end(); print '
'; -print ''; +print ''; print ''; -print ''."\n"; - $sql_select=''; /*if ($type_element == 'action') diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 9556a95b826..b5f895cdcbb 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -77,7 +77,7 @@ if (count($listofsearchfields)) foreach($listofsearchfields as $key => $value) { if ($i == 0) print ''; - print ''; + print ''; print ''; if ($i == 0) print ''; print ''; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index fcee0c2cdf7..4a9efd40585 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -654,7 +654,7 @@ if ($resql) // Company type if (! empty($arrayfields['typent.code']['checked'])) { - print ''; } @@ -702,7 +702,7 @@ if ($resql) } // Type (customer/prospect/supplier) - print ''; } diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 9339f801583..9e07aaf5d96 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -64,10 +64,9 @@ $var=false; print ''; print ''; print '
'; + print ''; + print ''; @@ -473,13 +505,14 @@ else print ' '; print ''.$form->selectyesno($search_tobatch, '', '', '', 1).''; - print ' '; - print ' '; + print $product_static->getNomUrl(1,'',24); + print "'; + print yn($objp->tobatch); + print ''; if ($objp->fk_product_type != 1) { @@ -661,8 +708,11 @@ else } print ''.$objp->accountancy_code_sell.''.$objp->accountancy_code_buy.'
'.$langs->trans("Search").'
:
'.$langs->trans("Search").'
:
'.$langs->trans("Search").'
:
'; + print ''; print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); print ''; + print ''; print ''; + print ''; $arraystcomm=array(); foreach($prospectstatic->cacheprospectstatus as $key => $val) { @@ -783,7 +783,7 @@ if ($resql) // Status if (! empty($arrayfields['s.status']['checked'])) { - print ''; + print ''; print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print '
'; -print ''; +print ''; print ''; -print ''; +print $langs->trans("SupplierProposal").':'; print ''; print "
'.$langs->trans("SearchRequest").'
'.$langs->trans("Search").'
'; -print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; diff --git a/htdocs/theme/common/gmap.png b/htdocs/theme/common/gmap.png index 201577281f0..2d91b463419 100644 Binary files a/htdocs/theme/common/gmap.png and b/htdocs/theme/common/gmap.png differ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5dd49a57266..536801716dd 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -193,8 +193,6 @@ $colortexttitle=join(',',colorStringToArray($colortexttitle)); $colortext=join(',',colorStringToArray($colortext)); $colortextlink=join(',',colorStringToArray($colortextlink)); -if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11; - $nbtopmenuentries=$menumanager->showmenu('topnb'); print '/*'."\n"; @@ -584,8 +582,8 @@ td.showDragHandle { div.fiche { - margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'4':'20'):'24')); ?>px; - margin-: dol_optimize_smallscreen)?'12':'4')); ?>px; + margin-: global->MAIN_MENU_USE_JQUERY_LAYOUT))?($dol_hide_leftmenu?'6':'20'):'24')); ?>px; + margin-: dol_optimize_smallscreen)?'12':'6')); ?>px; dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> } @@ -1189,14 +1187,14 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; } -.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenubookmarks +.vmenu div.blockvmenufirst, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone, .vmenu div.blockvmenubookmarks { border-top: 1px solid #BBB; } a.vsmenu.addbookmarkpicto { padding-right: 10px; } -.vmenu div.blockvmenubookmarks, .vmenu div.blockvmenuend, .vmenu div.blockvmenulogo +.vmenu div.blockvmenubookmarks, .vmenu div.blockvmenuend, .vmenu div.blockvmenulogo, .vmenu div.blockvmenusearchphone { border-bottom: 1px solid #BBB; } @@ -1626,13 +1624,11 @@ div.tabsAction > a { } a.tabTitle { -/* background: #657090; - color: white;*/ - color:rgba(0,0,0,.5); + color:rgba(0,0,0,.5) !important; margin-right:10px; text-shadow:1px 1px 1px #ffffff; font-family: ; - font-weight: normal; + font-weight: normal !important; padding: 4px 6px 2px 6px; margin: 0px 6px; text-decoration: none; @@ -2142,7 +2138,7 @@ table.listwithfilterbefore { /* Pagination */ div.refidpadding { - padding-top: dol_use_jmobile)?'3':'14'; ?>px; + padding-top: dol_use_jmobile)?'3':'7'; ?>px; } div.refid { font-weight: bold; @@ -2931,6 +2927,10 @@ table.dp { vertical-align:middle; cursor: pointer; } +.datenowlink +{ + color: rgb(); +} /* ============================================================================== */ @@ -3664,6 +3664,9 @@ span.noborderoncategories { /* Multiselect with checkbox */ /* ============================================================================== */ +ul.ulselectedfields { + z-index: 100; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ +} dl.dropdown { margin:0px; padding:0px; @@ -3754,6 +3757,13 @@ a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-i .ui-select .ui-btn-icon-left .ui-btn-inner { padding-left: 38px; } +select { + /* display: inline-block; */ /* We can't set this. This disable ability to make */ + /* TODO added by jmobile, replace jmobile with pure css*/ + overflow:hidden; + white-space: nowrap; + text-overflow: ellipsis; +} .fiche .ui-controlgroup { margin: 0px; padding-bottom: 0px; @@ -3837,7 +3847,7 @@ ul.ulmenu { /* Style for first level menu with jmobile */ .ui-bar-b, .lilevel0 { - border: 1px solid #5f5f7a !important; + border: 1px solid #888 !important; background: rgb(); background-repeat: repeat-x; @@ -3866,7 +3876,7 @@ ul.ulmenu { text-shadow: none; } .ui-body-c .ui-link, .ui-body-c .ui-link:visited, .ui-body-c .ui-link:hover { - color: rgb(); + color: rgb(); } .ui-btn-up-c .vsmenudisabled { color: # !important; diff --git a/htdocs/theme/md/img/menus/home.png b/htdocs/theme/md/img/menus/home.png index 1614347a829..c5441fa2962 100644 Binary files a/htdocs/theme/md/img/menus/home.png and b/htdocs/theme/md/img/menus/home.png differ diff --git a/htdocs/theme/md/img/searchclear.png b/htdocs/theme/md/img/searchclear.png index 5715b64beed..12437f84823 100644 Binary files a/htdocs/theme/md/img/searchclear.png and b/htdocs/theme/md/img/searchclear.png differ diff --git a/htdocs/theme/md/img/title_home.png b/htdocs/theme/md/img/title_home.png index b832916f5e9..9f61d7bf25b 100644 Binary files a/htdocs/theme/md/img/title_home.png and b/htdocs/theme/md/img/title_home.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6e10a9e5024..e69d36232b2 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -80,7 +80,7 @@ $dol_use_jmobile=$conf->dol_use_jmobile; //var_dump($user->conf->THEME_ELDY_RGB); // Colors -$colorbackhmenu1='0,0,0'; // topmenu +$colorbackhmenu1='0,0,80'; // topmenu $colorbackvmenu1='255,255,255'; // vmenu $colorbacktitle1='230,230,230'; // title of array $colorbacktabcard1='255,255,255'; // card @@ -90,9 +90,9 @@ $colorbacklineimpair2='255,255,255'; // line impair $colorbacklinepair1='250,250,250'; // line pair $colorbacklinepair2='248,248,248'; // line pair $colorbacklinepairhover='244,244,244'; // line pair -$colorbackbody='255,255,255'; +$colorbackbody='248,248,248'; $colortexttitlenotab='90,90,90'; -$colortexttitle='0,0,0'; +$colortexttitle='20,20,20'; $colortext='0,0,0'; $colortextlink='0,0,120'; $fontsize='13'; @@ -102,7 +102,7 @@ $useboldtitle=1; // Case of option always editable if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody; -if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='0,0,0'; +if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1='50,50,60'; if (! isset($conf->global->THEME_ELDY_BACKTITLE1)) $conf->global->THEME_ELDY_BACKTITLE1=$colorbacktitle1; if (! isset($conf->global->THEME_ELDY_USE_HOVER)) $conf->global->THEME_ELDY_USE_HOVER=='238,246,252'; if (! isset($conf->global->THEME_ELDY_TEXTTITLENOTAB)) $conf->global->THEME_ELDY_TEXTTITLENOTAB=$colortexttitlenotab; @@ -165,7 +165,7 @@ else { $colortextbackvmenu='000000'; } $tmppart=explode(',',$colorbacktitle1); $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); if ($tmpval <= 260) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; } -else { $colortexttitle='000000'; $colorshadowtitle='FFFFFF'; } +else { $colortexttitle='404040'; $colorshadowtitle='FFFFFF'; } $tmppart=explode(',',$colorbacktabcard1); $tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : ''); if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; } @@ -188,8 +188,6 @@ $colortexttitle=join(',',colorStringToArray($colortexttitle)); $colortext=join(',',colorStringToArray($colortext)); $colortextlink=join(',',colorStringToArray($colortextlink)); -if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11; - $nbtopmenuentries=$menumanager->showmenu('topnb'); print '/*'."\n"; @@ -213,6 +211,7 @@ print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n"; print 'dol_use_jmobile='.$dol_use_jmobile."\n"; print 'dol_screenwidth='.$_SESSION['dol_screenwidth']."\n"; print 'dol_screenheight='.$_SESSION['dol_screenheight']."\n"; +print 'fontsize='.$fontsize."\n"; print 'nbtopmenuentries='.$nbtopmenuentries."\n"; print '*/'."\n"; @@ -1755,11 +1754,13 @@ span.butAction, span.butActionDelete { color: #ffffff !important; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; + dol_use_jmobile)) { ?> background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; @@ -1925,6 +1926,8 @@ table.liste, table.noborder, table.formdoc, div.noborder { -webkit-box-shadow: 2px 2px 4px #CCC; box-shadow: 2px 2px 4px #CCC; */ + box-shadow: 0 0 3px rgba(0,0,0,0.16); + -moz-border-radius: 0.1em; -webkit-border-radius: 0.1em; border-radius: 0.1em; @@ -1943,10 +1946,10 @@ table.noborder tr, div.noborder form { min-height: 26px; } -table.liste th, table.noborder th { - padding: 5px 2px 5px 3px; /* t r b l */ +table.liste th, table.noborder th, table.noborder tr.liste_titre td { + padding: 12px 2px 12px 3px; /* t r b l */ } -table.noborder th, table.noborder td, div.noborder form, div.noborder form div { +table.noborder td, div.noborder form, div.noborder form div { padding: 4px 2px 4px 3px; /* t r b l */ } @@ -2036,13 +2039,13 @@ div.pagination li.pagination span { color: #000; text-decoration: none; - background-color: #f5f5f5; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; } div.pagination li.pagination span.inactive { @@ -2245,7 +2248,6 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list { /* TO MATCH BOOTSTRAP */ background: #ddd; - color: #000 !important; /* TO MATCH ELDY */ /* @@ -2773,7 +2775,10 @@ table.dp { vertical-align:middle; cursor: pointer; } - +.datenowlink +{ + color: rgb(); +} /* ============================================================================== */ /* Afficher/cacher */ @@ -3506,6 +3511,9 @@ span.noborderoncategories { /* Multiselect with checkbox */ /* ============================================================================== */ +ul.ulselectedfields { + z-index: 100; /* To have the select box appears on first plan even when near buttons are decorated by jmobile */ +} dl.dropdown { margin:0px; padding:0px; @@ -3679,7 +3687,7 @@ ul.ulmenu { /* Style for first level menu with jmobile */ .ui-bar-b, .lilevel0 { - border: 1px solid #5f5f7a !important; + border: 1px solid #888 !important; background: rgb(); background-repeat: repeat-x; @@ -3708,7 +3716,7 @@ ul.ulmenu { text-shadow: none; } .ui-body-c .ui-link, .ui-body-c .ui-link:visited, .ui-body-c .ui-link:hover { - color: rgb(); + color: rgb(); } .ui-btn-up-c .vsmenudisabled { color: # !important; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 7a4ffcb1372..374aaf51fbb 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -87,6 +87,7 @@ $langs->load("users"); $langs->load("companies"); $langs->load("ldap"); $langs->load("admin"); +$langs->load('hrm'); $object = new User($db); $extrafields = new ExtraFields($db); diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 43812be515c..d0ac0aaa66d 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -34,6 +34,7 @@ if (! $user->rights->user->user->lire && ! $user->admin) $langs->load("users"); $langs->load("companies"); +$langs->load('hrm'); // Security check (for external users) $socid=0; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 58d0f282b10..a853870ee8c 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -67,9 +67,11 @@ $object->fetch($id); $object->getrights(); // Liste des zone de recherche permanentes supportees +/* deprecated $searchform=array("main_searchform_societe","main_searchform_contact","main_searchform_produitservice"); $searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE); $searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),$langs->trans("ProductsAndServices")); +*/ $form = new Form($db); $formadmin=new FormAdmin($db); @@ -107,8 +109,6 @@ if (empty($reshook)) { $tabparam["MAIN_THEME"] = ''; } - $tabparam["MAIN_SEARCHFORM_CONTACT"] = $_POST["main_searchform_contact"]; - $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array())))); if ($val == '') { $tabparam['THEME_ELDY_TOPMENU_BACK1'] = ''; @@ -131,10 +131,6 @@ if (empty($reshook)) { $tabparam["THEME_ELDY_USE_HOVER"] = 0; } - $tabparam["MAIN_SEARCHFORM_SOCIETE"] = $_POST["main_searchform_societe"]; - - $tabparam["MAIN_SEARCHFORM_PRODUITSERVICE"] = $_POST["main_searchform_produitservice"]; - $result = dol_set_user_param($db, $conf, $object, $tabparam); header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);