@extends('crm.master') @section('title', 'Edit Discount') @section('content')

Edit Discount

{{ $discount->name }}

Back
@include('crm.components.alerts')
@csrf @method('PUT')
Discount Details
@error('name')
{{ $message }}
@enderror
@error('amount')
{{ $message }}
@enderror
@error('adjustment_type')
{{ $message }}
@enderror
Voucher / Code
Discount code required to enable this price.
@error('code')
{{ $message }}
@enderror
using_vouchers) ? 'checked' : '' }}>
Use single-use voucher codes instead of a multi-use discount code.
Validity
always_valid ? '1' : '0') == '1' ? 'checked' : '' }} onchange="toggleDateRange()">
@error('start_date')
{{ $message }}
@enderror
@error('end_date')
{{ $message }}
@enderror
@php $defaultDays = $discount->applicable_days ?? ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']; $oldDays = old('applicable_days', $defaultDays); @endphp
@foreach(['Mon','Tue','Wed','Thu','Fri','Sat','Sun'] as $day)
@endforeach
Product Scope
apply_to_all_products) ? 'checked' : '' }} onchange="toggleProductList()">
@php $selectedIds = old('product_ids', $discount->products->pluck('id')->toArray()); @endphp
@include('crm.components.product-selector')
Settings
enabled) ? 'checked' : '' }}>
Cancel
@endsection