From 7f1adc6a6ab53fce7e3a5d7f910cd90109ffc27e Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 7 Nov 2017 09:46:39 +0100 Subject: [PATCH 1/5] FIX: Saving wrong localtax on order addline --- htdocs/commande/class/commande.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c326efa7e49..0ea9302b221 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1360,8 +1360,8 @@ class Commande extends CommonOrder $this->line->vat_src_code=$vat_src_code; $this->line->tva_tx=$txtva; - $this->line->localtax1_tx=$localtaxes_type[1]; - $this->line->localtax2_tx=$localtaxes_type[3]; + $this->line->localtax1_tx=$txlocaltax1; + $this->line->localtax2_tx=$txlocaltax2; $this->line->localtax1_type=$localtaxes_type[0]; $this->line->localtax2_type=$localtaxes_type[2]; $this->line->fk_product=$fk_product; From 4874d08062ed78dc66ea3bb6e24e5431b5644f05 Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Fri, 19 Jan 2018 08:59:04 +0100 Subject: [PATCH 2/5] fix the bill replacement with discounts #8028 --- htdocs/compta/facture/class/facture.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3c35a03f218..748f83f5a53 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -539,6 +539,15 @@ class Facture extends CommonInvoice } $newinvoiceline->fk_parent_line=$fk_parent_line; + + if($newinvoiceline->fk_remise_except){ + $discount = new DiscountAbsolute($this->db); + $discount->fetch($newinvoiceline->fk_remise_except); + + $discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx); + $newinvoiceline->fk_remise_except = $discountId; + } + $result=$newinvoiceline->insert(); // Defined the new fk_parent_line From 53ac13c792dddc0cbd073ea25657900a323d6dc6 Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Tue, 23 Jan 2018 18:03:29 +0100 Subject: [PATCH 3/5] check on type replacement #8028 --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 748f83f5a53..72285e87808 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -540,7 +540,7 @@ class Facture extends CommonInvoice $newinvoiceline->fk_parent_line=$fk_parent_line; - if($newinvoiceline->fk_remise_except){ + if($this->type === Facture::TYPE_REPLACEMENT && $newinvoiceline->fk_remise_except){ $discount = new DiscountAbsolute($this->db); $discount->fetch($newinvoiceline->fk_remise_except); From 2e1727e323a7552f61e910bedb34302ff8020797 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Mon, 19 Feb 2018 17:45:19 +0100 Subject: [PATCH 4/5] Fix: Barcode type --- htdocs/barcode/codeinit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index ebe121301b7..537f9d30a3f 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -1,5 +1,6 @@ + * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -143,7 +144,7 @@ if ($action == 'initbarcodeproducts') $nextvalue=$modBarCodeProduct->getNextValue($productstatic,''); //print 'Set value '.$nextvalue.' to product '.$productstatic->id." ".$productstatic->ref." ".$productstatic->type."
\n"; - $result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'date', '', $user, 'PRODUCT_MODIFY'); + $result=$productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY'); $nbtry++; if ($result > 0) $nbok++; From 671b4a399dbdd2dc47cb20a18ae324b489a86309 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Mon, 19 Feb 2018 17:47:24 +0100 Subject: [PATCH 5/5] Fix: Barcode type --- htdocs/commande/class/commande.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 0ea9302b221..c326efa7e49 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1360,8 +1360,8 @@ class Commande extends CommonOrder $this->line->vat_src_code=$vat_src_code; $this->line->tva_tx=$txtva; - $this->line->localtax1_tx=$txlocaltax1; - $this->line->localtax2_tx=$txlocaltax2; + $this->line->localtax1_tx=$localtaxes_type[1]; + $this->line->localtax2_tx=$localtaxes_type[3]; $this->line->localtax1_type=$localtaxes_type[0]; $this->line->localtax2_type=$localtaxes_type[2]; $this->line->fk_product=$fk_product;