Fixed /stock/products/{productId}/add request body parameter validation (fixes #1860)

This commit is contained in:
Bernd Bestel
2022-04-15 15:40:55 +02:00
parent f7eb8cc127
commit d4bd6b2fb3
2 changed files with 57 additions and 2 deletions

View File

@@ -130,9 +130,9 @@ class StockApiController extends BaseApiController
}
$transactionType = StockService::TRANSACTION_TYPE_PURCHASE;
if (array_key_exists('transaction_type', $requestBody) && !empty($requestBody['transactiontype']))
if (array_key_exists('transaction_type', $requestBody) && !empty($requestBody['transaction_type']))
{
$transactionType = $requestBody['transactiontype'];
$transactionType = $requestBody['transaction_type'];
}
$stockLabelType = 0;