mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Only show in-stock products on the /consume page (closes #1429)
This commit is contained in:
parent
ffad8bfa7f
commit
70d51c757b
@ -28,6 +28,7 @@
|
|||||||
### Stock improvements/fixes
|
### Stock improvements/fixes
|
||||||
- Product barcodes are now enforced to be unique across products
|
- Product barcodes are now enforced to be unique across products
|
||||||
- On the stock overview page it's now also possible to search/filter by product barcodes (via the general search field)
|
- On the stock overview page it's now also possible to search/filter by product barcodes (via the general search field)
|
||||||
|
- The product picker on the consume page now only shows products which are currently in stock
|
||||||
- Fixed that editing stock entries was not possible
|
- Fixed that editing stock entries was not possible
|
||||||
- Fixed that consuming with Scan Mode was not possible
|
- Fixed that consuming with Scan Mode was not possible
|
||||||
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape)
|
- Fixed that the current stock total value (header of the stock overview page) didn't include decimal amounts (thanks @Ape)
|
||||||
|
@ -11,7 +11,7 @@ class StockController extends BaseController
|
|||||||
public function Consume(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
public function Consume(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||||
{
|
{
|
||||||
return $this->renderPage($response, 'consume', [
|
return $this->renderPage($response, 'consume', [
|
||||||
'products' => $this->getDatabase()->products()->where('active = 1')->orderBy('name'),
|
'products' => $this->getDatabase()->products()->where('active = 1')->where('id IN (SELECT product_id from stock_current WHERE amount_aggregated > 0)')->orderBy('name'),
|
||||||
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
'barcodes' => $this->getDatabase()->product_barcodes_comma_separated(),
|
||||||
'recipes' => $this->getDatabase()->recipes()->where('type', RecipesService::RECIPE_TYPE_NORMAL)->orderBy('name', 'COLLATE NOCASE'),
|
'recipes' => $this->getDatabase()->recipes()->where('type', RecipesService::RECIPE_TYPE_NORMAL)->orderBy('name', 'COLLATE NOCASE'),
|
||||||
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
'locations' => $this->getDatabase()->locations()->orderBy('name', 'COLLATE NOCASE'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user