From c9886fb86dbcee85158dd24177cc0bf963e5806a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 31 Aug 2012 16:50:46 +0200 Subject: [PATCH 01/49] Fix: same size of view lines --- htdocs/core/tpl/objectline_add.tpl.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php index f24a256df6a..a9e01947861 100644 --- a/htdocs/core/tpl/objectline_add.tpl.php +++ b/htdocs/core/tpl/objectline_add.tpl.php @@ -26,14 +26,14 @@ */ ?> - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
trans('AddNewLine'); ?> - trans('VAT'); ?> - trans('PriceUHT'); ?> - trans('PriceUTTC'); ?> - trans('Qty'); ?> - trans('ReductionShort'); ?> + trans('VAT'); ?> + trans('PriceUHT'); ?> + trans('PriceUTTC'); ?> + trans('Qty'); ?> + trans('ReductionShort'); ?> - + From 9c13f81bef451720a1e64197e18f1c17de5c0097 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 31 Aug 2012 18:38:01 +0200 Subject: [PATCH 02/49] Trans --- htdocs/langs/el_GR/compta.lang | 6 ------ htdocs/langs/en_US/compta.lang | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/langs/el_GR/compta.lang b/htdocs/langs/el_GR/compta.lang index 0a6b4ee47b3..356ea6907b4 100644 --- a/htdocs/langs/el_GR/compta.lang +++ b/htdocs/langs/el_GR/compta.lang @@ -4,14 +4,8 @@ Accountancy=Λογιστική AccountancyCard=Καρτέλα λογιστικής Treasury=Περιουσιακά MenuFinancial=Οικονομικά -TaxModuleSetupToModifyRules=Go to module setup to modify rules for calculation OptionMode=Επιλογές λογιστικής OptionModeTrue=Επιλογές εσόδων-εξόδων -OptionModeVirtual=Option Credits-Debits -OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). \nThe validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. -OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. -FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) -VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. Param=Παραμετροποίηση AccountsGeneral=Λογαριασμοί Account=Λογαριασμός diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index c45fab84a99..a74ea55ddd1 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -8,7 +8,7 @@ TaxModuleSetupToModifyRules=Go to module setup to modify rules OptionMode=Option for accountancy OptionModeTrue=Option Incomes-Expenses OptionModeVirtual=Option Claims-Debts -OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). \nThe validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. +OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). The validity of the figures is assured only if the book-keeping is scrutinized through the input/output on the accounts via invoices. OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. From 56a620bc88016779cb370b39214153e8ee0c65c3 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 31 Aug 2012 19:07:47 +0200 Subject: [PATCH 03/49] fix: wrong link --- htdocs/comm/action/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index aec3b331d45..4672e9f8367 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -809,7 +809,7 @@ if ($id) // Affichage fiche action en mode visu print ''; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; // Ref print ''; print ''; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerVersion")." : $version"); - //print ''; + + // Test database version + $versionmindb=getStaticMember(get_class($db),'versionmin'); + //print join('.',$versionarray).' - '.join('.',$versionmindb); + if (count($versionmindb) && count($versionarray) + && versioncompare($versionarray,$versionmindb) < 0) + { + // Warning: database version too low. + print "\n"; + dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorDatabaseVersionTooLow",join('.',$versionarray),join('.',$versionmindb))); + $ok=0; + } + } // Force l'affichage de la progression - print ''; - flush(); - + if ($ok) + { + print ''; + flush(); + } /* * Delete duplicates in table categorie_association */ - $couples=array(); - $filles=array(); - $sql = "SELECT fk_categorie_mere, fk_categorie_fille"; - $sql.= " FROM ".MAIN_DB_PREFIX."categorie_association"; - dolibarr_install_syslog("upgrade: search duplicate sql=".$sql); - $resql = $db->query($sql); - if ($resql) + if ($ok) { - $num=$db->num_rows($resql); - while ($obj=$db->fetch_object($resql)) - { - if (! isset($filles[$obj->fk_categorie_fille])) // Only one record as child (a child has only on parent). - { - if ($obj->fk_categorie_mere != $obj->fk_categorie_fille) - { - $filles[$obj->fk_categorie_fille]=1; // Set record for this child - $couples[$obj->fk_categorie_mere.'_'.$obj->fk_categorie_fille]=array('mere'=>$obj->fk_categorie_mere, 'fille'=>$obj->fk_categorie_fille); - } - } - } + $couples=array(); + $filles=array(); + $sql = "SELECT fk_categorie_mere, fk_categorie_fille"; + $sql.= " FROM ".MAIN_DB_PREFIX."categorie_association"; + dolibarr_install_syslog("upgrade: search duplicate sql=".$sql); + $resql = $db->query($sql); + if ($resql) + { + $num=$db->num_rows($resql); + while ($obj=$db->fetch_object($resql)) + { + if (! isset($filles[$obj->fk_categorie_fille])) // Only one record as child (a child has only on parent). + { + if ($obj->fk_categorie_mere != $obj->fk_categorie_fille) + { + $filles[$obj->fk_categorie_fille]=1; // Set record for this child + $couples[$obj->fk_categorie_mere.'_'.$obj->fk_categorie_fille]=array('mere'=>$obj->fk_categorie_mere, 'fille'=>$obj->fk_categorie_fille); + } + } + } - dolibarr_install_syslog("upgrade: result is num=".$num." count(couples)=".count($couples)); + dolibarr_install_syslog("upgrade: result is num=".$num." count(couples)=".count($couples)); - // If there is duplicates couples or child with two parents - if (count($couples) > 0 && $num > count($couples)) - { - $error=0; + // If there is duplicates couples or child with two parents + if (count($couples) > 0 && $num > count($couples)) + { + $error=0; - $db->begin(); + $db->begin(); - $sql="DELETE FROM ".MAIN_DB_PREFIX."categorie_association"; - dolibarr_install_syslog("upgrade: delete association sql=".$sql); - $resqld=$db->query($sql); - if ($resqld) - { - foreach($couples as $key => $val) - { - $sql ="INSERT INTO ".MAIN_DB_PREFIX."categorie_association(fk_categorie_mere,fk_categorie_fille)"; - $sql.=" VALUES(".$val['mere'].", ".$val['fille'].")"; - dolibarr_install_syslog("upgrade: insert association sql=".$sql); - $resqli=$db->query($sql); - if (! $resqli) $error++; - } - } + $sql="DELETE FROM ".MAIN_DB_PREFIX."categorie_association"; + dolibarr_install_syslog("upgrade: delete association sql=".$sql); + $resqld=$db->query($sql); + if ($resqld) + { + foreach($couples as $key => $val) + { + $sql ="INSERT INTO ".MAIN_DB_PREFIX."categorie_association(fk_categorie_mere,fk_categorie_fille)"; + $sql.=" VALUES(".$val['mere'].", ".$val['fille'].")"; + dolibarr_install_syslog("upgrade: insert association sql=".$sql); + $resqli=$db->query($sql); + if (! $resqli) $error++; + } + } - if (! $error) - { - print ''; - print ''; - $db->commit(); - } - else - { - print ''; - print ''; - $db->rollback(); - } - } - } - else - { - print '
'.$langs->trans("Error").'
'; + if (! $error) + { + print ''; + print ''; + $db->commit(); + } + else + { + print ''; + print ''; + $db->rollback(); + } + } + } + else + { + print '
'.$langs->trans("Error").'
'; + } } /* @@ -232,7 +250,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) */ if ($ok && preg_match('/mysql/',$db->type)) { - $versioncommande=explode('.','4.0'); + $versioncommande=array(4,0,0); if (count($versioncommande) && count($versionarray) && versioncompare($versioncommande,$versionarray) <= 0) // Si mysql >= 4.0 { diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 8b078507d7c..cd43be5c0af 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -26,6 +26,7 @@ ErrorGoBackAndCorrectParameters=Go backward and correct wrong parameters. ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'. ErrorFailedToCreateDatabase=Failed to create database '%s'. ErrorFailedToConnectToDatabase=Failed to connect to database '%s'. +ErrorDatabaseVersionTooLow=Database version (%s) too old. Version %s or higher is required. ErrorPHPVersionTooLow=PHP version too old. Version %s is required. WarningPHPVersionTooLow=PHP version too old. Version %s or more is expected. This version should allow install but is not supported. ErrorConnectedButDatabaseNotFound=Connection to server successfull but database '%s' not found. diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 83553a53b5b..2dd0216fbc8 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -26,6 +26,7 @@ ErrorGoBackAndCorrectParameters=Revenez en arrière et corrigez les paramètres ErrorWrongValueForParameter=Vous avez peut-être saisi une mauvaise valeur pour le paramètre '%s'. ErrorFailedToCreateDatabase=Echec de création de la base '%s'. ErrorFailedToConnectToDatabase=Echec de connexion à la base '%s'. +ErrorDatabaseVersionTooLow=Version de base de donnée (%s) trop ancienne. La version %s ou supérieure est requise. ErrorPHPVersionTooLow=Version de PHP trop ancienne. La version %s est requise. WarningPHPVersionTooLow=Version de PHP trop ancienne. La version %s ou plus est recommandée. Cette version reste utilisable mais n'est pas supportée. ErrorConnectedButDatabaseNotFound=Connexion au serveur réussi mais base '%s' introuvable. From 981334434655f18933b3a0232e78cd8475349780 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 2 Sep 2012 08:50:42 +0200 Subject: [PATCH 09/49] Fix: broken features and uniformize code --- htdocs/theme/bureau2crea/tpl/login.tpl.php | 155 +++------------------ 1 file changed, 18 insertions(+), 137 deletions(-) diff --git a/htdocs/theme/bureau2crea/tpl/login.tpl.php b/htdocs/theme/bureau2crea/tpl/login.tpl.php index 8d79accc79d..2fd9af9b9d7 100644 --- a/htdocs/theme/bureau2crea/tpl/login.tpl.php +++ b/htdocs/theme/bureau2crea/tpl/login.tpl.php @@ -34,10 +34,13 @@ print ''."\n"; if (constant('JS_JQUERY_UI')) print ''."\n"; // JQuery else print ''."\n"; // JQuery // JQuery. Must be before other includes +$ext='.js'; +if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x01)) $ext='.jgz'; print ''."\n"; if (constant('JS_JQUERY')) print ''."\n"; else print ''."\n"; -print ' +print ''."\n"; +print '
'.$langs->trans("Ref").''; From 44a3db8785b9b18029ed4076db256eabba740321 Mon Sep 17 00:00:00 2001 From: simnandez Date: Sat, 1 Sep 2012 17:02:38 +0200 Subject: [PATCH 04/49] Fix: Bad assignation of const for pdf delivery module name --- htdocs/install/mysql/migration/repair.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 14f8e688218..3a9673fb137 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -51,6 +51,8 @@ UPDATE llx_product SET canvas = NULL where canvas = 'default@product'; DELETE FROM llx_boxes where box_id NOT IN (SELECT rowid FROM llx_boxes_def); +DELETE FROM llx_document_model WHERE nom ='elevement' AND type='delivery'; + -- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid -- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note) From 54acdc71f6829d226e0b3cc19b0f9df87f094b56 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 1 Sep 2012 18:09:47 +0200 Subject: [PATCH 05/49] Fix: this field is for 3.3 --- htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 3b5bd43e5ad..8523fce46c5 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -455,8 +455,6 @@ ALTER TABLE llx_facture_fourn ADD COLUMN extraparams varchar(255) AFTER import_k ALTER TABLE llx_boxes ADD COLUMN maxline integer NULL; -ALTER TABLE llx_commande_fournisseur ADD COLUMN date_livraison date NULL; - ALTER TABLE llx_product_fournisseur_price MODIFY fk_product_fournisseur integer DEFAULT 0; UPDATE llx_product SET canvas = NULL where canvas = 'default@product'; From 7ff475c46238d6a69833b2a5ddbac23e0b61a558 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 1 Sep 2012 18:43:51 +0200 Subject: [PATCH 06/49] Fix: Modify spanish VAT to new rates (Juanjo) --- ChangeLog | 7 ++++++- htdocs/install/mysql/data/llx_c_tva.sql | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4736aa6f3e5..1f206656070 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ English Dolibarr ChangeLog -------------------------------------------------------------- -***** ChangeLog for 3.3 compared to 3.2.1 ***** +***** ChangeLog for 3.3 compared to 3.2.2 ***** For users: - New: If field "signature" is filled into user table, text is added at end of predefined email texts. If option MAIL_DO_NOT_USE_SIGN is on, this @@ -70,6 +70,11 @@ For translators: +***** ChangeLog for 3.2.2 compared to 3.2.1 ***** +Fix: Modify spanish VAT to new rates + + + ***** ChangeLog for 3.2.1 compared to 3.2.0 ***** - Fix: Edit of projects. - Fix: Activation of modules does not fails if directory install was removed. diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index fcb338191c6..b22295e0466 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -190,8 +190,8 @@ INSERT INTO llx_c_tva(rowid, fk_pays, taux, recuperableonly, note, active) VALUE INSERT INTO llx_c_tva(rowid, fk_pays, taux, recuperableonly, note, active) VALUES (2023, 202, '0', '0', 'VAT Rate 0', 1); -- SPAIN (id country=4) -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,note,active) values ( 41, 4, '18','0','4','VAT standard rate',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,note,active) values ( 42, 4, '8','0','1','VAT reduced rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,note,active) values ( 41, 4, '21','0','5.2','VAT standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,note,active) values ( 42, 4, '10','0','1.4','VAT reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,note,active) values ( 43, 4, '4','0','0.5','VAT super-reduced rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 44, 4, '0','0','VAT Rate 0',1); From 8613dcd26ece6841e2b71f96aff5558f0ec7bdc1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Sep 2012 19:15:08 +0200 Subject: [PATCH 07/49] Add specific README.md for DoliWamp directory of sourceforge. --- build/exe/doliwamp/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 build/exe/doliwamp/README.md diff --git a/build/exe/doliwamp/README.md b/build/exe/doliwamp/README.md new file mode 100644 index 00000000000..ca3aaa6aece --- /dev/null +++ b/build/exe/doliwamp/README.md @@ -0,0 +1,7 @@ +# DOLIWAMP, THE DOLIBARR INSTALLER FOR WINDOWS + +DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP). +It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also and all prerequisites like the web server, and the database in one autoinstall process. + +If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). + From 1ccb8f33630fb70cc9ad633579847fb87c11852f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Sep 2012 01:47:21 +0200 Subject: [PATCH 08/49] New: Add a test during upgrade if database version is too low. --- htdocs/install/upgrade.php | 142 ++++++++++++++++++-------------- htdocs/langs/en_US/install.lang | 1 + htdocs/langs/fr_FR/install.lang | 1 + 3 files changed, 82 insertions(+), 62 deletions(-) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 7f3d3be9bc9..8c6c16c7bb5 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -48,7 +48,8 @@ $versionfrom=GETPOST("versionfrom",'',3)?GETPOST("versionfrom",'',3):(empty($arg $versionto=GETPOST("versionto",'',3)?GETPOST("versionto",'',3):(empty($argv[2])?'':$argv[2]); $langs->load("admin"); -$langs->load("install"); +$langs->load("install"); +$langs->load("errors"); if ($dolibarr_main_db_type == "mysql") $choix=1; if ($dolibarr_main_db_type == "mysqli") $choix=1; @@ -152,79 +153,96 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action'))) print '
'.$langs->trans("ServerVersion").''.$version.'
'.join('.',$versionarray).'
".$langs->trans("ErrorDatabaseVersionTooLow",join('.',$versionarray),join('.',$versionmindb))."".$langs->trans("Error")."
'.$langs->trans("PleaseBePatient").'
'.$langs->trans("PleaseBePatient").'
'.$langs->trans("RemoveDuplicates").''.$langs->trans("Success").' ('.$num.'=>'.count($couples).')
'.$langs->trans("RemoveDuplicates").''.$langs->trans("Failed").'
'.$langs->trans("RemoveDuplicates").''.$langs->trans("Success").' ('.$num.'=>'.count($couples).')
'.$langs->trans("RemoveDuplicates").''.$langs->trans("Failed").'