From 4d11205a01f056dd1a0dd2baf1223e35ef953d60 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 6 Nov 2015 09:51:33 +0100 Subject: [PATCH 1/6] FIX: change object statut on close shipping and remove erratic db commit --- htdocs/expedition/class/expedition.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index e68b063d7d2..106befda596 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1542,8 +1542,8 @@ class Expedition extends CommonObject if ($this->db->query($sql) ) { //TODO: Option to set order billed if 100% of order is shipped + $this->statut=2; $this->billed=1; - $this->db->commit(); return 1; } else From b4c3804c911d458d575ab0ce559e2acbf521ae6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 7 Nov 2015 13:21:03 +0100 Subject: [PATCH 2/6] 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 --- htdocs/commande/fiche.php | 32 ++++++++++++++++++++++---------- htdocs/compta/facture.php | 23 ++++++++++++++++------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 9a844b0a5d5..78370bad2cb 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1366,6 +1366,9 @@ if ($action == 'create' && $user->rights->commande->creer) { if ($socid > 0) $res = $soc->fetch($socid); + $projectid = 0; + $remise_absolue = 0; + if (! empty($origin) && ! empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; @@ -1423,17 +1426,26 @@ if ($action == 'create' && $user->rights->commande->creer) { $srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1); } } - else - { - $cond_reglement_id = $soc->cond_reglement_id; - $mode_reglement_id = $soc->mode_reglement_id; - $availability_id = $soc->availability_id; - $demand_reason_id = $soc->demand_reason_id; - $remise_percent = $soc->remise_percent; - $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''; - $projectid = 0; + + if (!$cond_reglement_id) { + $cond_reglement_id = $soc->cond_reglement_id; } + if (!$mode_reglement_id) { + $mode_reglement_id = $soc->mode_reglement_id; + } + if (!$availability_id) { + $availability_id = $soc->availability_id; + } + if (!$demand_reason_id) { + $demand_reason_id = $soc->demand_reason_id; + } + if (!$remise_percent) { + $remise_percent = $soc->remise_percent; + } + if (!$dateinvoice) { + $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? - 1 : ''; + } + $absolute_discount=$soc->getAvailableDiscounts(); $nbrow = 10; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index af28d80b9e9..0d06394ab69 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1860,6 +1860,8 @@ if ($action == 'create') if ($socid > 0) $res = $soc->fetch($socid); + $remise_absolue = 0; + if (! empty($origin) && ! empty($originid)) { // Parse element/subelement (ex: project_task) @@ -1916,14 +1918,21 @@ if ($action == 'create') } $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : ''; // Dot not set 0 here (0 for a date is 1970) } - else - { - $cond_reglement_id = $soc->cond_reglement_id; - $mode_reglement_id = $soc->mode_reglement_id; - $remise_percent = $soc->remise_percent; - $remise_absolue = 0; - $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970) + + if (!$cond_reglement_id) { + $cond_reglement_id = $soc->cond_reglement_id; } + if (!$mode_reglement_id) { + $mode_reglement_id = $soc->mode_reglement_id; + } + if (!$remise_percent) { + $remise_percent = $soc->remise_percent; + } + if (!$dateinvoice) { + // Do not set 0 here (0 for a date is 1970) + $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); + } + $absolute_discount = $soc->getAvailableDiscounts(); if (! empty($conf->use_javascript_ajax)) From 728f469c1e37e9cec1f22686461f8eedf48e8d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sat, 7 Nov 2015 13:43:59 +0100 Subject: [PATCH 3/6] FIX #3890 Expected transactions bank account page, shows negative numbers --- htdocs/compta/bank/treso.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index b9274c34eb5..1b9925e761c 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -2,6 +2,7 @@ /* Copytight (C) 2005-2009 Regis Houssin * Copyright (C) 2008-2009 Laurent Destailleur (Eldy) * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2015 Marcos GarcĂ­a "; print "".$ref.""; print "".$refcomp.""; - if ($obj->total_ttc < 0) { print "".price($total_ttc)." "; }; + if ($obj->total_ttc < 0) { print "".price(abs($total_ttc))." "; }; if ($obj->total_ttc >= 0) { print " ".price($total_ttc).""; }; print ''.price($solde).''; print ""; From d4aeb8b3bcea0e212de82f2ade1070f56a262088 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Nov 2015 12:19:05 +0100 Subject: [PATCH 4/6] Abandon package APS. Was never used. --- build/makepack-dolibarr.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 9db6f3a4da3..c2359241ad0 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -22,7 +22,8 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr"; $PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files"; -@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages +#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages +@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages %REQUIREMENTPUBLISH=( "SF"=>"git ssh rsync", "ASSO"=>"git ssh rsync" From 722a133b314807bd08b9a0d59c0614f6b0599d7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Nov 2015 12:12:28 +0100 Subject: [PATCH 5/6] FIX Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5 Conflicts: ChangeLog Conflicts: ChangeLog --- ChangeLog | 38 ++++++++++++++++++++++++++++++++++++-- build/makepack-dolibarr.pl | 22 ++++++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a59cf9b7006..bd64723725a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,43 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + ***** ChangeLog for 3.6.5 compared to 3.6.4 ***** -- Fix: [ bug #1776 ] Undefined $deliverycompany variable in pdf_build_address -- Fix: [ bug #1794 ] Error when cloning Proposal gives error in a malformed page +FIX: #2957 : missing $langs object for trigger +FIX: #2983 Load gravatar avatar images securely over HTTPS +FIX: #3009: Better filtering to prevent SQL injection +FIX: #3841 creation of a task completed has not status set to finished by default +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: bad calculation for stock value +FIX: bad stock valo +FIX: bad stock valorisation +FIX: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask +FIX: button create payment hide if tax amount is less than 1 +FIX: change object statut on close shipping and remove erratic db commit +FIX: change order date on clone (as everywhere else) +FIX: Close #2835 Customer prices of a product shows incorrect history order +FIX: Close #2837 Product list table column header does not match column body +FIX: Close bug #2861 Undefined variable $res when migrating from 3.6.2 to 3.7.0 +FIX: Close bug #2891 Category hooks do not work +FIX: Close bug #2976: "Report" tab is the current tab but it is not marked as selected by the UI +FIX: contact country had wrong display if the country dont have translate +FIX: double db escape add too quote +FIX: End log must use same level then start log. +FIX: error in SQL due to a previous fix +FIX: event for restricted user was restricted if company null +FIX: facturestat bad sql when customer view is limited +FIX: If supplier invoice block linked element is display after other block total HT amount is not reset to 0 and sum other block (like customer orders values) +FIX: keep filter by category or by not enough stock if we switch page +FIX: no need to remove file into mail form, the temp dir will be deleted after any sending +FIX: no projet_task_time id from trigger TASK_TIMESPENT_CREATE +FIX: pmp +FIX: send mail, copy sendto don't read the list of contact +FIX: The hours of date filter aren't correct +FIX: tool export handle the type "select" extrafields and return the value instead of id +FIX: top links menu have target attribute with wrong value +FIX: total amount in tpl linked object are not reset +FIX: when multicompany was enabled, this function didn't check just on the good entity (problem when both company use same mask) ***** ChangeLog for 3.6.4 compared to 3.6.3 ***** - Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index c2359241ad0..603fd0f2e7a 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -345,6 +345,28 @@ if ($nboftargetok) { print "Go to directory $SOURCE\n"; $olddir=getcwd(); chdir("$SOURCE"); + + # Test that the ChangeLog is ok + $ret=`grep "ChangeLog for $MAJOR.$MINOR\.$BUILD" "$SOURCE/ChangeLog" 2>&1`; + if (! $ret) + { + print "Error: The ChangeLogFile was not updated. Run the following command first:\n"; + if (! $BUILD) + { + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..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'; + } + else + { + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --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'; + } + print "\n"; + exit; + } + else + { + print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'\n"; + } + print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n"; $ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`; if ($ret =~ /already exists/) From 350345eccaa70ac932f7ddaa94e6f217f01bef6e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Nov 2015 15:18:26 +0100 Subject: [PATCH 6/6] Prepare 3.6.5 --- build/debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/debian/changelog b/build/debian/changelog index 17fdd65230e..5d34808d3a6 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,4 +1,4 @@ -dolibarr (3.6.4-3) UNRELEASED; urgency=low +dolibarr (3.6.5-3) UNRELEASED; urgency=low [ Laurent Destailleur (eldy) ] * New upstream release.