From d30b998b471cf44f4ca4dbfdff3425f31e8d5922 Mon Sep 17 00:00:00 2001 From: Felicitus Date: Sun, 15 May 2016 14:50:49 +0200 Subject: [PATCH] Set the stockLevel property to 0 for each duplicated item, fixes #660 --- .../Resources/public/js/Components/Part/Editor/PartEditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js index 052317d67..7859ce840 100644 --- a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js +++ b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js @@ -406,6 +406,7 @@ Ext.define('PartKeepr.PartEditor', { newItem.set(data); newItem.setAssociationData(this.record.getAssociationData()); newItem.stockLevels().removeAll(); + newItem.set("stockLevel", 0); this.editItem(newItem); } else {