@extends('layouts.app') @section('title', 'FBR Settings') @section('content')

FBR Settings Configure FBR API credentials and location settings

{!! Form::open(['url' => action('FbrInvoiceController@saveSettings'), 'method' => 'post', 'id' => 'fbr_settings_form', 'files' => true]) !!} @component('components.widget', ['class' => 'box-primary', 'title' => 'FBR API Credentials'])
{!! Form::label('client_id', 'Client ID:' ) !!} {!! Form::text('client_id', $fbrSetting->client_id ?? null, ['class' => 'form-control', 'placeholder' => 'Enter FBR Client ID', 'required' => true]); !!} Enter the Client ID provided by FBR
{!! Form::label('client_secret', 'Client Secret:' ) !!} {!! Form::text('client_secret', $fbrSetting->client_secret ?? null, ['class' => 'form-control', 'placeholder' => 'Enter FBR Client Secret', 'required' => true]); !!} Enter the Client Secret provided by FBR
{!! Form::label('username', 'Username:' ) !!} {!! Form::text('username', $fbrSetting->username ?? null, ['class' => 'form-control', 'placeholder' => 'Enter FBR Username', 'required' => true]); !!} Enter your FBR portal username
{!! Form::label('password', 'Password:' ) !!} {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Enter FBR Password', 'required' => empty($fbrSetting)]); !!} Enter your FBR portal password
{!! Form::label('environment', 'Environment:' ) !!} {!! Form::select('environment', ['sandbox' => 'Sandbox (Testing)', 'production' => 'Production'], $fbrSetting->environment ?? 'sandbox', ['class' => 'form-control select2', 'required' => true]); !!} Select Sandbox for testing or Production for live transactions
@endcomponent @component('components.widget', ['class' => 'box-info', 'title' => 'Digital Certificate (Optional)'])
{!! Form::label('certificate', 'Certificate File (.pfx / .p12):' ) !!} Upload your .pfx or .p12 digital certificate file @if(!empty($fbrSetting->certificate_path))

Certificate uploaded: {{ basename($fbrSetting->certificate_path) }}

@endif
{!! Form::label('certificate_password', 'Certificate Password:' ) !!} {!! Form::password('certificate_password', ['class' => 'form-control', 'placeholder' => 'Enter Certificate Password']); !!} Enter the password for your certificate file
@endcomponent
{!! Form::close() !!} @component('components.widget', ['class' => 'box-success', 'title' => 'Location-wise FBR Settings'])
@forelse($locations as $location) @empty @endforelse
Location Name FBR Enabled Action
{{ $location->name }} @if($location->fbr_enabled) Enabled @else Disabled @endif
No locations found
@endcomponent
@stop @section('javascript') @endsection