@extends('layouts.app') @section('title', __('zatca::lang.zatca')) @section('content') @include('zatca::layouts.partials.style') @include('zatca::layouts.nav') @php $business_id = request()->session()->get('user.business_id'); @endphp

@lang( 'zatca::lang.zatca' )


@if($settings->is_connected == 1)

@lang('zatca::lang.status') : @lang('zatca::lang.connected')

@else

@lang('zatca::lang.status') : @lang('zatca::lang.not_connected')

@endif
{!! Form::open(['url' => route('zatca.update', ['business_id' => $business_id]), 'method' => 'POST','id'=>'form_update_zatca']) !!} @csrf
{!! Form::label('tax_label_1', __('zatca::lang.tax_name') . ':') !!}
{!! Form::text('tax_label_1', $business->tax_label_1, ['class' => 'form-control','placeholder' => __('business.tax_1_placeholder')]); !!}
{!! Form::label('tax_number_1', __('zatca::lang.vat_no') . ':') !!}
{!! Form::text('tax_number_1', $business->tax_number_1, ['class' => 'form-control']); !!}
{!! Form::label('tax_label_2', __('zatca::lang.crn_name') . ':') !!}
{!! Form::text('tax_label_2', $business->tax_label_2, ['class' => 'form-control','placeholder' => __('business.tax_1_placeholder')]); !!}
{!! Form::label('tax_number_2', __('zatca::lang.crn_no') . ':') !!}
{!! Form::text('tax_number_2', $business->tax_number_2, ['class' => 'form-control', 'required']); !!}
{!! Form::label('city', __('business.city') . ':') !!} @error('city'){{ $message }} @enderror
{!! Form::text('city', $settings->city, ['class' => 'form-control']); !!}
{!! Form::label('postal_number', __('zatca::lang.postal_number') . ':') !!} @error('postal_number'){{ $message }} @enderror
{!! Form::text('postal_number', $settings->postal_number, ['class' => 'form-control']); !!}
{!! Form::label('company_address', __('zatca::lang.company_address') . ':') !!} @error('company_address'){{ $message }} @enderror
{!! Form::text('company_address', $settings->company_address, ['class' => 'form-control']); !!}
{!! Form::label('street_name', __('zatca::lang.street_name') . ':') !!} @error('street_name'){{ $message }} @enderror
{!! Form::text('street_name', $settings->street_name, ['class' => 'form-control']); !!}
{!! Form::label('building_number', __('zatca::lang.building_number') . ':') !!} @error('building_number'){{ $message }} @enderror
{!! Form::text('building_number', $settings->building_number, ['class' => 'form-control']); !!}
{!! Form::label('plot_identification', __('zatca::lang.plot_identification') . ':') !!} @error('plot_identification'){{ $message }} @enderror
{!! Form::text('plot_identification', $settings->plot_identification, ['class' => 'form-control']); !!}
{!! Form::label('city_sub_division', __('zatca::lang.city_sub_division') . ':') !!} @error('city_sub_division'){{ $message }} @enderror
{!! Form::text('city_sub_division', $settings->city_sub_division, ['class' => 'form-control', 'required']); !!}
{!! Form::label('businessCategory', __('zatca::lang.business_category') . ':') !!} @error('businessCategory'){{ $message }} @enderror
{!! Form::text('businessCategory', $settings->businessCategory, ['class' => 'form-control']); !!}
{!! Form::label('zatca_env', __('zatca::lang.zatca_env') . ':') !!} @error('zatca_env'){{ $message }} @enderror
@php $env_options = [ 'local' => __('zatca::lang.local'), 'simulation' => __('zatca::lang.simulation'), 'production' => __('zatca::lang.production'), ]; @endphp {!! Form::select('zatca_env', $env_options , $settings->zatca_env ?? 'local', ['class' => 'form-control','placeholder' => __('zatca::lang.select_zatca_connection'), 'required']); !!}
{!! Form::label('otp', __('zatca::lang.otp') . ':') !!} @error('otp'){{ $message }} @enderror
{!! Form::text('otp', $settings->otp, ['class' => 'form-control']); !!}
{!! Form::label('invoicing_type', __('zatca::lang.invoicing_type') . ':') !!} @error('invoicing_type'){{ $message }} @enderror
@php $types = [ '1000' => __('zatca::lang.invoice_tax'), '0100' => __('zatca::lang.simplified_invoice'), '1100' => __('zatca::lang.both'), ]; @endphp {!! Form::select('invoicing_type', $types , $settings->invoicing_type ?? 1100, ['class' => 'form-control','placeholder' => __('zatca::lang.invoicing_type'), 'required']); !!}

{{ __( 'zatca::lang.enable_auto_sync' ) }}

{!! Form::label('zatca_env', __('zatca::lang.sync_frequency') . ':') !!}
@php $frequency_options = [ 'instant' => __('zatca::lang.instant'), 'every_fifteen_minutes' => __('zatca::lang.every_fifteen_minutes'), 'every_thirty_minutes' => __('zatca::lang.every_thirty_minutes'), 'hourly' => __('zatca::lang.hourly'), 'hourly_at:15' => __('zatca::lang.hourly_at_15'), 'daily' => __('zatca::lang.daily'), ]; @endphp {!! Form::select('sync_frequency', $frequency_options, $settings->sync_frequency ?? 'hourly', ['class' => 'form-control','placeholder' => __('zatca::lang.sync_frequency'), 'id' => 'sync_frequency', 'disabled' => !$settings->enable_auto_sync]) !!}
{{--

--}} {{--

{{ __( 'zatca::lang.is_phase_two' ) }}

--}} {{--

{{ __( 'zatca::lang.is_production' ) }}

--}} {{--

@lang('zatca::lang.update_zatca_keys')

--}}
{!! Form::close() !!} @endsection @section('javascript')