From d66b2322c2f7776c3c7107c981872f5aba40a2bd Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Tue, 2 Oct 2018 09:37:44 +0200 Subject: [PATCH 1/3] FIX Can't create shipping if have shipping line's extrafields --- htdocs/expedition/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 26b2d729f82..0b03f8fc608 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1576,7 +1576,7 @@ if ($action == 'create') $srcLine = new OrderLine($db); $srcLine->fetch_optionals($line->id); // fetch extrafields also available in orderline $line = new ExpeditionLigne($db); - $line->fetch_optionals($line->id); + //$line->fetch_optionals($line->id); $line->array_options = array_merge($line->array_options, $srcLine->array_options); print ''; print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan),$indiceAsked); From ef7ed9786609cca1f277edf54e6036c74c0e4944 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 3 Oct 2018 15:40:58 +0200 Subject: [PATCH 2/3] fix ressource list with extrafields --- htdocs/resource/list.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 8ef3168ee96..cce22025a9a 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Nicolas ZABOURI - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -242,14 +242,14 @@ print "\n"; if ($ret) { - foreach ($object->lines as $obj) + foreach ($object->lines as $ressource) { print ''; if (! empty($arrayfields['t.ref']['checked'])) { print ''; - print $obj->getNomUrl(5); + print $ressource->getNomUrl(5); print ''; if (! $i) $totalarray['nbfield']++; } @@ -257,20 +257,20 @@ if ($ret) if (! empty($arrayfields['ty.label']['checked'])) { print ''; - print $obj->type_label; + print $ressource->type_label; print ''; if (! $i) $totalarray['nbfield']++; } // Extra fields - $obj = (Object) $resource->array_options; + $obj = (Object) $ressource->array_options; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; print ''; - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; print ''; From b8c88a214449d5129fd4c479249cfa7c2373d10d Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Wed, 3 Oct 2018 15:43:00 +0200 Subject: [PATCH 3/3] rename var --- htdocs/resource/list.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index cce22025a9a..85be267613d 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -242,14 +242,14 @@ print "\n"; if ($ret) { - foreach ($object->lines as $ressource) + foreach ($object->lines as $resource) { print ''; if (! empty($arrayfields['t.ref']['checked'])) { print ''; - print $ressource->getNomUrl(5); + print $resource->getNomUrl(5); print ''; if (! $i) $totalarray['nbfield']++; } @@ -257,20 +257,20 @@ if ($ret) if (! empty($arrayfields['ty.label']['checked'])) { print ''; - print $ressource->type_label; + print $resource->type_label; print ''; if (! $i) $totalarray['nbfield']++; } // Extra fields - $obj = (Object) $ressource->array_options; + $obj = (Object) $resource->array_options; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; print ''; - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; print '';