mirror of
https://github.com/Karaka-Management/oms-StockTaking.git
synced 2026-01-11 10:38:39 +00:00
test fixes
This commit is contained in:
parent
aa2ef25ebc
commit
5108868776
|
|
@ -101,10 +101,9 @@ final class ApiController extends Controller
|
|||
// It is a little bit unfortunate that we cannot use attributes but it is what it is.
|
||||
|
||||
// Get distributions based on type and stock filter
|
||||
$stockTypeList = $request->getDataList('types') ?? [];
|
||||
$stockList = $request->getDataList('stocks') ?? [];
|
||||
$stockTypeList = $request->getDataList('types');
|
||||
$stockList = $request->getDataList('stocks');
|
||||
|
||||
$stocks = [];
|
||||
$stockMapper = StockMapper::getAll()
|
||||
->with('locations')
|
||||
->with('locations/type')
|
||||
|
|
@ -118,6 +117,9 @@ final class ApiController extends Controller
|
|||
$stockMapper->where('id', $stockList);
|
||||
}
|
||||
|
||||
/** @var \Modules\WarehouseManagement\Models\Stock[] $stocks */
|
||||
$stocks = $stockMapper->executeGetArray();
|
||||
|
||||
foreach ($stocks as $idx => $stock) {
|
||||
if (empty($stock->locations)) {
|
||||
unset($stocks[$idx]);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
|||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @template T of Stock
|
||||
* @template T of StockTaking
|
||||
* @extends DataMapperFactory<T>
|
||||
*/
|
||||
final class StockTakingMapper extends DataMapperFactory
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user