| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- /**
- * @var int $id
- */
- $customer = Customer::require($id);
- $core = Core::getInstance();
- $core->addBreadcrumb("/customers", __("Customers"));
- $core->addBreadcrumb($customer->getUrl(), $customer->name);
- $user = $core->getUser();
- $user->requireAdmin();
- $core->addScript("/js/new-sale-modal.js");
- $core->addScript("/js/ticket-modal.js");
- $core->addScript("/js/map.js");
- $location_ids = array_column($customer->getLocations(), "id");
- $sales = Sale::query([
- "location_id" => $location_ids,
- "dts_deleted" => null
- ]);
- $tickets = Ticket::query([
- "location_id" => $location_ids,
- "dts_deleted" => null
- ]);
- View::include("header");
- View::include("customer", compact("customer", "sales", "tickets"));
- View::include("modals/new_sale", compact("customer"));
- View::include("modals/ticket", compact("customer"));
- View::include("footer");
|