improved new features
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user