From 8e944b8b6de998f1c8a03a22044015d7ffb7a9ee Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 8 Mar 2022 17:34:51 +0100 Subject: [PATCH 1/2] Fix: Error whem generating supplier payment pdf --- .../core/modules/supplier_payment/doc/pdf_standard.modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index b6da2d4c294..1f32f645116 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2022 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 @@ -132,7 +133,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $this->db = $db; $this->name = "standard"; $this->description = $langs->trans('DocumentModelStandardPDF'); - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template + $this->update_main_doc_field = 0; // Save the name of generated file as the main doc when generating a doc with this template // Page size for A4 format $this->type = 'pdf'; From f2aaa27d7b25477380272a8ff84afa6115756a65 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Wed, 9 Mar 2022 17:41:48 +0100 Subject: [PATCH 2/2] FIX : when we use ajax select product fourn price on supplier order for example, unitprice should be rounded with MU and not MT --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 39d53e9dbc7..9c14bfeb866 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3400,7 +3400,7 @@ class Form 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, - 'price_ht'=>price2num($objp->unitprice, 'MT'), + 'price_ht'=>price2num($objp->unitprice, 'MU'), 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue,