From c6b263c586681541782f58f34a7c8c5189280649 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 13 Feb 2013 09:53:26 +0100 Subject: [PATCH 1/9] fix bug in contract update line (wrong vat variable name) --- htdocs/contrat/class/contrat.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 8cdd11fcb3c..224617c2f44 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1016,7 +1016,7 @@ class Contrat extends CommonObject // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; From 031bc911ea5b2e25efc06c7f8f418379baf5a239 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Feb 2013 16:46:28 +0100 Subject: [PATCH 2/9] Fix: Mass save or update of const fails. --- htdocs/admin/const.php | 46 +++++++++++++++++++++++++++++------- htdocs/langs/en_US/main.lang | 1 + htdocs/langs/fr_FR/main.lang | 1 + 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 0d263991714..77534fd0d76 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -35,7 +35,7 @@ $rowid=GETPOST('rowid','int'); $entity=GETPOST('entity','int'); $action=GETPOST('action','alpha'); $update=GETPOST('update','alpha'); -$delete=GETPOST('delete','alpha'); +$delete=GETPOST('delete'); // Do not use alpha here $debug=GETPOST('debug','int'); $consts=GETPOST('const'); $constname=GETPOST('constname','alpha'); @@ -47,6 +47,7 @@ $typeconst=array('yesno' => 'yesno', 'texte' => 'texte', 'chaine' => 'chaine'); $mesg=''; + /* * Actions */ @@ -68,46 +69,70 @@ if ($action == 'add') if (! $error) { - if (dolibarr_set_const($db, $constname, $constvalue, $typeconst[$consttype], 1, $constnote, $entity) < 0) + if (dolibarr_set_const($db, $constname, $constvalue, $typeconst[$consttype], 1, $constnote, $entity) >= 0) + { + setEventMessage($langs->trans("RecordSaved")); + } + else { dol_print_error($db); } } } -if (! empty($consts) && $update == $langs->trans("Modify")) +// Mass update +if (! empty($consts) && $action == 'update') { + $nbmodified=0; foreach($consts as $const) { if (! empty($const["check"])) { - if (dolibarr_set_const($db, $const["name"], $const["value"], $const["type"], 1, $const["note"], $const["entity"]) < 0) + if (dolibarr_set_const($db, $const["name"], $const["value"], $const["type"], 1, $const["note"], $const["entity"]) >= 0) + { + $nbmodified++; + } + else { dol_print_error($db); } } } + if ($nbmodified > 0) setEventMessage($langs->trans("RecordSaved")); + $action=''; } -// Delete several lines at once -if (! empty($consts) && $delete == $langs->trans("Delete")) +// Mass delete +if (! empty($consts) && $action == 'delete') { + + $nbdeleted=0; foreach($consts as $const) { if (! empty($const["check"])) // Is checkbox checked { - if (dolibarr_del_const($db, $const["rowid"], -1) < 0) + if (dolibarr_del_const($db, $const["rowid"], -1) >= 0) + { + $nbdeleted++; + } + else { dol_print_error($db); } } } + if ($nbdeleted > 0) setEventMessage($langs->trans("RecordDeleted")); + $action=''; } // Delete line from delete picto if ($action == 'delete') { - if (dolibarr_del_const($db, $rowid, $entity) < 0) + if (dolibarr_del_const($db, $rowid, $entity) >= 0) + { + setEventMessage($langs->trans("RecordDeleted")); + } + else { dol_print_error($db); } @@ -130,11 +155,13 @@ jQuery(document).ready(function() { jQuery("#delconst").hide(); jQuery(".checkboxfordelete").click(function() { jQuery("#delconst").show(); + jQuery("#action").val('delete'); }); jQuery(".inputforupdate").keypress(function() { var field_id = jQuery(this).attr("id"); var row_num = field_id.split("_"); jQuery("#updateconst").show(); + jQuery("#action").val('update'); jQuery("#check_" + row_num[1]).attr("checked",true); }); }); @@ -195,7 +222,8 @@ print ''; print "\n"; print '
entity) && $debug)?'?debug=1':'').'" method="POST">'; -print ''; +print ''; +print ''; // Show constants $sql = "SELECT"; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index dc2ee6b225e..98c28b231b2 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -58,6 +58,7 @@ NbOfEntries=Nb of entries GoToWikiHelpPage=Read online help (need Internet access) GoToHelpPage=Read help RecordSaved=Record saved +RecordDeleted=Record deleted LevelOfFeature=Level of features NotDefined=Not defined DefinedAndHasThisValue=Defined and value to diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index e402a8cd1fe..301b97c1e3a 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -58,6 +58,7 @@ NbOfEntries=Nb d'entrées GoToWikiHelpPage=Consulter l'aide (nécessite un accès internet) GoToHelpPage=Consulter l'aide RecordSaved=Enregistrement sauvegardé +RecordDeleted=Enregistrement supprimé LevelOfFeature=Niveau de fonctionnalités NotDefined=Non défini DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr est configuré en mode authentification %s dans son fichier de configuration conf.php.
Cela signifie que la base des mots de passe est externe à Dolibarr, aussi toute modification de ce champ peut s'avérer sans effet. From 365680d90eab9faee8d37b4bdc21e0ee2b0873a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Feb 2013 21:25:17 +0100 Subject: [PATCH 3/9] Fix: Missing vat rates --- htdocs/install/mysql/data/llx_c_tva.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 8b840baf392..4e301564db8 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -67,6 +67,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (141, 14, '7','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (142, 14, '0','0','VAT Rate 0',1); +-- CAMEROUN (id country=24) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (241, 24, '19.25','0','VAT standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (242, 24, '0','0','VAT Rate 0',1); + -- CHILE (id country=67) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (671, 67, '19','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (672, 67, '0','0','VAT Rate 0',1); @@ -151,6 +155,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (17 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1662, 166, '15','0','VAT standard rate', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1663, 166, '0','0','VAT Rate 0', 1); +-- NIGERIA (id country=169) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1692, 169, '5','0','VAT standard rate', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1693, 169, '0','0','VAT Rate 0', 1); + -- NORWAY (id country=173) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1731, 173, '25','0','VAT standard rate', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1732, 173, '14','0','VAT reduced rate', 1); From f043fcfaf7c99644c96ff5d84874dd24d5a8fb3e Mon Sep 17 00:00:00 2001 From: fhenry Date: Thu, 14 Feb 2013 13:55:05 +0100 Subject: [PATCH 4/9] Fix bug [ bug #709 ] --- htdocs/comm/action/listactions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index f369b25ab3b..341d430f2ac 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -143,6 +143,7 @@ if ($socid) $param.="&socid=".$socid; if ($showbirthday) $param.="&showbirthday=1"; if ($pid) $param.="&projectid=".$pid; if ($type) $param.="&type=".$type; +if ($actioncode) $param.="&actioncode=".$actioncode; $sql = "SELECT s.nom as societe, s.rowid as socid, s.client,"; $sql.= " a.id, a.datep as dp, a.datep2 as dp2,"; From aff919fd10f5cb411139ae044344db6741c1da38 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Feb 2013 12:45:46 +0100 Subject: [PATCH 5/9] Fix: Bad test --- htdocs/product/class/product.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a9c0439b220..49f1d495cde 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2187,10 +2187,10 @@ class Product extends CommonObject $this->res[]= array($compl_path.$nom_pere,$desc_pere); } - // Recursive call - if (is_array($desc_pere)) + // Recursive call if child is an array + if (is_array($desc_pere[0])) { - $this ->fetch_prod_arbo($desc_pere, $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1); + $this ->fetch_prod_arbo($desc_pere[0], $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1); } } } From d2074d1a176c3ca57ce9480e89a1bb482c9a7c4b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Feb 2013 17:06:55 +0100 Subject: [PATCH 6/9] Fix: When creating invoice from other object, type must be standard only --- htdocs/compta/facture.php | 109 ++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 86f03b2d040..0d46ca1efcd 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1899,14 +1899,6 @@ if ($action == 'create') print $desc; print ''."\n"; - // Deposit - print ''; - print ''; - print ''; - $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); - print $desc; - print ''."\n"; - // Proforma if (! empty($conf->global->FACTURE_USE_PROFORMAT)) { @@ -1918,54 +1910,65 @@ if ($action == 'create') print ''."\n"; } - // Replacement - print ''; - print ''; - print ''; - $text=$langs->trans("InvoiceReplacementAsk").' '; - $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); - print $desc; - print ''."\n"; + // Deposit + print ''; + print ''; + print ''; + $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); + print $desc; + print ''."\n"; - // Credit note - print ''; - print ''; - print ''; - $text=$langs->transnoentities("InvoiceAvoirAsk").' '; - // $text.=''; - $text.=''; + print ''; + $text=$langs->trans("InvoiceReplacementAsk").' '; + $text.=''; + $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); + print $desc; + print ''."\n"; + + // Credit note + print ''; + print ''; + print ''; + $text=$langs->transnoentities("InvoiceAvoirAsk").' '; + // $text.=''; + $text.=''; + $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); + print $desc; + print ''."\n"; } - else - { - $text.=''; - } - $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceAvoirDesc"),1); - print $desc; - print ''."\n"; print ''; print ''; From b434f58af3458744e4357c03e9b0db4c553b34c8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Feb 2013 17:12:06 +0100 Subject: [PATCH 7/9] Fix: When creating invoice from other object, type must be standard only --- htdocs/compta/facture.php | 51 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 0d46ca1efcd..5bc85030f99 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1919,32 +1919,35 @@ if ($action == 'create') $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1); print $desc; print ''."\n"; + } - // Replacement - print ''; - print ''; - print ''; - $text=$langs->trans("InvoiceReplacementAsk").' '; - $text.=''; - $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); - print $desc; - print ''."\n"; + // Replacement + print ''; + print ''; + print ''; + $text=$langs->trans("InvoiceReplacementAsk").' '; + $text.=''; + $desc=$form->textwithpicto($text,$langs->transnoentities("InvoiceReplacementDesc"),1); + print $desc; + print ''."\n"; - // Credit note + if (empty($origin)) + { + // Credit note print ''; print ' Date: Sun, 17 Feb 2013 17:17:19 +0100 Subject: [PATCH 8/9] Prepare 3.3 release --- build/exe/doliwamp/doliwamp.iss | 4 ++-- build/makepack-dolibarr.pl | 2 +- build/makepack-howto.txt | 10 +++++----- build/pad/pad_dolibarr.xml | 6 +++--- build/pad/pad_doliwamp.xml | 6 +++--- htdocs/filefunc.inc.php | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 1dd37f24700..faafcf5ce6a 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -17,9 +17,9 @@ ; ----- Change this ----- AppName=DoliWamp ; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -AppVerName=DoliWamp-3.3.0-beta +AppVerName=DoliWamp-3.3.0 ; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x -OutputBaseFilename=DoliWamp-3.3.0-beta +OutputBaseFilename=DoliWamp-3.3.0 ; Define full path from wich all relative path are defined ; You must modify this to put here your dolibarr root directory ;SourceDir=C:\Documents and Settings\ldestailleur\git\dolibarr_old diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 8fcf7946de7..aee377023ac 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -10,7 +10,7 @@ use Cwd; $PROJECT="dolibarr"; $MAJOR="3"; $MINOR="3"; -$BUILD="0-beta"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate +$BUILD="0"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate $RPMSUBVERSION="auto"; # auto use value found into BUILD @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index a8a9471cc1b..fad028cfbf6 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -33,11 +33,11 @@ complete release of Dolibarr, step by step. - Check all files are commited. - Update version/info in /ChangeLog and /filefunc.inc.php -- Update version number with x.x.x-y in htdocs/filefunc.inc.php -- Update version number with x.x.x-y in build/makepack-dolibarr.pl -- Update version number with x.x.x-y in build/debian/changelog -- Update version number with x.x.x-y in build/exe/doliwamp/doliwamp.iss -- Update version number with x.x.x-y in build/rpm/*.spec +- Update version number with x.x.x in htdocs/filefunc.inc.php +- Update version number with x.x.x in build/makepack-dolibarr.pl +- Update version number with x.x.x in build/debian/changelog +- Update version number with x.x.x in build/exe/doliwamp/doliwamp.iss +- Update version number with x.x.x in build/rpm/*.spec - Update PAD files. - Commit all changes. - Add a Tag (DOLIBARR_x_y) diff --git a/build/pad/pad_dolibarr.xml b/build/pad/pad_dolibarr.xml index e8c88ca8968..dd80e1ef53c 100644 --- a/build/pad/pad_dolibarr.xml +++ b/build/pad/pad_dolibarr.xml @@ -35,9 +35,9 @@ Dolibarr 3.3.0 - 08 - 10 - 2012 + 02 + 17 + 2013 diff --git a/build/pad/pad_doliwamp.xml b/build/pad/pad_doliwamp.xml index e20d9563559..148c4a4e79b 100644 --- a/build/pad/pad_doliwamp.xml +++ b/build/pad/pad_doliwamp.xml @@ -35,9 +35,9 @@ DoliWamp 3.3.0 - 08 - 10 - 2012 + 02 + 17 + 2013 diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 6173ef70704..734526bedc6 100755 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -29,7 +29,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.3.0-beta'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.3.0'); if (! defined('EURO')) define('EURO',chr(128)); // Define syslog constants From b0695d3bbb64ab46380cbc585d1a7affe527e551 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 17 Feb 2013 17:20:05 +0100 Subject: [PATCH 9/9] Preapre 3.3 --- build/rpm/dolibarr_fedora.spec | 2 +- build/rpm/dolibarr_generic.spec | 2 +- build/rpm/dolibarr_mandriva.spec | 2 +- build/rpm/dolibarr_opensuse.spec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 3481164a0af..b894d8367d1 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -333,5 +333,5 @@ fi %changelog -* Wed Dec 19 2012 Laurent Destailleur 3.3.0-0.1.a +* Sun Feb 17 2013 Laurent Destailleur 3.3.0-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 8d8949f1f83..f2aa80cf0e3 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -522,5 +522,5 @@ fi %changelog -* Wed Dec 19 2012 Laurent Destailleur 3.3.0-0.1.a +* Sun Feb 17 2013 Laurent Destailleur 3.3.0-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 161bf9f7b0b..fa4e379e885 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -322,5 +322,5 @@ fi %changelog -* Wed Dec 19 2012 Laurent Destailleur 3.3.0-0.1.a +* Sun Feb 17 2013 Laurent Destailleur 3.3.0-0.3 - Initial version (#723326) diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 170b4d28813..9eaf86f1d3d 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -333,5 +333,5 @@ fi %changelog -* Wed Dec 19 2012 Laurent Destailleur 3.3.0-0.1.a +* Sun Feb 17 2013 Laurent Destailleur 3.3.0-0.3 - Initial version (#723326)