From cb86cd403ca9493cb0fa7e265fa9e9ebdce98784 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 3 Sep 2013 20:01:10 +0200 Subject: [PATCH 1/9] Fix: Delete linked element to supplier invoice when deleted (as done for all other object into dolibarr) --- ChangeLog | 1 + htdocs/fourn/class/fournisseur.facture.class.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index efdc41b902a..80eabc9a8fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Fix: Mailing module : if an email is already in destinaires list all other email Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id Fix: Compatiblity with multicompany module +Fix: Delete linked element to supplier invoice when deleted ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 19912e3f58f..be2ce721356 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -629,6 +629,13 @@ class FactureFournisseur extends CommonInvoice // Fin appel triggers } + if (! $error) + { + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) $error++; + } + if (! $error) { // We remove directory From ddeca06f329467b127fd865026f6cbe499ebd946 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 3 Sep 2013 21:13:05 +0200 Subject: [PATCH 2/9] Real ref filter --- htdocs/fourn/facture/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 540cbebea12..8e9d8debab9 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -168,6 +168,8 @@ if (GETPOST("search_montant_ttc")) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); + +dol_syslog("fourn/facture/index.php::list sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -193,7 +195,7 @@ if ($resql) print '
'; print ''; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.ref,fac.rowid","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.rowid,fac.ref","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"fac.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); From 2740cc78b6c81eb3c6853d04f7c744cde0c37121 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 5 Sep 2013 17:45:30 +0200 Subject: [PATCH 3/9] Add dol_syslog Fix bug on expedition create : create expedition with rowid (or origin_id) that already exits, and you will have all product of the other expedition and the new expedition form order Revert previous commit filter sort on fourn/facture/index.php --- ChangeLog | 1 + htdocs/expedition/class/expedition.class.php | 2 ++ htdocs/expedition/fiche.php | 2 ++ htdocs/fourn/facture/index.php | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 80eabc9a8fe..5e80d99f106 100644 --- a/ChangeLog +++ b/ChangeLog @@ -79,6 +79,7 @@ For users: - Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers - Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search - Fix: [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array +- Fix: Expedition creation, can retreive product from other expedition For translators: - Update language files. diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 888dd6c5eb0..90b1b89d1a5 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -224,6 +224,7 @@ class Expedition extends CommonObject $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); $sql.= ")"; + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -323,6 +324,7 @@ class Expedition extends CommonObject $sql.= ", ".$qty; $sql.= ")"; + dol_syslog(get_class($this)."::create_line sql=".$sql, LOG_DEBUG); if (! $this->db->query($sql)) { $error++; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index d761480a74f..a5ec2e016c6 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -87,6 +87,8 @@ if ($id > 0 || ! empty($ref)) if ($action == 'add') { $error=0; + + $object = new Expedition($db); $db->begin(); diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 8e9d8debab9..b15695aa653 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -195,7 +195,7 @@ if ($resql) print ''; print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.rowid,fac.ref","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"fac.ref,fac.rowid","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fac.datef,fac.rowid","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"fac.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); From 556827c818d19823ab0da7241114a23b79bdcd1f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Sep 2013 22:58:11 +0200 Subject: [PATCH 4/9] Fix: wash file --- build/debian/wash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/debian/wash b/build/debian/wash index 7d3ec07d7a5..d755cf4b112 100644 --- a/build/debian/wash +++ b/build/debian/wash @@ -1,3 +1,4 @@ # watch control file for uscan -#version=3 -#http://http://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/ debian uupdate +version=3 +#http://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/ debian uupdate +http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.tar\.gz \ No newline at end of file From c71c4e86f67d639eed68e563d61db9878d500e90 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Sep 2013 23:52:13 +0200 Subject: [PATCH 5/9] Fix: watch file for debian package. --- build/debian/get-orig-source.sh | 40 +++++++++++++++++++++++++++++++++ build/debian/wash | 4 ---- build/debian/watch | 4 ++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100755 build/debian/get-orig-source.sh delete mode 100644 build/debian/wash create mode 100644 build/debian/watch diff --git a/build/debian/get-orig-source.sh b/build/debian/get-orig-source.sh new file mode 100755 index 00000000000..e3d201d672f --- /dev/null +++ b/build/debian/get-orig-source.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# run with +# debian/get-orig-source.sh [x.y.z] + +tmpdir=$(mktemp -d) +echo "tmpdir = $tmpdir" + +if [ -n "$1" ]; then + uscan_opts="--download-version=$1" +fi +uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts + +cd $tmpdir + +tgzfile=$(echo *.tar.gz) +version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr_//; s/\.zip$//; s/_/./g; s/\+nmu1//; s/$/+dfsg/;') + +# Extract the zip file +tar -xvf $tgzfile +srcdir=$(find . -maxdepth 1 -mindepth 1 -type d | sed -e 's/\.\///') + +if [ ! -d "$srcdir" ]; then + echo "ERROR: Failed to identify the extracted directory in $tmpdir (got $srcdir)" >&2 + rm -rf $tmpdir + exit 1 +fi + +# Repack as tar.xz +tar Jcf dolibarr_${version}.orig.tar.xz $srcdir + +cd - >/dev/null + +if [ -e ../dolibarr_${version}.orig.tar.xz ]; then + echo "Not overwriting ../dolibarr_${version}.orig.tar.xz"; +else + echo "Created ../dolibarr_${version}.orig.tar.xz" + mv $tmpdir/dolibarr_${version}.orig.tar.xz ../ +fi + +#rm -rf $tmpdir diff --git a/build/debian/wash b/build/debian/wash deleted file mode 100644 index d755cf4b112..00000000000 --- a/build/debian/wash +++ /dev/null @@ -1,4 +0,0 @@ -# watch control file for uscan -version=3 -#http://sourceforge.net/projects/dolibarr/files/Dolibarr%20installer%20for%20Debian-Ubuntu%20%28DoliDeb%29/ debian uupdate -http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.tar\.gz \ No newline at end of file diff --git a/build/debian/watch b/build/debian/watch new file mode 100644 index 00000000000..0f84815a48e --- /dev/null +++ b/build/debian/watch @@ -0,0 +1,4 @@ +# watch control file for uscan +version=3 +#http://sf.net/dolibarr/dolibarr-(.+)\.tgz +http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.tar\.gz From a9c14c80f00168c6202a04a12b7b292633236355 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Sep 2013 01:27:11 +0200 Subject: [PATCH 6/9] Fix: debian files --- build/debian/changelog | 9 +++------ build/debian/control | 3 ++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build/debian/changelog b/build/debian/changelog index b8b2826d43c..3a798d0d3cd 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -1,9 +1,6 @@ -dolibarr (3.3.4+nmu1) unstable; urgency=low +dolibarr (3.3.4) unstable; urgency=low - * Non-maintainer upload. + [ Laurent Destailleur (eldy) ] * New upstream release. - closes: bug#634783 - -- Dolibarr team Mon, 22 Apr 2013 12:00:00 +0100 - -# For a changelog file dedicated to end users, see /usr/share/doc/dolibarr/ChangeLog.gz \ No newline at end of file + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 diff --git a/build/debian/control b/build/debian/control index 9f0a0fb2ef5..0f2e6a6006a 100755 --- a/build/debian/control +++ b/build/debian/control @@ -1,5 +1,6 @@ Source: dolibarr -Maintainer: Laurent Destailleur +Maintainer: Laurent Destailleur (eldy) +Uploaders: Laurent Destailleur (eldy) Standards-Version: 3.9.2 Section: web Priority: optional From 5db9505f40c71fcc2cd2c9724c93a7182a7865c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Sep 2013 01:30:49 +0200 Subject: [PATCH 7/9] Fix debian package --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index fe171e3f32a..173773523d2 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -547,7 +547,7 @@ if ($nboftargetok) { $build = $newbuild; $build =~ s/-.*$//g; # now build is 0 for example - $build .= '+nmu1'; + # $build .= '+nmu1'; # now build is 0+nmu1 for example print "Remove target ${FILENAMEDEB}_all.deb...\n"; From 651596e8d5ab060e82607b0f32ca7dc332f8a306 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Sep 2013 13:42:14 +0200 Subject: [PATCH 8/9] Fix: missing ; --- htdocs/install/mysql/migration/repair.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index f27fb8cf95f..9b70e075e7c 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -80,8 +80,8 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); --- 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) +-- 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); -- Requests to clean old tables or fields From 9fa37fc5f156d0e0c8713ca7aed6f26261b89bdb Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Sun, 8 Sep 2013 21:51:08 +0200 Subject: [PATCH 9/9] Fix: Edit propal line was losing product supplier price id Conflicts: ChangeLog --- ChangeLog | 1 + htdocs/comm/propal/class/propal.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index efdc41b902a..27494cab5fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Fix: Mailing module : if an email is already in destinaires list all other email Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id Fix: Compatiblity with multicompany module +Fix: Edit propal line was losing product supplier price id ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index db8dd255b6c..b6964b1981d 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2924,7 +2924,7 @@ class PropaleLigne if (empty($this->info_bits)) $this->info_bits=0; if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; - if (empty($this->fk_parent_line)) $this->fk_fournprice=0; + if (empty($this->fk_fournprice)) $this->fk_fournprice=0; if (empty($this->pa_ht)) $this->pa_ht=0;