From c464a2d5b27e4c6861d16e31bfa9943727c8182d Mon Sep 17 00:00:00 2001 From: William Mead Date: Tue, 9 Dec 2025 11:38:24 +0100 Subject: [PATCH] Fixed field reset on reload. Updated contributor details. --- htdocs/product/card.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a46d4ca06b9..02edf303c8a 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -21,6 +21,7 @@ * Copyright (C) 2020 Pierre Ardoin * Copyright (C) 2022 Vincent de Grandpré * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 William Mead * * 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 @@ -1717,7 +1718,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio if (!getDolGlobalString('PRODUCT_DISABLE_NATURE')) { // Nature print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; - print $formproduct->selectProductNature('finished', (string) $object->finished); + print $formproduct->selectProductNature('finished', (GETPOSTISSET('finished') ? GETPOST('finished') : (string) $object->finished)); print ''; } } @@ -1857,19 +1858,19 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio // Price print ''.$langs->trans("SellingPrice").''; - print ''; + print ''; print $form->selectPriceBaseType(getDolGlobalString('PRODUCT_PRICE_BASE_TYPE'), "price_base_type"); print ajax_combobox("select_price_base_type"); print ''; // Min price print ''.$langs->trans("MinPrice").''; - print ''; + print ''; print ''; // VAT print ''.$langs->trans("VATRate").''; - $defaultva = get_default_tva($mysoc, $mysoc); + $defaultva = GETPOSTISSET('tva_tx') ? GETPOST('tva_tx') : get_default_tva($mysoc, $mysoc); print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); print ajax_combobox("tva_tx"); print '';