@extends('backend.template.layouts.template-base') @section('title', 'Settings - Invoice Setting') @section('content') @php $scheduledDeliveryEnabled = old( 'scheduled_delivery_enabled', ($settings['scheduled_delivery_enabled'] ?? '1') === '1' ); // No old() here: slots aren't posted by this form any more, they come // straight from the Delivery Slots master as models. $scheduledSlots = $scheduledSlots ?? collect(); // Defaults to ON — every store behaved this way before the master switch // existed, so an unset key must not silently withdraw the option. $vkDeliverNowAvailable = old( 'vital_kitchen_deliver_now_available', ($settings['vital_kitchen_deliver_now_available'] ?? '1') === '1' ); $vkDeliverNowEnabled = old( 'vital_kitchen_deliver_now_enabled', ($settings['vital_kitchen_deliver_now_enabled'] ?? '0') === '1' ); $vkDeliverNowFrom = old('vital_kitchen_deliver_now_from', $settings['vital_kitchen_deliver_now_from'] ?? '09:00'); $vkDeliverNowTo = old('vital_kitchen_deliver_now_to', $settings['vital_kitchen_deliver_now_to'] ?? '21:00'); @endphp