From 04b3b4d4d22f8f34ea94e65c9a5dca8b792ed3d5 Mon Sep 17 00:00:00 2001 From: Jon Bendtsen Date: Mon, 1 Apr 2024 10:17:58 +0200 Subject: [PATCH] will allow updating 1 invoices single Complementary Attribute without specifying complementary attributes that we don't want to change. Similar to # 29115 but just for invoices --- htdocs/compta/facture/class/api_invoices.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 40abcfbca07..d9ebf2a0541 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -671,7 +671,12 @@ class Invoices extends DolibarrApi $this->invoice->context['caller'] = $request_data['caller']; continue; } - + if ($field == 'array_options' && is_array($value)) { + foreach ($value as $index => $val) { + $this->invoice->array_options[$index] = $val; + } + continue; + } $this->invoice->$field = $value; // If cond reglement => update date lim reglement