@use('App\Services\Date') @extends('companyuser::layouts.master') @section('title', __('sales::proforma_invoices.edit_invoice')) @section('extra-styles') @if (app()->getLocale() == 'en') @else @endif @endsection @section('breadcrumb') @endsection @section('content')
@csrf @method('PUT')
@include('companyuser::errors.operation-locked') @include('companyuser::errors.lists') @error('type') @enderror
@error('code') @enderror
( @lang('optional') )
@error('description')

{{ $message }}

@enderror
@php $selectedCustomerId = $proformaInvoice->customer_id ?? old('customer_id') ?? request('customer'); @endphp
@error('customer_id') @enderror
@error('issue_date') @enderror
@error('due_date') @enderror

@lang('sales::invoices.Customer Details'):

@lang('sales::invoices.Phone'):
@lang('sales::invoices.Email'):
@error('products')

{{ $message }}

@enderror @error('products.*')

{{ $message }}

@enderror @error('labor_fee')

{{ $message }}

@enderror
@if ($customFields->count()) {{-- this to handle the case when user create item when there is no custom fields then add custom fields from setting then open the edit page this means get the custom fields in bill , if it is empty it means there wasn't customfields so get the noraml custom fields that came from settings --}} @php $customFields = json_decode($proformaInvoice->custom_fields, true) ?? $customFields @endphp
@foreach ($customFields as $key => $field)
@if ($field['type'] == 'checkbox') @else @endif
@endforeach
@endif
@error('terms') @enderror
@error('notes') @enderror
@endsection @section('extra_scripts') @include('sales::scripts.get_products_sales_script') @endsection