Skip to content

Commit

Permalink
WareHouseFix (#229)
Browse files Browse the repository at this point in the history
* WareHouseFix

* Update CHANGELOG.md
  • Loading branch information
Pfabeck authored and jochenmanz committed Sep 21, 2017
1 parent d43c503 commit 86f7218
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ private function getStock($variation)
return $warehouse['typeId'] === self::SALES_WAREHOUSE;
});

$warehouses = array_column($warehouses, 'typeId');
$warehouses = array_column($warehouses, 'id');
}

foreach ($variation['stock'] as $stock) {
if (in_array($stock['warehouseId'], $warehouses, true)) {
if (!in_array($stock['warehouseId'], $warehouses, true)) {
continue;
}

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- settings could not be saved in some shopware versions
- warehouse selection for item stock calculation was using the wrong identifier

### Changed
- client will retry on 500 errors, too
Expand Down

0 comments on commit 86f7218

Please sign in to comment.