From 30bfb0eee3c8c827f92662e0f5648c7753259711 Mon Sep 17 00:00:00 2001 From: AlainRnet Date: Tue, 22 Sep 2015 09:40:13 +0200 Subject: [PATCH 01/21] Update categorie.php voir https://github.com/Dolibarr/dolibarr/pull/3562 --- htdocs/categories/categorie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 083edbf6b7e..ee486b0370e 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -419,7 +419,7 @@ else if ($id || $ref) // Ref print ''.$langs->trans("Ref").''; print ''; - print $form->showrefnav($member,'id'); + print $form->showrefnav($member,'id','','1','rowid','ref','','&type='.$type); print ''; // Login From a70e73a963be33d0100b01bce011e44b17f5e7be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Sep 2015 01:08:23 +0200 Subject: [PATCH 02/21] FIX Missing validate button if permission are not valid. --- htdocs/comm/propal.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 504e5adb0b2..31603acc5a1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2164,18 +2164,20 @@ if ($action == 'create') if ($action != 'statut' && $action != 'editline') { // Validate - if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0 && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) + if ($object->statut == Propal::STATUS_DRAFT && $object->total_ttc >= 0 && count($object->lines) > 0) + { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->propal->propal_advance->validate))) - ) { - if (count($object->lines) > 0) + { print ''; - // else print ''.$langs->trans('Validate').''; + } + else + print ''; } // Create event if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. { - print '' . $langs->trans("AddAction") . ''; + print ''; } // Edit if ($object->statut == Propal::STATUS_VALIDATED && $user->rights->propal->creer) { From 8309ed5c126b2ff230faabe9a0f9c980b4cf71b4 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Wed, 23 Sep 2015 09:24:49 +0200 Subject: [PATCH 03/21] FIX: When filter with empty status, by default get canceled status (-1) --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 6af44d4a7d6..db11df409f6 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -338,7 +338,7 @@ if ($resql) print ''; print ''; $liststatus=array('0'=>$langs->trans("StatusOrderDraftShort"), '1'=>$langs->trans("StatusOrderValidated"), '2'=>$langs->trans("StatusOrderSentShort"), '3'=>$langs->trans("StatusOrderToBill"), '4'=>$langs->trans("StatusOrderProcessed"), '-1'=>$langs->trans("StatusOrderCanceledShort")); - print $form->selectarray('viewstatut', $liststatus, $viewstatut, 1); + print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4); print ''; print ''; print ''; From 3ff8b3e4373a591f43a0ac0efdedbf2eeedb3ebf Mon Sep 17 00:00:00 2001 From: fmarcet Date: Wed, 23 Sep 2015 10:23:29 +0200 Subject: [PATCH 04/21] FIX: Error retrieving customer prices --- htdocs/product/class/productcustomerprice.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 1bca4579070..d5d75e82254 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -307,8 +307,8 @@ class Productcustomerprice extends CommonObject { global $langs; - if (! empty($sortfield)) $sortfield = "t.rowid"; - if (! empty($sortorder)) $sortorder = "DESC"; + if ( empty($sortfield)) $sortfield = "t.rowid"; + if ( empty($sortorder)) $sortorder = "DESC"; $sql = "SELECT"; $sql .= " t.rowid,"; From 12a08ae4e1f241cd79c7b49947c7a18e376e5e28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Sep 2015 10:25:06 +0200 Subject: [PATCH 05/21] Prepare 3.8.1 --- build/makepack-howto.txt | 6 ++---- htdocs/filefunc.inc.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 173c01c6f8b..813db9bb4b8 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -10,13 +10,12 @@ beta version of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z-w in htdocs/filefunc.inc.php -- Update version number with x.y.z-w in build/debian/changelog - Commit all changes. -- Add a Tag (x.y.z-beta) and push it: git push --tags -- Create a branch (x.y). - Run makepack-dolibarr.pl to generate all packages. +- Create a branch (x.y), if version seems stable enough. + - Move build files into www.dolibarr.org web site (/home/dolibarr/wwwroot/files/lastbuild). @@ -31,7 +30,6 @@ complete release of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z in htdocs/filefunc.inc.php -- Update version number with x.y.z in build/debian/changelog - Commit all changes. - Run makepack-dolibarr.pl to generate all packages. diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 1898b50e693..ea369d8aff3 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,7 +30,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.0'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.1'); if (! defined('EURO')) define('EURO',chr(128)); From 84fa92045c549bc8070f31439572567f571d024b Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Sep 2015 12:10:38 +0200 Subject: [PATCH 06/21] FIX : avoid SQL error when no sortfield send to method --- htdocs/product/class/productcustomerprice.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 1bca4579070..dd072e19a2f 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -351,8 +351,9 @@ class Productcustomerprice extends CommonObject } } } - - $sql.= $this->db->order($sortfield, $sortorder); + if (!empty($sortfield)) { + $sql.= $this->db->order($sortfield, $sortorder); + } if (! empty($limit)) $sql .= ' ' . $this->db->plimit($limit + 1, $offset); dol_syslog(get_class($this) . "::fetch_all", LOG_DEBUG); From 206d6d0f7ef027820cb0c1335dbf29b22706ee23 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Sep 2015 13:17:58 +0200 Subject: [PATCH 07/21] FIX : avoid SQL error in getValueFrom common object when all params are not send --- htdocs/core/class/commonobject.class.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 16ebb0e77e9..1a29103239f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1083,18 +1083,18 @@ abstract class CommonObject function getValueFrom($table, $id, $field) { $result=false; - - $sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table; - $sql.= " WHERE rowid = ".$id; - - dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $row = $this->db->fetch_row($resql); - $result = $row[0]; - } - + if (!empty($id) && !empty($field) && !empty($table)) { + $sql = "SELECT ".$field." FROM ".MAIN_DB_PREFIX.$table; + $sql.= " WHERE rowid = ".$id; + + dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $row = $this->db->fetch_row($resql); + $result = $row[0]; + } + } return $result; } From f3a28682eaeda0a7de9b0a3475b4b44e632d7330 Mon Sep 17 00:00:00 2001 From: tysauron Date: Wed, 23 Sep 2015 01:24:30 +0200 Subject: [PATCH 08/21] For not error Undefined property: stdClass::$MAIN_AGENDA_EXPORT_CACHE --- htdocs/core/lib/xcal.lib.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 5927bf97674..14cda539291 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -59,12 +59,14 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile) fwrite($calfileh,"CALSCALE:GREGORIAN\n"); fwrite($calfileh,"X-WR-CALNAME:".$encoding.format_cal($format,$title)."\n"); fwrite($calfileh,"X-WR-CALDESC:".$encoding.format_cal($format,$desc)."\n"); - $hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour'); - $mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min'); - $ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec'); //fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n"); if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE) - && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); + && $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){ + $hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour'); + $mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min'); + $ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec'); + fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n"); + } foreach ($events_array as $date => $event) { From 9e185eec75599db024636c8665fac780c8b6ed00 Mon Sep 17 00:00:00 2001 From: philippe Date: Thu, 24 Sep 2015 15:29:17 +0200 Subject: [PATCH 09/21] FIX: order ref must not be translated --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 8beae962d09..5ee6657841a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1743,7 +1743,7 @@ function pdf_getLinkedObjects($object,$outputlangs) else // We show both info of order and shipment { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder") . ' / ' . $outputlangs->transnoentities("RefSending"); - $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($order->ref) . ($order->ref_client ? ' ('.$order->ref_client.')' : ''); + $linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref) . ($order->ref_client ? ' ('.$order->ref_client.')' : ''); $linkedobjects[$objecttype]['ref_value'].= ' / ' . $outputlangs->transnoentities($elementobject->ref); $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate") . ' / ' . $outputlangs->transnoentities("DateSending"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($order->date,'day','',$outputlangs); From b5b90d1639ec089dfea94d253b5a8df58ede67fe Mon Sep 17 00:00:00 2001 From: fmarcet Date: Fri, 25 Sep 2015 08:50:00 +0200 Subject: [PATCH 10/21] FIX #3599 Not saving legal form --- htdocs/admin/company.php | 4 ++-- htdocs/societe/soc.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 17c1414106e..b546cf235fb 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -414,9 +414,9 @@ if ($action == 'edit' || $action == 'updateedit') // Forme juridique $var=!$var; - print ''; + print ''; if ($mysoc->country_code) { - print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'legal_form'); + print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); } else { print $countrynotdefined; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 97adcf008a1..771c8aa87e8 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1203,11 +1203,11 @@ else print ''; // Legal Form - print ''.fieldLabel('JuridicalStatus','legal_form').''; + print ''.fieldLabel('JuridicalStatus','forme_juridique_code').''; print ''; if ($object->country_id) { - print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'legal_form'); + print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); } else { @@ -1786,8 +1786,8 @@ else print ''; // Juridical type - print ''.fieldLabel('JuridicalStatus','legal_form').''; - print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'legal_form'); + print ''.fieldLabel('JuridicalStatus','forme_juridique_code').''; + print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); print ''; // Capital From c0433928c69166a8bfd97726f6e5941eaf75f821 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Sep 2015 11:28:49 +0200 Subject: [PATCH 11/21] FIX sortder field was missing so manually added values were moved to begin. --- htdocs/admin/dict.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 17c8bcae048..7cd094b32df 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -151,7 +151,7 @@ $tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country a $tabsql[9] = "SELECT c.code_iso as code, c.label, c.unicode, c.active FROM ".MAIN_DB_PREFIX."c_currencies AS c"; $tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, c.label as country, c.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; -$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; +$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.nbjour, c.fdm, c.decalage, c.active, c.sortorder FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; $tabsql[13]= "SELECT c.id as rowid, c.code, c.libelle, c.type, c.active, c.accountancy_code FROM ".MAIN_DB_PREFIX."c_paiement AS c"; $tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, c.code as country_code, c.label as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_country as c WHERE e.fk_pays=c.rowid and c.active=1"; $tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format"; @@ -215,7 +215,7 @@ $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[11]= "element,source,code,libelle"; -$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfield[13]= "code,libelle,type,accountancy_code"; $tabfield[14]= "code,libelle,price,organization,country_id,country"; $tabfield[15]= "code,libelle,width,height,unit"; @@ -247,7 +247,7 @@ $tabfieldvalue[8] = "code,libelle,country"; $tabfieldvalue[9] = "code,label,unicode"; $tabfieldvalue[10]= "country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldvalue[11]= "element,source,code,libelle"; -$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfieldvalue[13]= "code,libelle,type,accountancy_code"; $tabfieldvalue[14]= "code,libelle,price,organization,country"; $tabfieldvalue[15]= "code,libelle,width,height,unit"; @@ -279,7 +279,7 @@ $tabfieldinsert[8] = "code,libelle,fk_country"; $tabfieldinsert[9] = "code_iso,label,unicode"; $tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfieldinsert[11]= "element,source,code,libelle"; -$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; +$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder"; $tabfieldinsert[13]= "code,libelle,type,accountancy_code"; $tabfieldinsert[14]= "code,libelle,price,organization,fk_pays"; $tabfieldinsert[15]= "code,label,width,height,unit"; @@ -1595,6 +1595,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='') if ($fieldlist[$field]=='accountancy_code') $size='size="10" '; if ($fieldlist[$field]=='accountancy_code_sell') $size='size="10" '; if ($fieldlist[$field]=='accountancy_code_buy') $size='size="10" '; + if ($fieldlist[$field]=='sortorder') $size='size="2" '; print ''; print ''; } From 9d0cd148a890a85956412e88fcfb62a2baf79dd5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 Sep 2015 11:47:24 +0200 Subject: [PATCH 12/21] Fix duplicate log --- htdocs/categories/class/categorie.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index e79abfd9d3d..66db4144f91 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -222,6 +222,8 @@ class Categorie extends CommonObject $error=0; + dol_syslog(get_class($this).'::create', LOG_DEBUG); + // Clean parameters $this->label = trim($this->label); $this->description = trim($this->description); @@ -239,7 +241,6 @@ class Categorie extends CommonObject $this->db->begin(); - dol_syslog(get_class($this).'::create', LOG_DEBUG); $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie ("; $sql.= "fk_parent,"; $sql.= " label,"; @@ -266,7 +267,6 @@ class Categorie extends CommonObject $sql.= $conf->entity; $sql.= ")"; - dol_syslog(get_class($this).'::create', LOG_DEBUG); $res = $this->db->query($sql); if ($res) { From df0e64eb7c7c81cbcd14d5b3f64e658d56f07dc7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 26 Sep 2015 07:59:06 +0200 Subject: [PATCH 13/21] Fix centering on login page --- htdocs/theme/amarok/style.css.php | 11 ++++++++++- htdocs/theme/auguria/style.css.php | 10 ++++++---- htdocs/theme/bureau2crea/style.css.php | 14 +++++++++----- htdocs/theme/cameleo/style.css.php | 11 ++++++++--- htdocs/theme/md_exp/style.css.php | 8 ++++---- 5 files changed, 37 insertions(+), 17 deletions(-) diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 80f64e41561..591feac5fca 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -320,6 +320,7 @@ th .button { } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -458,6 +459,10 @@ div.tmenu ul li a.tmenusel {/* texte du menu principal sélectionné */ body.body center { color:white; margin-top: 100px; } +.login_vertical_align { + padding: 10px; +} + form#login { border:solid 1px rgba(0,0,0,.4); border-top:solid 1px #ffffff; @@ -515,6 +520,10 @@ form#login table.login_table { background:none !important; } +.login_main_message { + text-align: center; +} + div#login_left, div#login_right { display: inline-block; min-width: 220px; @@ -522,7 +531,7 @@ div#login_left, div#login_right { vertical-align: middle; } -table.login_table { background-color: red !important;} +table.login_table { margin: 0px auto; background-color: red !important;} table.login_table tr td {vertical-align:middle;} table.login_table tr.vmenu td {font-size:18px;} table.login_table tr td a {color:#333333 !important;} diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index d1dd0ab4091..5e2af9e2eb2 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -226,6 +226,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -542,7 +543,9 @@ foreach($mainmenuusedarray as $val) /* Login */ - +.login_vertical_align { + padding: 10px; +} form#login { margin-top: px; margin-bottom: 30px; @@ -557,9 +560,8 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - padding:12px; - margin-left: 10px; - margin-right: 10px; + padding: 12px; + margin: 0px auto; /* Center */ max-width: 540px; border: 1px solid #C0C0C0; background-color: #E0E0E0; diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index eee7afcb9c0..f74326d908d 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -251,6 +251,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -566,15 +567,19 @@ li.tmenu a.tmenudisabled { /* Login */ - +.login_vertical_align { + padding: 10px; +} +.login_main_message { + text-align: center; +} form#login { margin-top: px; margin-bottom: 30px; font-size: 13px; } .login_table_title { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; max-width: 540px; color: #888888; text-shadow: 1px 1px 1px #FFF; @@ -583,8 +588,7 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; /* Center */ padding:12px; max-width: 540px; border: 1px solid #C0C0C0; diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 4b8955953bd..0fcecf98e32 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -227,6 +227,7 @@ div.floatright } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -637,7 +638,12 @@ foreach($mainmenuusedarray as $val) /* Login */ - +.login_vertical_align { + padding: 10px; +} +.login_main_message { + text-align: center; +} form#login { margin-top: px; margin-bottom: 30px; @@ -652,8 +658,7 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; /* Center */ padding:12px; max-width: 540px; border: 1px solid #C0C0C0; diff --git a/htdocs/theme/md_exp/style.css.php b/htdocs/theme/md_exp/style.css.php index bd70786dab4..fb84b7341e1 100644 --- a/htdocs/theme/md_exp/style.css.php +++ b/htdocs/theme/md_exp/style.css.php @@ -401,6 +401,7 @@ textarea.centpercent { } .center { text-align: center; + margin: 0px auto; } .left { text-align: ; @@ -598,8 +599,8 @@ div.ficheaddleft { else print "margin-top: 10px;\n"; ?> } .containercenter { -display : table; -margin : 0px auto; + display : table; + margin : 0px auto; } #pictotitle { @@ -912,8 +913,7 @@ form#login { text-shadow: 1px 1px 1px #FFF; } .login_table { - margin-left: 10px; - margin-right: 10px; + margin: 0px auto; /* Center */ padding-left:6px; padding-right:6px; padding-top:16px; From 8dcd6158e324eb8cc7579f6aee7832ab2d33cf58 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 26 Sep 2015 10:15:42 +0200 Subject: [PATCH 14/21] 3.8 bad filtering caused by statut filter #3580 correction ported on 3.8 too, sorry for the bad step process --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d88f72f171e..a32ec3384ee 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -191,7 +191,7 @@ if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcusto if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1); -if ($search_status != '') $sql.= " AND f.fk_statut = '".$db->escape($search_status)."'"; +if ($search_status >= 0 ) $sql.= " AND f.fk_statut = ".$db->escape($search_status); if ($month > 0) { if ($year > 0 && empty($day)) From f3ba115ef06ccba863ea6d832a1b7c0c355584b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 10:53:59 +0200 Subject: [PATCH 15/21] Fix missing default value --- htdocs/core/modules/modProjet.class.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index a4faa746c8e..6ac8b877ad6 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -114,7 +114,23 @@ class modProjet extends DolibarrModules $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/tasks"; $this->const[$r][3] = ""; $this->const[$r][4] = 0; - + $r++; + + $this->const[$r][0] = "PROJECT_USE_OPPORTUNIES"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = ""; + $this->const[$r][4] = 0; + $r++; + + /* not required (0 = not present) + $this->const[$r][0] = "PROJECT_HIDE_TASKS"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "0"; + $this->const[$r][3] = ""; + $this->const[$r][4] = 0; + */ + // Boxes $this->boxes = array(); $r=0; From 5f765419ea10d61c69e9fb64ea296633ac10bbc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 11:04:17 +0200 Subject: [PATCH 16/21] Fix because project module introduced opportunity, user may create project (opportunity) even when thirdparty does not exists yet, so we must provide a solution for this. --- htdocs/projet/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 24968839960..a3343f88e16 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -466,6 +466,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithtooltip($text.' '.img_help(),$texthelp,1); } else print $text; + print ' '.$langs->trans("AddThirdParty").''; print ''; // Status From a3647bea4eaf2c67ae22c291edde71e4318fc02a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 11:53:36 +0200 Subject: [PATCH 17/21] Fix bad information in report --- htdocs/compta/tva/clients.php | 40 +++++++++++++++++++++++++++++++---- htdocs/core/lib/tax.lib.php | 2 +- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 0625dd4978d..9a7166b7892 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -100,6 +100,10 @@ if ($user->societe_id) { } $result = restrictedArea($user, 'tax', '', '', 'charges'); +// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES') +$modecompta = $conf->global->ACCOUNTING_MODE; +if (GETPOST("modecompta")) $modecompta=GETPOST("modecompta"); + /* @@ -292,7 +296,14 @@ if (is_array($coll_list)) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; } else { @@ -377,7 +388,14 @@ if (is_array($coll_list)) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; } else { @@ -457,7 +475,14 @@ if ($special_report) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else { if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; @@ -530,7 +555,14 @@ if ($special_report) { } else { $langs->load("errors"); if ($coll_list == -1) { - print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + if ($modecompta == 'CREANCES-DETTES') + { + print '' . $langs->trans("ErrorNoAccountancyModuleLoaded") . ''; + } + else + { + print '' . $langs->trans("FeatureNotYetAvailable") . ''; + } } else { if ($coll_list == -2) { print '' . $langs->trans("FeatureNotYetAvailable") . ''; diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index b2b99d34d3b..2387332e670 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -79,7 +79,7 @@ function tax_prepare_head(ChargeSociales $object) * @param int $y Year * @param string $date_start Start date * @param string $date_end End date - * @param int $modetax 0 or 1 (option vat on debit) + * @param int $modetax 0 or 1 (option vat on debit, 1 => $modecompta = 'CREANCES-DETTES') * @param string $direction 'sell' or 'buy' * @param int $m Month * @return array List of customers third parties with vat, -1 if no accountancy module, -2 if not yet developped, -3 if error From c707c899c1db7bd0109f2a6ac3eb5db8bd259448 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 13:22:05 +0200 Subject: [PATCH 18/21] Fix remove warning --- 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 c979f734b5e..14af958ff51 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -94,7 +94,7 @@ function societe_prepare_head(Societe $object) }*/ // Tab to link resources - if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) + if (! empty($conf->resource->enabled) && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=societe&element_id='.$object->id; $head[$h][1] = $langs->trans("Resources"); From dd88a799fb0c18d966571fc3f5fae8ee2b7e4bd8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 13:49:36 +0200 Subject: [PATCH 19/21] FIX Event from ical stream should not be movable into calendar view --- htdocs/comm/action/index.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f445c7f3596..5366720bfc6 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1210,7 +1210,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; } - else if ($event->type_code == 'ICALEVENT') + else if ($event->type_code == 'ICALEVENT') // Event come from external ical file { $numical++; if (! empty($event->icalname)) { @@ -1220,7 +1220,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numicals[dol_string_nospecial($event->icalname)]++; } $color=$event->icalcolor; - $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unmovable'); + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } else if ($event->type_code == 'BIRTHDAY') { @@ -1266,6 +1266,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { $cssclass.= " unmovable"; } + else if ($event->type_code == 'ICALEVENT') + { + $cssclass.= " unmovable"; + } else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar)) { $tmpyearend = date('Y',$event->date_end_in_calendar); From 9ecc8e5e6bcef48691fd82ec7a63331f9f88e58c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 14:11:39 +0200 Subject: [PATCH 20/21] FIX Regression on bad use of fk_account showing the bad bank account on PDF. --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 5 +++-- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 3 ++- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index cc1e6aeedca..d91f2418400 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -771,9 +771,10 @@ class pdf_einstein extends ModelePDFCommandes // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 48be2c907c8..ecedfd2092a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -958,9 +958,10 @@ class pdf_crabe extends ModelePDFFactures // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_account) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index d54b175750c..7fb02fe0514 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -917,9 +917,10 @@ class pdf_azur extends ModelePDFPropales // If payment mode not forced or forced to VIR, show payment with BAN if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR') { - if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) + if (! empty($object->fk_account) || ! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER)) { - $bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank); + $bankid=(empty($object->fk_account)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_account); + if (! empty($object->fk_bank)) $bankid=$object->fk_bank; // For backward compatibility when object->fk_account is forced with object->fk_bank $account = new Account($this->db); $account->fetch($bankid); From 6aa13d418902031f181921d785c4e9c504357172 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Sep 2015 16:34:43 +0200 Subject: [PATCH 21/21] Fix the $colorbackvmenu2 was removed with 3.8 --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 7ecf63b1000..90f4c6a6109 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1135,7 +1135,7 @@ div.blockvmenusearch padding-top: 3px; padding-bottom: 3px; margin: 1px 0px 8px 2px; - background: rgb(); + background: rgb(); border-left: 1px solid #AAA; border-right: 1px solid #CCC;