When you are tying to reorder items in a quote is working but after saving you will get the same itemList before reOrder. I have tested on demo.espocrm.de and it is the same issue. I think it's a BUG. Please advise me what to do. Thank you.
Quote items reorder not working.
Collapse
X
-
Tags: None
-
Solved. Found this approach :
file: /client/modules/advanced/src/views/quote/fields/item-list.js
PHP Code:reOrder: function (idList) { var orderedItemList = []; var itemList = this.model.get('itemList') || []; var i = 0; idList.forEach(function (id) { itemList.forEach(function (item) { if (item.id === id) { item.order = ++i; orderedItemList.push(item); } }, this); }, this); this.model.set('itemList', orderedItemList); }
Last edited by clevercode; 06-14-2017, 08:51 AM.Comment
Comment