Skip to content

Commit

Permalink
Merge branch 'hotfix/0.23.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
polosson committed Jun 10, 2024
2 parents dfc2b65 + 187c59c commit f84b287
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ Ce projet adhère au principe du [Semantic Versioning](https://semver.org/spec/v
- Il est maintenant possible de remettre les inventaires de départ et de retour en attente.
Cela revient à annuler leur état "terminé" et à rétablir le stock en réintégrant les quantités cassés.

## 0.23.4 (2024-06-10)

- Corrige le tri du matériel selon la quantité.

## 0.23.3 (2024-04-11)

- Limite le nombre de vérifications différées simultanées du matériel manquant (2 par défaut).
Expand Down
4 changes: 2 additions & 2 deletions server/src/App/Controllers/MaterialController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ public function getAll(Request $request, Response $response): ResponseInterface
if ($orderBy === 'stock_quantity') {
$query
->reorder(
$query->raw('stock_quantity'),
'stock_quantity',
$ascending ? 'asc' : 'desc',
);
}
if ($orderBy === 'out_of_order_quantity') {
$query
->reorder(
$query->raw('out_of_order_quantity'),
'out_of_order_quantity',
$ascending ? 'asc' : 'desc',
);
}
Expand Down
4 changes: 2 additions & 2 deletions server/src/App/Models/Material.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,15 +625,15 @@ public function scopeCustomOrderBy(Builder $query, string $column, string $direc
if ($column === 'stock_quantity') {
return $query
->orderBy(
$query->raw('stock_quantity'),
'stock_quantity',
$direction,
);
}

if ($column === 'out_of_order_quantity') {
return $query
->orderBy(
$query->raw('out_of_order_quantity'),
'out_of_order_quantity',
$direction,
);
}
Expand Down

0 comments on commit f84b287

Please sign in to comment.