Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fixed shipment splitting with new select 2 version

Damian Legawiec206f5358baef
diff --git a/backend/app/assets/javascripts/spree/backend/shipments.js b/backend/app/assets/javascripts/spree/backend/shipments.js
index 3e1568dcf4..d339b38495 100644
--- a/backend/app/assets/javascripts/spree/backend/shipments.js
+++ b/backend/app/assets/javascripts/spree/backend/shipments.js
@@ -283,9 +283,9 @@ function completeItemSplit(event) {
var stockLocationId = stockItemRow.find('#item_stock_location').val()
var originalShipmentNumber = link.closest('tbody').data('shipment-number')
- var selectedShipment = stockItemRow.find($('#item_stock_location'))
- var targetShipmentNumber = selectedShipment.select2().data('shipment-number')
- var newShipment = selectedShipment
+ var selectedShipment = stockItemRow.find('#item_stock_location option:selected')
+ var targetShipmentNumber = selectedShipment.data('shipment-number')
+ var newShipment = selectedShipment.data('new-shipment')
// eslint-disable-next-line eqeqeq
if (stockLocationId != 'new_shipment') {