From 5a21fdfabb40ea4172f67a5a87fb7d4decb43836 Mon Sep 17 00:00:00 2001 From: objecttothis <17935339+objecttothis@users.noreply.github.com> Date: Tue, 1 Sep 2026 12:02:04 +0400 Subject: [PATCH] fix(stock_config): replace `.data()` with `.attr()` for consistency in location ID handling Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com> --- app/Views/configs/stock_config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Views/configs/stock_config.php b/app/Views/configs/stock_config.php index fc3d0aaa7..30a897357 100644 --- a/app/Views/configs/stock_config.php +++ b/app/Views/configs/stock_config.php @@ -44,7 +44,7 @@ const ensure_default_selected = function() { if ($('#stock_locations input.stock_location_default:checked').length === 0) { $('#stock_locations .stock_location_row').filter(function() { - return String($(this).data('location-id')).indexOf('new-') !== 0; + return String($(this).attr('data-location-id')).indexOf('new-') !== 0; }).first().find('input.stock_location_default').prop('checked', true); } }; @@ -77,7 +77,7 @@ const update_sort_order_field = function() { const orderedIds = $('#stock_locations .stock_location_row').map(function() { - return $(this).data('location-id'); + return $(this).attr('data-location-id'); }).get(); $("input[name='stock_location_order']").val(orderedIds.join(',')); };