From 3e7f0b364e97995dcf82e5e548da48c737a9f6f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Apr 2020 10:22:08 +0200 Subject: [PATCH 1/5] FIX #13611 --- htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 7bef90f514e..32a8714cf12 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -745,7 +745,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetXY($posx, $posy); $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetTextColor(111, 81, 124); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $object->getLibStatut(0), '', 'R'); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R'); if ($showaddress) { // Sender properties From ea60d0be635138ce6e90a4807e1bc0636c77d5d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Apr 2020 10:27:38 +0200 Subject: [PATCH 2/5] FIX #13618 --- htdocs/compta/facture/class/api_invoices.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 7c7437bfb8e..a178e5bba82 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -445,8 +445,7 @@ class Invoices extends DolibarrApi } $result = $this->invoice->delete_contact($rowid); - - if (!$result) { + if ($result < 0) { throw new RestException(500, 'Error when deleted the contact'); } @@ -543,7 +542,7 @@ class Invoices extends DolibarrApi /** * Delete invoice * - * @param int $id Invoice ID + * @param int $id Invoice ID * @return array */ public function delete($id) @@ -560,7 +559,8 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - if ($this->invoice->delete($id) < 0) + $result = $this->invoice->delete(DolibarrApiAccess::$user); + if ($result < 0) { throw new RestException(500); } From f546103c015dad59328cd646ed25834258def42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 Apr 2020 22:05:47 +0200 Subject: [PATCH 3/5] make dolistore happy again --- htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php index 2b32594e6eb..9402c8eb5fc 100644 --- a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php +++ b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software: you can redistribute it and/or modify @@ -112,7 +112,7 @@ class mymodulewidget1 extends ModeleBoxes // Use configuration value for max lines count $this->max = $max; - //include_once DOL_DOCUMENT_ROOT . "/mymodule/class/mymodule.class.php"; + //dol_include_once("/mymodule/class/mymodule.class.php"); // Populate the head at runtime $text = $langs->trans("MyModuleBoxDescription", $max); From 91fbccb59447a048e8ec4010ca74982702197188 Mon Sep 17 00:00:00 2001 From: Adrien Jacob Date: Mon, 20 Apr 2020 14:12:08 +0200 Subject: [PATCH 4/5] [BUGFIX] Allow update of extra fields This is to make supplier invoices consistent with other similar classes --- htdocs/fourn/class/fournisseur.facture.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bdfdbb360d8..bdeedf44091 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -976,6 +976,15 @@ class FactureFournisseur extends CommonInvoice $this->errors[] = "Error ".$this->db->lasterror(); } } + + if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) + { + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } if (!$error) { From 27aeaaecb5f75a4386abcaf4fc4e3b672a43eece Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 20 Apr 2020 12:16:34 +0000 Subject: [PATCH 5/5] Fixing style errors. --- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bdeedf44091..48ca9ca81f2 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -976,7 +976,7 @@ class FactureFournisseur extends CommonInvoice $this->errors[] = "Error ".$this->db->lasterror(); } } - + if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0) { $result=$this->insertExtraFields();