@extends('admin.layouts.master') @section('title', __('admin.contract_pricing.title')) @section('content')

{{ __('admin.contract_pricing.title') }}

{{ $project->project_name }}
{{ __('admin.actions.back_to_list') }}
@if(session('success'))
{{ session('success') }}
@endif
{{ __('admin.contract_pricing.configure') }}
@csrf
@error('contract_type_id')
{{ $message }}
@enderror
{{ app()->getLocale() === 'ar' ? 'ريال' : 'SAR' }}
@error('base_price')
{{ $message }}
@enderror
{{-- Commission Rate (shown only for commission type) --}}
%
{{ app()->getLocale() === 'ar' ? 'ريال' : 'SAR' }}
{{ app()->getLocale() === 'ar' ? 'ريال' : 'SAR' }}
{{-- Live Preview Card --}}
{{ app()->getLocale() === 'ar' ? 'معاينة التسعير' : 'Pricing Preview' }}
@php $pricing = $project->contractPricing; @endphp
@if($pricing?->pricing_type === 'fixed_commission') @endif
{{ __('admin.contract_pricing.fields.base_price') }} {{ number_format($pricing?->base_price ?? 0, 2) }}
{{ __('admin.contract_pricing.fields.commission_rate') }} ({{ $pricing->commission_rate }}%) {{ number_format($pricing->commission_amount ?? 0, 2) }}
{{ __('admin.contract_pricing.fields.additional_costs') }} {{ number_format($pricing?->additional_costs ?? 0, 2) }}
{{ app()->getLocale() === 'ar' ? 'المجموع الفرعي' : 'Subtotal' }} {{ number_format($pricing?->subtotal ?? 0, 2) }}
{{ __('admin.contract_pricing.fields.discount') }} - {{ number_format($pricing?->discount ?? 0, 2) }}
{{ __('admin.contract_pricing.fields.total_price') }} {{ number_format($pricing?->total_price ?? 0, 2) }}
@if($pricing)
{{ app()->getLocale() === 'ar' ? 'آخر تحديث: ' : 'Last updated: ' }}{{ $pricing->updated_at->format('Y-m-d H:i') }}
@endif
{{-- Pricing Type Info --}}
{{ app()->getLocale() === 'ar' ? 'أنواع التسعير' : 'Pricing Types' }}
{{ __('admin.contract_pricing.types.fixed_price') }}

{{ app()->getLocale() === 'ar' ? 'مبلغ ثابت متفق عليه مسبقاً. الإجمالي = السعر الأساسي + تكاليف إضافية - خصم.' : 'A fixed pre-agreed amount. Total = Base Price + Additional Costs - Discount.' }}

{{ __('admin.contract_pricing.types.fixed_commission') }}

{{ app()->getLocale() === 'ar' ? 'نسبة عمولة ثابتة على قيمة المشروع. الإجمالي = السعر الأساسي + (السعر × نسبة العمولة) + تكاليف إضافية - خصم.' : 'A fixed commission percentage on the project value. Total = Base Price + (Base × Commission%) + Additional Costs - Discount.' }}

@push('scripts') @endpush @endsection