Remove the unlock condition in shipment controller

This assumes unlock is always true so the shipment's fee adjustments
always opens and closes.
This commit is contained in:
Arthur Vieira
2022-05-26 09:13:26 -03:00
parent 0fb9cc0f2a
commit 95010fcd12
3 changed files with 5 additions and 11 deletions

View File

@@ -25,13 +25,12 @@ $(document).ready(function() {
var link = $(this);
var shipment_number = link.data('shipment-number');
var selected_shipping_rate_id = link.parents('tbody').find("select#selected_shipping_rate_id[data-shipment-number='" + shipment_number + "']").val();
var unlock = link.parents('tbody').find("input[name='open_adjustment'][data-shipment-number='" + shipment_number + "']:checked").val();
var url = Spree.url( Spree.routes.orders_api + "/" + order_number + "/shipments/" + shipment_number + ".json");
$.ajax({
type: "PUT",
url: url,
data: { shipment: { selected_shipping_rate_id: selected_shipping_rate_id, unlock: unlock } }
data: { shipment: { selected_shipping_rate_id: selected_shipping_rate_id } }
}).done(function( msg ) {
window.location.reload();
}).error(function( msg ) {