Add multi-branch POS with team roles and branch-scoped cashiers.
Deploy Ladill POS / deploy (push) Successful in 1m58s
Deploy Ladill POS / deploy (push) Successful in 1m58s
Pro and Business users can manage branches, invite cashiers with branch assignment, and switch registers; sales and register flows respect acting location. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -21,7 +21,7 @@ class DashboardController extends Controller
|
||||
$owner = $this->ownerRef($request);
|
||||
$todayStart = now()->startOfDay();
|
||||
|
||||
$todaySales = PosSale::owned($owner)
|
||||
$todaySales = $this->scopeToLocation($request, PosSale::owned($owner))
|
||||
->where('status', PosSale::STATUS_PAID)
|
||||
->where('paid_at', '>=', $todayStart);
|
||||
|
||||
@@ -29,10 +29,11 @@ class DashboardController extends Controller
|
||||
'today_total_minor' => (int) (clone $todaySales)->sum('total_minor'),
|
||||
'today_count' => (clone $todaySales)->count(),
|
||||
'product_count' => PosProduct::owned($owner)->active()->count(),
|
||||
'open_pending' => PosSale::owned($owner)->where('status', PosSale::STATUS_PENDING)->count(),
|
||||
'open_pending' => $this->scopeToLocation($request, PosSale::owned($owner))
|
||||
->where('status', PosSale::STATUS_PENDING)->count(),
|
||||
];
|
||||
|
||||
$recentSales = PosSale::owned($owner)
|
||||
$recentSales = $this->scopeToLocation($request, PosSale::owned($owner))
|
||||
->with('lines')
|
||||
->latest()
|
||||
->limit(8)
|
||||
|
||||
Reference in New Issue
Block a user