Skip to content

Commit 8d45a92

Browse files
committed
Merge branch 'MAGETWO-34378' of https://github.corp.ebay.com/magento-firedrakes/magento2ce into MAGETWO-34378
2 parents 6d7612c + a7a99a7 commit 8d45a92

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ protected function _isAllowed()
4545
}
4646

4747
/**
48+
* Save collection items to pdf invoices
49+
*
4850
* @param AbstractCollection $collection
4951
* @return ResponseInterface
5052
* @throws \Exception

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ public function getStates()
173173
{
174174
$states = [];
175175
foreach ($this->_getCollection() as $item) {
176-
$states[$item->getState()] = __($item->getData('label'));
176+
if ($item->getState()) {
177+
$states[$item->getState()] = __($item->getData('label'));
178+
}
177179
}
178180
return $states;
179181
}

app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ Packaging.prototype = {
748748

749749
_observeQty: function() {
750750
/** this = input[type="checkbox"] */
751-
var tr = this.parentNode.parentNode,
751+
var tr = jQuery(this).closest('tr')[0],
752752
qty = $(tr.cells[tr.cells.length - 1]).select('input[name="qty"]')[0];
753753

754754
if (qty.disabled = !this.checked) {

app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,25 @@ define([
151151
* @returns {Filters} Chainable.
152152
*/
153153
cancel: function () {
154+
this.convertToObject();
154155
this.set('filters', utils.copy(this.applied));
155156

156157
return this;
157158
},
158159

160+
/**
161+
* Convert empty array to empty object.
162+
*
163+
* @returns {Filters} Chainable.
164+
*/
165+
convertToObject: function() {
166+
if ( _.isArray(this.applied) && _.isEmpty(this.applied) ) {
167+
this.applied = {};
168+
}
169+
170+
return this;
171+
},
172+
159173
/**
160174
* Tells wether filters pannel should be opened.
161175
*

0 commit comments

Comments
 (0)