From 640cf50b7fa570297ce8eda96628faba9f2696f7 Mon Sep 17 00:00:00 2001 From: BlackMirror Date: Wed, 20 Jan 2021 15:20:50 +0100 Subject: [PATCH 1/2] [FM] Fix 12.0 - duplicate label, probably mistaken for ref --- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index f8b7908654b..3c7c74d0362 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -343,7 +343,7 @@ class pdf_strato extends ModelePDFContract } $txtpredefinedservice = ''; - $txtpredefinedservice = $objectligne->product_label; + $txtpredefinedservice = $objectligne->product_ref; if ($objectligne->product_label) { $txtpredefinedservice .= ' - '; From a55d23f363432355efd0001cb8957d6d3eab7943 Mon Sep 17 00:00:00 2001 From: BlackMirror Date: Thu, 21 Jan 2021 15:55:52 +0100 Subject: [PATCH 2/2] [FM] FIX - ticket extrafields of type 'date' are not saved --- htdocs/ticket/card.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 076c42867ca..aaf5b29a985 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -560,17 +560,21 @@ if (empty($reshook)) { // Action to update one extrafield if ($action == "update_extras" && !empty($permissiontoadd)) { $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - $attributekey = GETPOST('attribute', 'alpha'); - $attributekeylong = 'options_' . $attributekey; - $object->array_options['options_' . $attributekey] = GETPOST($attributekeylong, ' alpha'); - $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); - if ($result > 0) { - setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); - $action = 'view'; - } else { + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + if ($ret < 0) $error++; + if (!$error) + { + $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); + if ($result < 0) { $error++; } + } + + if ($error) { setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit_extras'; + } else { + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); + $action = 'view'; } }