From 7343571af724763b4cf4362c10cacf8379aa6903 Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Tue, 29 Apr 2025 14:16:51 +0200 Subject: [PATCH] improved new features --- .../WarehouseArticleDistributorController.php | 4 ++-- public/js/pages/WarehouseArticle/WarehouseArticle.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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(); } },