diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php index 5afad1030060a9dbe6c52724a1b809b59734a093..12c563f57151dd608d2233f0b3b193d0c33366bf 100644 --- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php +++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php @@ -45,6 +45,8 @@ abstract class Pdfinvoices extends \Magento\Sales\Controller\Adminhtml\Order\Abs } /** + * Save collection items to pdf invoices + * * @param AbstractCollection $collection * @return ResponseInterface * @throws \Exception diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php index 6f638d146a34e3ef6e17eeba1c80ae9dc52489cc..bad7c52073a603562a9f7e2a34aa411520b17a82 100755 --- a/app/code/Magento/Sales/Model/Order/Config.php +++ b/app/code/Magento/Sales/Model/Order/Config.php @@ -173,7 +173,9 @@ class Config { $states = []; foreach ($this->_getCollection() as $item) { - $states[$item->getState()] = __($item->getData('label')); + if ($item->getState()) { + $states[$item->getState()] = __($item->getData('label')); + } } return $states; } diff --git a/app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js b/app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js index fca9b0553afa7a9de06030524a0259bdc4bca504..2639eb623fe358282898cf06dd5ea1abd799110a 100644 --- a/app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js +++ b/app/code/Magento/Shipping/view/adminhtml/web/order/packaging.js @@ -748,7 +748,7 @@ Packaging.prototype = { _observeQty: function() { /** this = input[type="checkbox"] */ - var tr = this.parentNode.parentNode, + var tr = jQuery(this).closest('tr')[0], qty = $(tr.cells[tr.cells.length - 1]).select('input[name="qty"]')[0]; if (qty.disabled = !this.checked) { diff --git a/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js b/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js index ddd2bfffac2b1e7a0cb4b73047cab79105286dd1..13f6704f34d37fb5ae8773e7c2628d402a28a5dd 100644 --- a/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js +++ b/app/code/Magento/Ui/view/base/web/js/grid/filters/filters.js @@ -151,11 +151,25 @@ define([ * @returns {Filters} Chainable. */ cancel: function () { + this.convertToObject(); this.set('filters', utils.copy(this.applied)); return this; }, + /** + * Convert empty array to empty object. + * + * @returns {Filters} Chainable. + */ + convertToObject: function() { + if ( _.isArray(this.applied) && _.isEmpty(this.applied) ) { + this.applied = {}; + } + + return this; + }, + /** * Tells wether filters pannel should be opened. *