Skip to content

Commit 7c1dcc6

Browse files
authored
Allow empty qty-item field when creating a shipment (OpenMage#4828)
While creating a shipment, one has to put a `0` into every order line that is out of scope for this shipment, empty values are blocked by JS, while the PHP code can take empty values without issue. This PR allows simply clearing the `qty-item` field.
1 parent c00dd17 commit 7c1dcc6

File tree

1 file changed

+1
-2
lines changed
  • app/design/adminhtml/default/default/template/sales/order/shipment/create

1 file changed

+1
-2
lines changed

app/design/adminhtml/default/default/template/sales/order/shipment/create/items.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ function validQtyItems() {
125125
var valid = true;
126126
var errorMessage = '<?php echo Mage::helper('core')->jsQuoteEscape($this->helper('sales')->__('Invalid value(s) for Qty to Ship')) ?>';
127127
$$('.qty-item').each(function(item) {
128-
var val = parseFloat(item.value);
129-
if (isNaN(val) || val < 0) {
128+
if (isNaN(item.value) || parseFloat(item.value) < 0) {
130129
valid = false;
131130
alert(errorMessage);
132131
throw $break;

0 commit comments

Comments
 (0)