#117: Draft orders should not show up in order tabs
This commit is contained in:
parent
0385f614d6
commit
47669851ff
@ -1,4 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
**2025-03-11**
|
**2025-03-11**
|
||||||
|
- Fixed #117 - Draft orders should not show up in order tabs
|
||||||
- Fixed #116 - 'Ready for invoice'-badge shows 0 instead of hiding
|
- Fixed #116 - 'Ready for invoice'-badge shows 0 instead of hiding
|
||||||
|
@ -18,6 +18,7 @@ class ListOrders extends ListRecords
|
|||||||
private function excludeStatuses($query): mixed
|
private function excludeStatuses($query): mixed
|
||||||
{
|
{
|
||||||
return $query
|
return $query
|
||||||
|
->whereNot('status', OrderStatus::DRAFT)
|
||||||
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
||||||
->whereNot('status', OrderStatus::INVOICED)
|
->whereNot('status', OrderStatus::INVOICED)
|
||||||
->whereNot('status', OrderStatus::SHIPPED);
|
->whereNot('status', OrderStatus::SHIPPED);
|
||||||
@ -26,6 +27,7 @@ private function excludeStatuses($query): mixed
|
|||||||
private function getBadgeCount(callable $queryCallback): ?int
|
private function getBadgeCount(callable $queryCallback): ?int
|
||||||
{
|
{
|
||||||
$count = Order::query()->when(true, $queryCallback)
|
$count = Order::query()->when(true, $queryCallback)
|
||||||
|
->whereNot('status', OrderStatus::DRAFT)
|
||||||
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
->whereNot('status', OrderStatus::READY_FOR_INVOICE)
|
||||||
->whereNot('status', OrderStatus::INVOICED)
|
->whereNot('status', OrderStatus::INVOICED)
|
||||||
->whereNot('status', OrderStatus::SHIPPED)
|
->whereNot('status', OrderStatus::SHIPPED)
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
| or any other location as required by the application or its packages.
|
| or any other location as required by the application or its packages.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'version' => '20250310',
|
'version' => '20250311',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user