{{ __('Most specific wins: service beats category beats global.') }}
| {{ __('Scope') }} | {{ __('Applies to') }} | {{ __('Margin') }} | {{ __('Status') }} | {{ __('Action') }} |
|---|---|---|---|---|
| @php $scopeTone = ['service' => 'rf-badge-active', 'category' => 'rf-badge-info', 'global' => 'rf-badge-neutral'][$rule->scope]; @endphp {{ __(ucfirst($rule->scope)) }} | @if ($rule->scope === 'service') {{ $rule->service?->name ?? '—' }} @elseif ($rule->scope === 'category') {{ $rule->category?->name ?? '—' }} @else {{ __('All services') }} @endif | @if ($rule->margin_type === 'percent') +{{ rtrim(rtrim(number_format((float) $rule->margin_value, 2), '0'), '.') }}% @else +{{ rate_money($rule->margin_value, $this->panelCurrency()) }} @endif |
|
{{ __('See exactly what your client pays vs your owner cost.') }}
{{-- Searchable, server-side: the catalogue holds thousands of services, so only the first 20 matches ever reach the browser. --}} {{-- .live on purpose: with a deferred wire:model the child component kept the chosen service but the parent never re-rendered, so picking a service showed NOTHING until another request. --}}{{ __('Pick a service to preview its price.') }}
{{ $message }}
@enderror{{ $message }}
@enderror{{ $message }}
@enderror{{ __('Percent: client price = owner price × (1 + margin/100). Fixed: client price = owner price + margin.') }}