diff --git a/application/WarehouseArticleDistributor/WarehouseArticleDistributorController.php b/application/WarehouseArticleDistributor/WarehouseArticleDistributorController.php index 4ab14349e..b76ee77f0 100644 --- a/application/WarehouseArticleDistributor/WarehouseArticleDistributorController.php +++ b/application/WarehouseArticleDistributor/WarehouseArticleDistributorController.php @@ -67,8 +67,8 @@ class WarehouseArticleDistributorController extends TTCrud { } protected function afterDelete($postData) { - WarehouseArticleController::updateCheapestPurchasePrice($postData["id"]); - WarehouseArticleController::updateSellPrices($postData["id"]); + WarehouseArticleController::updateCheapestPurchasePrice($postData["articleId"]); + WarehouseArticleController::updateSellPrices($postData["articleId"]); } protected function getHistoryAction() { diff --git a/public/js/pages/WarehouseArticle/WarehouseArticle.js b/public/js/pages/WarehouseArticle/WarehouseArticle.js index 97061783a..18fab8cf3 100644 --- a/public/js/pages/WarehouseArticle/WarehouseArticle.js +++ b/public/js/pages/WarehouseArticle/WarehouseArticle.js @@ -121,7 +121,7 @@ Vue.component('warehouse-article-distributor', { await this.fetchArticleDistributors(); }, async deleteDistributor(distributorId) { - await this.window.handleApiResponse(axios.post(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseArticleDistributor/delete`, {id: distributorId})); + await this.window.handleApiResponse(axios.post(`${window['TT_CONFIG']['BASE_PATH']}/WarehouseArticleDistributor/delete`, {id: distributorId, articleId: this.id})); await this.fetchArticleDistributors(); } },