From 325d635c48fcc44aead95edae3bdcf025f4fb769 Mon Sep 17 00:00:00 2001 From: simicar29 <53998265+simicar29@users.noreply.github.com> Date: Thu, 12 Mar 2020 12:43:06 +0100 Subject: [PATCH 1/4] Load line extrafields when fetching supplier invoice PR to load extrafield values of lines when fetchinf supplier invoice. --- htdocs/fourn/class/fournisseur.facture.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 8b07b0fbebe..e58410fb0f0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -859,7 +859,10 @@ class FactureFournisseur extends CommonInvoice $line->multicurrency_total_tva = $obj->multicurrency_total_tva; $line->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - $this->lines[$i] = $line; + // Extra fields + $line->fetch_optionals(); + + $this->lines[$i] = $line; $i++; } From 0babab2824bfd6e2976c840c4378284167cb6305 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 12 Mar 2020 11:48:08 +0000 Subject: [PATCH 2/4] 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 e58410fb0f0..bdfdbb360d8 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -861,7 +861,7 @@ class FactureFournisseur extends CommonInvoice // Extra fields $line->fetch_optionals(); - + $this->lines[$i] = $line; $i++; From 4f4b778c8ce782bff11210f57a7974b210941ca3 Mon Sep 17 00:00:00 2001 From: simicar29 <53998265+simicar29@users.noreply.github.com> Date: Thu, 12 Mar 2020 12:53:17 +0100 Subject: [PATCH 3/4] update_price: add invoice_supplier element name 'invoice_supplier' as an element name was missing in test conditions to skip the update_price function --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 899005c8232..f5553032a09 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2916,7 +2916,7 @@ abstract class CommonObject $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_ORDER"; elseif ($this->element == 'facture' || $this->element == 'invoice') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_INVOICE"; - elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice') + elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice' || $this->element == 'invoice_supplier') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_INVOICE"; elseif ($this->element == 'order_supplier' || $this->element == 'supplier_order') $MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_ORDER"; From 6618205e6fa709c9c79de48debeb7f574016f00a Mon Sep 17 00:00:00 2001 From: altairis Date: Thu, 12 Mar 2020 15:05:32 +0100 Subject: [PATCH 4/4] fix missing class declaration --- htdocs/core/boxes/box_shipments.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php index 3b07b5bbd68..26f45bc08db 100644 --- a/htdocs/core/boxes/box_shipments.php +++ b/htdocs/core/boxes/box_shipments.php @@ -77,6 +77,7 @@ class box_shipments extends ModeleBoxes $this->max = $max; include_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; + include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $shipmentstatic = new Expedition($this->db);