From a2c820854106c2cb4e644b64ef393e0566a56a9b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Dec 2015 19:17:05 +0100 Subject: [PATCH 01/31] Prepare 3.6.5 --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index bd64723725a..fe638ab3902 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,17 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** 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 From f13df0f952c286fbf3c9a5164930c9397acde26d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Dec 2015 20:17:46 +0100 Subject: [PATCH 02/31] Prepare 3.7.3 --- ChangeLog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 20bdb77b390..a05b04de265 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,25 @@ Upgrading to any other version or database system is abolutely required BEFORE t make a Dolibarr upgrade. +***** 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 From 69058427944742700efd4a3e9601f433411f2e5f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Dec 2015 20:31:39 +0100 Subject: [PATCH 03/31] Update list of module in demo with new 3.8 modules --- htdocs/public/demo/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 4b0c0526174..b62d2934e35 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -61,10 +61,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', @@ -73,16 +73,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', From a2e93056f7eeeb18720126388944a2ad10216a5f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Dec 2015 23:42:09 +0100 Subject: [PATCH 04/31] Prepare 3.8.3 --- ChangeLog | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1cf62269654..4200d8ec9fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,84 @@ Upgrading to any other version or any other database system is abolutely require make a Dolibarr upgrade. +***** 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 From cfd01b6060372391aad7166b6963de80227b756b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 27 Dec 2015 23:50:13 +0100 Subject: [PATCH 05/31] Fix package for 3.8.3 --- build/makepack-dolibarr.pl | 3 +++ 1 file changed, 3 insertions(+) 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 From 07f7717b514db604e73434e1734c35147e60fb37 Mon Sep 17 00:00:00 2001 From: braito4 Date: Mon, 28 Dec 2015 11:28:18 +0100 Subject: [PATCH 06/31] Fix Warning #4229 PHP7 --- htdocs/resource/class/resource.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index e6c01eb09f4..b7e0caa7bfc 100644 --- a/htdocs/resource/class/resource.class.php +++ b/htdocs/resource/class/resource.class.php @@ -627,7 +627,7 @@ class Resource extends CommonObject * @param int $fieldid Name of field to use for the select MAX and MIN * @return int <0 if KO, >0 if OK */ - function load_previous_next_ref($filter,$fieldid) + function load_previous_next_ref($filter, $fieldid, $nodbprefix ='') { global $conf, $user; From 47ee8993d3daa909e98874abad1abd17778889e4 Mon Sep 17 00:00:00 2001 From: braito4 Date: Mon, 28 Dec 2015 11:47:12 +0100 Subject: [PATCH 07/31] fix travis --- htdocs/resource/class/resource.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/resource/class/resource.class.php b/htdocs/resource/class/resource.class.php index b7e0caa7bfc..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, $nodbprefix ='') + function load_previous_next_ref($filter, $fieldid, $nodbprefix =0) { global $conf, $user; From 5773171efc459e7ece3faa7eb7cc9fd03f1ec8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 28 Dec 2015 14:04:22 +0100 Subject: [PATCH 08/31] FIX #4155 Search Categories error --- htdocs/categories/class/categorie.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f632492a59d..18f13a44813 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1294,7 +1294,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 ); } From bec00e37e04ddeedd49d9c00df35c2a39a9adeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 28 Dec 2015 15:04:24 +0100 Subject: [PATCH 09/31] FIX #4272 Error when trying to print the page "Linked objects" of a Thirdparty --- htdocs/societe/consumption.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 2282b42cf0f..2ac01c84bc9 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -177,10 +177,8 @@ dol_fiche_end(); print '
'; -print '
'; +print ''; print ''; -print ''."\n"; - $sql_select=''; /*if ($type_element == 'action') From c04eef35d514457dde75ccb916c1b53f38283497 Mon Sep 17 00:00:00 2001 From: Sof Date: Mon, 28 Dec 2015 19:07:25 +0100 Subject: [PATCH 10/31] FIX: Field cost_price does not exist and typos --- htdocs/fourn/class/fournisseur.product.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; From b6b422042c10d7e7250344af3ba32f3366746e23 Mon Sep 17 00:00:00 2001 From: Paris Liakos Date: Tue, 29 Dec 2015 03:43:49 +0200 Subject: [PATCH 11/31] MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND is always overriden --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e4bb572a3eb..eb3f094b7d7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2050,7 +2050,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; From 5a49b8ce53831dc5f935f1ef81daf300152d15b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Dec 2015 12:02:22 +0100 Subject: [PATCH 12/31] Fix: error when running install twice Fix: a minor error was locking the full upgrade process. --- htdocs/install/check.php | 2 +- htdocs/install/default.css | 2 ++ htdocs/install/inc.php | 6 +++--- htdocs/install/mysql/migration/3.8.0-3.9.0.sql | 3 +++ htdocs/install/mysql/migration/repair.sql | 3 +++ htdocs/install/step1.php | 2 +- htdocs/install/step2.php | 2 +- htdocs/install/upgrade.php | 4 ++-- htdocs/install/upgrade2.php | 2 +- 9 files changed, 17 insertions(+), 9 deletions(-) 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(); From c004342976ae1cf5fe9d3c994b6a7637ae603d81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Dec 2015 14:55:10 +0100 Subject: [PATCH 13/31] FIX #3694 --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 380ecd80943..a527200e203 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -938,9 +938,9 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname"; if (get_class($object) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id "; $sql.= " WHERE u.rowid = a.fk_user_author"; $sql.= " AND a.entity IN (".getEntity('agenda', 1).")"; if (get_class($object) == 'Adherent') { From a234482d085dfde843851941a7c8d27fa57d34e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 31 Dec 2015 14:55:53 +0100 Subject: [PATCH 14/31] FIX #3694 --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index a527200e203..7a7cd386f4f 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -939,8 +939,8 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0) if (get_class($object) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; - if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; if (get_class($object) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; + if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; $sql.= " WHERE u.rowid = a.fk_user_author"; $sql.= " AND a.entity IN (".getEntity('agenda', 1).")"; if (get_class($object) == 'Adherent') { From fffc8a430dfebd51720143738d74ece8715a3f9a Mon Sep 17 00:00:00 2001 From: phf Date: Thu, 31 Dec 2015 15:48:16 +0100 Subject: [PATCH 15/31] FIX call trigger LINEBILL_SUPPLIER_CREATE --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 21aab088fd0..32a608b39bd 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 ); From b1aba4b93bc0bb52b826f1e90332576f78a4cd74 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 31 Dec 2015 18:50:28 +0100 Subject: [PATCH 16/31] Add rfc and dayall format for extrafields date --- .../core/class/commondocgenerator.class.php | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index c2634cbaaed..744416b5d32 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 @@ -581,8 +582,20 @@ 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'); + $object->array_options['options_'.$key.'_rfc'] = dol_print_date($object->array_options['options_'.$key],'dayrfc'); + $object->array_options['options_'.$key.'_dayall'] = dol_print_date($object->array_options['options_'.$key],'dayall'); + } + else + { + $object->array_options['options_'.$key] = '' + $object->array_options['options_'.$key.'_rfc'] = ''; + $object->array_options['options_'.$key.'_dayall'] = ''; + } + } else if($extrafields->attribute_type[$key] == 'datetime') { From dbb8e4965408f5e4fdbcbd9bd54ebfcb9659760e Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 1 Jan 2016 12:47:27 +0100 Subject: [PATCH 17/31] Update commondocgenerator.class.php --- htdocs/core/class/commondocgenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 744416b5d32..6f5d3f697ef 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -591,7 +591,7 @@ abstract class CommonDocGenerator } else { - $object->array_options['options_'.$key] = '' + $object->array_options['options_'.$key] = ''; $object->array_options['options_'.$key.'_rfc'] = ''; $object->array_options['options_'.$key.'_dayall'] = ''; } From 52cd5d505e212f61f2fc4fd5aea2987734645be2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Jan 2016 23:44:23 +0100 Subject: [PATCH 18/31] Fix several bugs on css, translation or look --- htdocs/adherents/index.php | 2 +- htdocs/comm/index.php | 2 +- htdocs/compta/hrm.php | 2 +- htdocs/compta/index.php | 2 +- htdocs/compta/prelevement/stats.php | 9 ++++----- htdocs/compta/salaries/card.php | 1 + htdocs/fourn/facture/list.php | 3 ++- htdocs/holiday/define_holiday.php | 1 + htdocs/holiday/list.php | 1 + htdocs/holiday/month_report.php | 1 + htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/en_US/holiday.lang | 2 -- htdocs/langs/en_US/hrm.lang | 1 + htdocs/langs/en_US/salaries.lang | 1 - htdocs/product/index.php | 2 +- htdocs/projet/activity/index.php | 2 +- htdocs/projet/index.php | 2 +- htdocs/societe/index.php | 2 +- htdocs/supplier_proposal/index.php | 5 ++--- htdocs/theme/eldy/style.css.php | 4 ++++ htdocs/theme/md/img/menus/home.png | Bin 94 -> 179 bytes htdocs/theme/md/img/title_home.png | Bin 126 -> 214 bytes htdocs/theme/md/style.css.php | 20 ++++++++++++-------- htdocs/user/card.php | 1 + htdocs/user/index.php | 1 + 25 files changed, 40 insertions(+), 29 deletions(-) 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/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/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/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/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/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/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/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 ''.$langs->trans("Search").''; - 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 ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; print ''; 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 ''.$langs->trans("Search").''; - print ''; + print ''; print ':'; if ($i == 0) print ''; 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 ''; 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/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5dd49a57266..6592e5e4116 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2931,6 +2931,10 @@ table.dp { vertical-align:middle; cursor: pointer; } +.datenowlink +{ + color: rgb(); +} /* ============================================================================== */ diff --git a/htdocs/theme/md/img/menus/home.png b/htdocs/theme/md/img/menus/home.png index 1614347a829d55ba7c165290563c4979eff8693a..c5441fa296242bf9b923f135014ddc1185e49a91 100644 GIT binary patch delta 150 zcmV;H0BQeTvjLDKe|kwoK~y-)?aw_8fG`k1VHmo>S_9yq8bAcdKnE_sL^Xhe8enE) z;4zUjO@9a*3Ey~mm&;|@H;^+jl0VG_GXN9fNnWD4X^K=XS+On1SYBgr8LCjO*znm< zzPx28WT$cSo`aZ!&dvu;QcecS|2Y5)KL delta 64 zcmdnY7&k%1O4ZZFF~s6@a)QK~2li42RLxc~E?3!j(CWZP2jlcUHQuhri3=DQHk$qu TNH`Ev#sCDKu6{1-oD!M<6si~6 diff --git a/htdocs/theme/md/img/title_home.png b/htdocs/theme/md/img/title_home.png index b832916f5e97b28900f42852d245eead209cdb4e..9f61d7bf25be9f17f17688cc948ddf7bb65a5f2a 100644 GIT binary patch delta 185 zcmV;q07n0Q)&Y noK?*BI<)Zrp)eGNf<1Tw?YNH?HE~#B00000NkvXXu0mjfXzNjW delta 96 zcmcb{ST{i>%GJ}wF{FYqS%I;KiM@?&&4tDW9V-T|f5*9`IZpRUxkQv*QFx{5!PM}N zjrZlAw)-EQ4Yf4B-^y4fYufRzvbRC!VuA<*LvoLu^_v3@d<;O~>FVdQ&MBb@0Ke`d A?f?J) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6e10a9e5024..5983243341e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -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'; @@ -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'; } @@ -1925,6 +1925,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 +1945,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 */ } @@ -2245,7 +2247,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 +2774,10 @@ table.dp { vertical-align:middle; cursor: pointer; } - +.datenowlink +{ + color: rgb(); +} /* ============================================================================== */ /* Afficher/cacher */ 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; From 1ae4bef04b7092a975a6815a518c21c8f9f53e4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 00:27:14 +0100 Subject: [PATCH 19/31] Fix conflict with the div #dialog used for popup cut and paste of address. --- htdocs/core/boxes/box_actions.php | 13 +++++++------ htdocs/core/js/lib_head.js.php | 9 +++++---- htdocs/core/lib/company.lib.php | 3 --- htdocs/main.inc.php | 5 ++++- htdocs/theme/common/gmap.png | Bin 358 -> 374 bytes htdocs/theme/md/style.css.php | 4 ++-- 6 files changed, 18 insertions(+), 16 deletions(-) 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/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/main.inc.php b/htdocs/main.inc.php index 1c35968790c..1da5fa8f864 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1952,7 +1952,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/theme/common/gmap.png b/htdocs/theme/common/gmap.png index 201577281f048ad530a5ffc90ae5ddcde1ea09cb..2d91b4634190a80ef1002cfef6b03cac54633ed1 100644 GIT binary patch delta 348 zcmV-i0i*ur0`>xsBYyw}VoOIv0RI600RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_ z000McNliru-~j;_2oilou|fa<0Ru@yK~y-)m6E+}!!QtqKLuHVb&?6V00Dc1Y@loq zc>+@t*dwTPX%7%U0a&Co+cdUo7O^IkRiHrZcbte74$e z2Ea_-PNBaoYSaP$wsJr$R>|#6-p?rw_J9?!et@0eHL#TUIK^O_#cSXo?ni3WJ2(PQ zBP*YrHP81%>{TW->+XqoqdqA3Ai2M%9Adf@_(G0m5_8s6x4k!t7JZ26BHk*Tc#zx}Oz5uRguU8FH`GtW10000L0Z}plWdk}vvjJrS(g|RM zG6Aqb7$A{1XxV@ckc4-Yja>Hv5+YJ0`@Zk)|9@v@%2$@ z0LdF-ORexYj_a=L>JU3B;5xtXV9(=v7=~AQoFqwQjCqhVOn+`dCPxK|qG)({P4YdR zp2ALGE3ikfcQ7w)7Bd)KmkYXlh6VCG&(bvAN~~?$@4Wvl08Isq2;jB;X^|v}ah)@+ z9mlh%$R1C!ctyM?5*&-e(u4)Hdol_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 @@ -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; From 273f3678bc0e373cfc5a8c17aca3d86f1f9f7261 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 00:32:22 +0100 Subject: [PATCH 20/31] Fix no ?> at end of php files --- htdocs/conf/conf.php.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; -?> + From 9b3533e7531862a1bd81bdb5ab742717486850e9 Mon Sep 17 00:00:00 2001 From: braito4 Date: Sat, 2 Jan 2016 11:42:43 +0100 Subject: [PATCH 21/31] FIX #4326 PHP7 Warning --- htdocs/societe/class/companybankaccount.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 04c5516483a861e16dbacbcfbd70e6c9da15d8d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 11:51:40 +0100 Subject: [PATCH 22/31] Fix the format "dayall" does not exists. Instead add missing format "_locale" using correct language file. --- htdocs/core/class/commondocgenerator.class.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 6f5d3f697ef..5804ab4cf9f 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -561,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 */ @@ -585,21 +585,22 @@ abstract class CommonDocGenerator { if (strlen($object->array_options['options_'.$key])>0) { - $object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); - $object->array_options['options_'.$key.'_rfc'] = dol_print_date($object->array_options['options_'.$key],'dayrfc'); - $object->array_options['options_'.$key.'_dayall'] = dol_print_date($object->array_options['options_'.$key],'dayall'); + $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'] = ''; - $object->array_options['options_'.$key.'_dayall'] = ''; } - } 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])); } From 35ce670bf260f63ab8b3df391d7857f8144cb026 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 12:18:12 +0100 Subject: [PATCH 23/31] Fix to allow phpunit of migration process for 3.4 to 3.5 --- htdocs/install/upgrade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 05defaed9eb..699d4a64a99 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -19,7 +19,7 @@ * Upgrade scripts can be ran from command line with syntax: * * cd htdocs/install - * php upgrade.php 3.4.0 3.5.0 + * php upgrade.php 3.4.0 3.5.0 [dirmodule|ignoredbversion] * php upgrade2.php 3.4.0 3.5.0 * * Return code is 0 if OK, >0 if error @@ -54,7 +54,8 @@ $setuplang=GETPOST("selectlang",'',3)?GETPOST("selectlang",'',3):'auto'; $langs->setDefaultLang($setuplang); $versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); $versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); -$versionmodule=GETPOST("versionmodule",'',3)?GETPOST("versionmodule",'',3):(empty($argv[3])?'':$argv[3]); +$versionmodule=(GETPOST("versionmodule",'',3) && GETPOST("versionmodule",'',3) != 'ignoredbversion')?GETPOST("versionmodule",'',3):((empty($argv[3]) || $argv[3] == 'ignoredbversion')?'':$argv[3]); +$ignoredbversion=(GETPOST('ignoredbversion','',3)=='ignoredbversion')?GETPOST('ignoredbversion','',3):((empty($argv[3]) || $argv[3] != 'ignoredbversion')?'':$argv[3]); $langs->load("admin"); $langs->load("install"); From b46aec8e7e9eca19cb1739f94fe99267298b4a26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 12:18:26 +0100 Subject: [PATCH 24/31] Fix to allow phpunit of migration process for 3.5 to 3.6 --- htdocs/install/upgrade.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 9b15d36ffe9..c8190ec611b 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -55,6 +55,9 @@ $langs->setDefaultLang($setuplang); $versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($argv[1])?'':$argv[1]); $versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $versionmodule=GETPOST("versionmodule",'',3)?GETPOST("versionmodule",'',3):(empty($argv[3])?'':$argv[3]); +$versionmodule=(GETPOST("versionmodule",'',3) && GETPOST("versionmodule",'',3) != 'ignoredbversion')?GETPOST("versionmodule",'',3):((empty($argv[3]) || $argv[3] == 'ignoredbversion')?'':$argv[3]); +$ignoredbversion=(GETPOST('ignoredbversion','',3)=='ignoredbversion')?GETPOST('ignoredbversion','',3):((empty($argv[3]) || $argv[3] != 'ignoredbversion')?'':$argv[3]); + $langs->load("admin"); $langs->load("install"); From 0f7fd47a44097c337587c4f1d7aa2f6213208487 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 13:05:10 +0100 Subject: [PATCH 25/31] Clean changelog --- ChangeLog | 113 +++++++++++++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c30752cb3a..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,7 +132,18 @@ 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: From d02c261d2e2137dac5124dc6fc64a2e3d086eb50 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 18:13:41 +0100 Subject: [PATCH 26/31] Fix perf test was using a not existing js file. --- htdocs/admin/system/perf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,*/ From d5fa91f7ba22595dc7a26fd5501fc0d65629bcc5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 Jan 2016 20:48:19 +0100 Subject: [PATCH 27/31] Fix several bugs in css and in jmobile usage --- htdocs/core/class/doleditor.class.php | 2 +- htdocs/core/class/html.form.class.php | 2 ++ htdocs/core/tpl/contacts.tpl.php | 8 ++++---- htdocs/expensereport/card.php | 8 ++++---- htdocs/main.inc.php | 28 +++++++++++++++++--------- htdocs/theme/eldy/style.css.php | 21 +++++++++---------- htdocs/theme/md/img/searchclear.png | Bin 143 -> 356 bytes htdocs/theme/md/style.css.php | 9 +++++---- 8 files changed, 45 insertions(+), 33 deletions(-) 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..dc3166f274d 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.='
'; } } 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/main.inc.php b/htdocs/main.inc.php index 1da5fa8f864..eaa2e3142e3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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 ''; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 6592e5e4116..0fa9357bd78 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?'8':'20'):'24')); ?>px; + margin-: dol_optimize_smallscreen)?'12':'8')); ?>px; dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'; ?> } @@ -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; @@ -3758,6 +3754,9 @@ 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; } +.ui-select { + display: inline-block; +} .fiche .ui-controlgroup { margin: 0px; padding-bottom: 0px; @@ -3841,7 +3840,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; @@ -3870,7 +3869,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/searchclear.png b/htdocs/theme/md/img/searchclear.png index 5715b64beed38049a6f48d0aed63fc5016d46290..12437f848238b68f5e1b716b5f56a7a5fe076df1 100644 GIT binary patch delta 329 zcmV-P0k-~+0ptRZB!2;OQb$4nuFf3k00002VoOIv0RM-N%)bBt010qNS#tmY3ljhU z3ljkVnw%H_000McNliru-vtgA1Qi!sXafKM0O(0XK~yNumC_+k!f_DB@y|~u#YS*5 zndpLvra_Z$fLSzHtwbyoj6^W_3J8oq(&9#8V-6ElHiC)C#D7isS=>PWPV{NF``+EN zyW{_z>g_{DR7ga2Sucx;RdF%UWWfb3|9i=bz`%z z4=B-xR|#CQAE5+~GKdn&6hSTO0g^pdol_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; @@ -3683,7 +3684,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; @@ -3712,7 +3713,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; From 96e5651ed557df3898c1798699a5186f45c21b76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Jan 2016 14:38:47 +0100 Subject: [PATCH 28/31] Fix missing field on list. Restor ability to search on supplier ref. --- htdocs/core/search_page.php | 8 ---- htdocs/product/list.php | 78 ++++++++++++++++++++++++++++++------- 2 files changed, 64 insertions(+), 22 deletions(-) diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index fa63a9e9c06..e412aa68e5e 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -89,14 +89,6 @@ if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! em $nbofsearch++; } -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->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire) { $langs->load("members"); 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 '
' . $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 '
'; 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) From abe3f192fabf5303041d6e65db31e56d3b8afd90 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Jan 2016 16:23:23 +0100 Subject: [PATCH 29/31] Debug and fix when using dolibarr with jmobile --- htdocs/compta/recap-compta.php | 12 ++-- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/search_page.php | 81 ++++++++++++++++++--------- htdocs/fourn/recap-fourn.php | 42 ++++---------- htdocs/main.inc.php | 24 +------- htdocs/societe/list.php | 8 +-- htdocs/theme/eldy/style.css.php | 15 +++-- htdocs/theme/md/style.css.php | 17 +++--- 8 files changed, 97 insertions(+), 104 deletions(-) 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 '
'; + 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.'
'; @@ -226,10 +227,7 @@ if ($socid > 0) } print "
"; - print "
"; } - - print '
'; } else { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index dc3166f274d..efc994a0446 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4850,7 +4850,7 @@ class Form
-
    +
      '.$lis.'
diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index e412aa68e5e..0d9beadee90 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -66,40 +66,69 @@ $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)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $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) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $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->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->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) + { + $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) + { + $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) + { + $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; @@ -113,7 +142,7 @@ print $searchform; print '
'."\n"; //print '
'; print ''; -print "\n"; +print "\n\n"; print ''; print ''."\n"; 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 "\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/main.inc.php b/htdocs/main.inc.php index eaa2e3142e3..15f38504971 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1683,33 +1683,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"; 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 ''; + 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 ''; } @@ -702,7 +702,7 @@ if ($resql) } // Type (customer/prospect/supplier) - print ''; + print ''; print '