improved new features

This commit is contained in:
Luca Haid
2025-04-29 14:09:36 +02:00
parent 21f65aa905
commit a859bef97e
10 changed files with 338 additions and 279 deletions
@@ -27,7 +27,7 @@ class WarehouseArticleDistributorController extends TTCrud {
protected function checkExistingDistributorEntry($postData): bool {
if (isset($postData['id'])) {
$count = WarehouseArticleDistributorModel::count(['articleId' => $postData['articleId'],
'distributorId' => $postData['articlePriceTypeId'],
'distributorId' => $postData['distributorId'],
'id' => $postData['id']]);
if ($count > 0) return true;
@@ -66,6 +66,11 @@ class WarehouseArticleDistributorController extends TTCrud {
WarehouseArticleController::updateSellPrices($postData['articleId']);
}
protected function afterDelete($postData) {
WarehouseArticleController::updateCheapestPurchasePrice($postData);
WarehouseArticleController::updateSellPrices($postData);
}
protected function getHistoryAction() {
$history = WarehouseHistoryModel::getByRowId($this->request->id, $this->mod);