refactor: standardize spacing in lambda functions and SQL queries across services
This commit is contained in:
parent
7164bd96d3
commit
a3c642e173
@ -107,5 +107,4 @@ public function destroy(RawMaterial $rawMaterial, RawMaterialPrice $variant): bo
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
use App\Enums\OrderChannel;
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Enums\PaymentType;
|
||||
use App\Enums\PriceType;
|
||||
use App\Enums\RawMaterialUnit;
|
||||
use App\Models\Attendance;
|
||||
use App\Models\CashAccount;
|
||||
@ -15,10 +14,8 @@
|
||||
use App\Models\Expense;
|
||||
use App\Models\LeaveRequest;
|
||||
use App\Models\Order;
|
||||
use App\Models\ProductVariant;
|
||||
use App\Models\Purchase;
|
||||
use App\Models\PurchaseItem;
|
||||
use App\Models\RawMaterialPrice;
|
||||
use App\Models\RestockItem;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
@ -472,10 +469,10 @@ public function getRevenueTrend(?string $startDate, ?string $endDate): array
|
||||
|
||||
return (clone $query)
|
||||
->join('order_items', 'orders.id', '=', 'order_items.order_id')
|
||||
->selectRaw("DATE(orders.created_at) as date")
|
||||
->selectRaw('DATE(orders.created_at) as date')
|
||||
->selectRaw('SUM(order_items.quantity) as qty')
|
||||
->groupBy(DB::raw("DATE(orders.created_at)"))
|
||||
->orderBy(DB::raw("DATE(orders.created_at)"))
|
||||
->groupBy(DB::raw('DATE(orders.created_at)'))
|
||||
->orderBy(DB::raw('DATE(orders.created_at)'))
|
||||
->get()
|
||||
->map(fn ($item) => [
|
||||
'date' => $item->date,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user