@extends('layouts.master') @section('css') @section('title') {{ __('home.sales') }} @stop @endsection @section('content') {{--بداية سكشن العميل اول سكشن --}}
# ID
{{ __('sales.mobile_number') }}
{{ __('sales.vat_no') }}
{{ __('sales.id_number') }}
{{ __('sales.category') }}
{{ __('sales.order_date') }}
{{ __('sales.delivery_date') }}
user()->roles_name) ? 'readonly' : '' }}>
{{-- موديل اضافة عميل --}} {{-- موديل اضافة عميل --}} {{-- موديل بحث عن عميل --}} {{-- موديل بحث عن عميل --}} {{--نهاية سكشن العميل اول سكشن --}} {{--بداية سكشن المقاسات تاني سكشن --}}
@php $measurements = [ __('sales.front_length') => 'front_length', __('sales.back_length') => 'back_length', __('sales.shoulder_width') => 'shoulder_width', __('sales.sleeve_length') => 'sleeve_length', __('sales.arm_width') => 'arm_width', __('sales.arm_mid_width') => 'arm_mid_width', __('sales.arm_bottom_width') => 'arm_bottom_width', __('sales.chest_width') => 'chest_width', __('sales.neck_size') => 'neck_size', __('sales.collar_size') => 'collar_size', __('sales.neck_plain') => 'neck_plain', __('sales.step_width') => 'step_width' ]; @endphp @foreach($measurements as $label => $db_field)
@endforeach @php // جلب الأدوار $roles = is_array(auth()->user()->roles_name) ? auth()->user()->roles_name : json_decode(auth()->user()->roles_name, true); $isAuthorizedRole = in_array('Admin', $roles ?? []) || in_array('Manger', $roles ?? []); // جلب بيانات فرع الموظف الحالي (عن طريق العلاقة في موديل User) $branchCanEdit = auth()->user()->branch->allow_extra_edit ?? false; // الشرط النهائي: لو هو إداري "أو" فرعه مسموح له $canEditIncrease = $isAuthorizedRole || $branchCanEdit; @endphp
@php $notes = [ __('sales.notes_one') => 'notes_one', __('sales.notes_two') => 'notes_two', __('sales.notes_three') => 'notes_three', __('sales.notes_four') => 'notes_four', ]; @endphp @foreach($notes as $label => $db_field)
@endforeach {{-- الإضافة الجديدة: عدد الطقطق ونوع الجيب --}}
@php // تقسيم الحقول إلى 3 مجموعات كما في تصميمك الأصلي $groups = [ ['hand_plain', 'kabak_plain', 'hidden_pockets'], // المجموعة 1 ['janzour', 'hidden', 'visible_hidden'], // المجموعة 2 ['hidden_sewing', 'twisted_sewing', 'visible_pockets'] // المجموعة 3 ]; $checkIndex = 1; // عداد الـ ID يبدأ من 1 @endphp @foreach($groups as $group)
@foreach($group as $field)
{{-- الـ id هنا هيطلع check1, check2, إلخ لضمان عمل الـ Ajax --}}
@php $checkIndex++; @endphp @endforeach
@endforeach
{{--نهاية سكشن المقاسات تاني سكشن --}} {{--بداية سكشن الموديلات رابع سكشن --}}
@php // تعديل قيم الـ max والمسارات بناءً على الموديلات الجديدة $style_sections = [ 'neck' => ['title' => __('sales.neck_section'), 'folder' => 'neck', 'max' => 24], // زادت لـ 20 'janzour' => ['title' => __('sales.janzour_section'), 'folder' => 'janzour', 'max' => 10], // عدل الرقم حسب فعلي 'sleeve' => ['title' => __('sales.sleeve_section'), 'folder' => 'sleeve', 'max' => 19], 'side_p' => ['title' => __('sales.side_p_section'), 'folder' => 'side_p', 'max' => 8], 'front_p' => ['title' => __('sales.front_p_section'), 'folder' => 'front_p', 'max' => 16], ]; @endphp @foreach($style_sections as $key => $info)
{{ $info['title'] }}
{{ __('sales.style_model') }} 1
{{-- نمنع الـ click من تفعيل اختيار الصندوق --}}
@endforeach
{{--نهاية سكشن الموديلات رابع سكشن --}} {{--بداية سكشن الانزال تالت سكشن --}}
{{ __('sales.qty') }} {{ __('sales.unit') }} {{ __('sales.item_number') }} {{ __('sales.item_name') }} {{ __('sales.description') }} {{ __('sales.unit_price') }} {{ __('sales.totall') }} {{ __('sales.discount') }} {{ __('sales.tax') }} {{ __('sales.net_total') }}
{{--نهاية سكشن الانزال تالت سكشن --}} {{-- موديل البحث --}} {{-- موديل البحث --}}
{{ __('home.sewing_summary') }}
{{-- البيانات هنا هيتم توليدها برضه باستخدام الترجمة لو ثابتة --}}
{{ __('home.customer') }} {{ __('home.type') }} {{ __('home.measurements') }} {{ __('home.models') }} {{ __('home.specifications') }} {{ __('home.meters') }} {{ __('home.price') }} {{ __('home.action') }}
{{--بداية سكشن الحسابات خامس سكشن --}}
{{ __('sales.subtotal_before_tax_discount') }} 0.00
{{ __('sales.discount') }}
{{-- نضرب في 100 هنا للعرض فقط --}} {{ __('sales.vat_amount') }} ({{ $tax_rate * 100 }}%): 0.00
{{-- الحقل المخفي يفضل كما هو بالقيمة العشرية 0.15 لسهولة الحساب --}} {{-- تخزين الحد الأقصى للخصم القادم من السيستم --}}
{{ __('sales.final_price_inc_tax') }}
0.00
{{--
--}}
{{--نهاية سكشن الحسابات خامس سكشن --}} {{--بداية سكشن الدفع سادس سكشن --}} {{--نهاية سكشن الدفع سادس سكشن --}} @endsection @section('js') {{-- Select2 --}} @endsection