From c0a7bca04e173b6f4aa692f2dc2e0d2b6143bd7f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 11 Jan 2023 10:50:58 +0100 Subject: [PATCH 1/2] Fix supplier reccurent invoice if no pdf model --- htdocs/fourn/class/fournisseur.facture-rec.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 31bc37b6e1a..024f6bf3e6f 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -1331,7 +1331,7 @@ class FactureFournisseurRec extends CommonInvoice // We refresh the object in order to have all necessary data (like date_lim_reglement) $new_fac_fourn->fetch($new_fac_fourn->id); $result = $new_fac_fourn->generateDocument($facturerec->model_pdf, $langs); - if ($result <= 0) { + if ($result < 0) { $this->errors = $new_fac_fourn->errors; $this->error = $new_fac_fourn->error; $error++; From 45725a1e9743d1840c9589982fce04be4bf3008c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 11 Jan 2023 17:58:26 +0100 Subject: [PATCH 2/2] fix: display True volume in PDF --- htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 17999e59e4c..97be43da689 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -832,7 +832,7 @@ class pdf_espadon extends ModelePdfExpedition $totalToShip = $tmparray['toship']; // Set trueVolume and volume_units not currently stored into database if ($object->trueWidth && $object->trueHeight && $object->trueDepth) { - $object->trueVolume = price(($object->trueWidth * $object->trueHeight * $object->trueDepth), 0, $outputlangs, 0, 0); + $object->trueVolume = $object->trueWidth * $object->trueHeight * $object->trueDepth; $object->volume_units = $object->size_units * 3; }