Skip to content

Commit b62254d

Browse files
pradeep.rauthanpradeep.rauthan
authored andcommitted
MC-42704: Admin Checkout validation bug - Fixes as per CR comments done
1 parent 195ccc9 commit b62254d

File tree

1 file changed

+3
-10
lines changed
  • app/code/Magento/Sales/view/adminhtml/web/order/create

1 file changed

+3
-10
lines changed

app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,23 +270,16 @@ define([
270270
resetShipping = true;
271271
}
272272

273-
if (type === 'billing' && !this.shippingAsBilling) {
274-
resetSelectedBillingAddress = true;
275-
}
276-
277273
if (resetShipping) {
278274
data['reset_shipping'] = true;
279275
}
280276

281-
if (this.selectAddressEvent === false) {
277+
if (name !== 'customer_address_id' && this.selectAddressEvent === false) {
282278
if (this.shippingAsBilling) {
283279
$('order-shipping_address_customer_address_id').value = '';
284280
}
285-
// customer_address_id can not be set to blank, if changed to other saved addresses from dropdown list
286-
// for both billing & shipping while no change made in other address fields
287-
if (name !== 'customer_address_id') {
288-
$('order-' + type + '_address_customer_address_id').value = '';
289-
}
281+
282+
$('order-' + type + '_address_customer_address_id').value = '';
290283
}
291284

292285
data['order[' + type + '_address][customer_address_id]'] = null;

0 commit comments

Comments
 (0)