Skip to content

Commit

Permalink
Fixed issue with stock
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapjansma committed Feb 20, 2023
1 parent 232742f commit db71edf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description":"Isotope Stock.",
"type": "contao-bundle",
"license":"AGPL-3.0-or-later",
"version": "1.0.13",
"version": "1.0.14",
"require": {
"contao/core-bundle": "^4.9",
"isotope/isotope-core": "^2.6",
Expand Down
5 changes: 4 additions & 1 deletion src/Helper/ProductHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ public static function loadStockInfoForProducts(array $product_ids) {
$productAccountTypeBalance = [];
while ($productInfoQueryResult->next()) {
if (!isset($productAccounts[$productInfoQueryResult->product_id])) {
$productAccounts[$productInfoQueryResult->product_id] = $accounts[$productInfoQueryResult->account];
$productAccounts[$productInfoQueryResult->product_id] = $accounts;
}
if (!isset($productAccountTypeBalance[$productInfoQueryResult->product_id])) {
$productAccountTypeBalance[$productInfoQueryResult->product_id] = $accountTypeBalance;
}
$productAccounts[$productInfoQueryResult->product_id][$productInfoQueryResult->account]['debit'] = $productInfoQueryResult->debit;
$productAccounts[$productInfoQueryResult->product_id][$productInfoQueryResult->account]['credit'] = $productInfoQueryResult->credit;
Expand Down

0 comments on commit db71edf

Please sign in to comment.