ultimatepos/Modules/Tms/Resources/views/settings/index.blade.php

116 lines
6.8 KiB
PHP

@extends('layouts.app')
@section('title', __('tms::lang.settings'))
@section('content')
@include('tms::layouts.nav')
<section class="content no-print mt-page">
<div class="mt-page-header"><h1><i class="fas fa-sliders-h" style="color:#3b82f6;margin-left:8px;"></i> @lang('tms::lang.settings')</h1></div>
<div class="mt-card">
<div class="mt-card-body">
{!! Form::open(['url'=>action([\Modules\Tms\Http\Controllers\SettingsController::class,'update']),'method'=>'put']) !!}
<h4>@lang('tms::lang.general_settings')</h4>
<div class="row">
<div class="col-md-4">
<div class="form-group">
{!! Form::label('ref_prefix', __('tms::lang.ref_prefix').':*') !!}
{!! Form::text('ref_prefix', $settings['ref_prefix'] ?? 'TMS', ['class'=>'form-control','required']) !!}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{!! Form::label('default_carrier_id', __('tms::lang.default_carrier').':') !!}
{!! Form::select('default_carrier_id', $carriers, $settings['default_carrier_id'] ?? null, ['class'=>'form-control select2','placeholder'=>__('tms::lang.select'),'style'=>'width:100%']) !!}
</div>
</div>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('auto_create_on_sale', 1, !empty($settings['auto_create_on_sale'])) !!} @lang('tms::lang.auto_create_on_sale')</label>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('sync_transaction_shipping', 1, $settings['sync_transaction_shipping'] ?? true) !!} @lang('tms::lang.sync_transaction_shipping')</label>
</div>
@if($accounting_enabled)
<hr>
<h4>@lang('tms::lang.accounting_settings')</h4>
<div class="checkbox">
<label>{!! Form::checkbox('auto_post_freight_journal', 1, !empty($settings['auto_post_freight_journal'])) !!} @lang('tms::lang.auto_post_freight_journal')</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{!! Form::label('freight_expense_account_id', __('tms::lang.freight_expense_account').':') !!}
{!! Form::select('freight_expense_account_id', $accounts, $settings['freight_expense_account_id'] ?? null, ['class'=>'form-control select2','placeholder'=>__('tms::lang.select'),'style'=>'width:100%']) !!}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('freight_payment_account_id', __('tms::lang.freight_payment_account').':') !!}
{!! Form::select('freight_payment_account_id', $accounts, $settings['freight_payment_account_id'] ?? null, ['class'=>'form-control select2','placeholder'=>__('tms::lang.select'),'style'=>'width:100%']) !!}
</div>
</div>
</div>
@else
<p class="text-muted">@lang('tms::lang.accounting_not_enabled')</p>
@endif
<hr>
<h4>@lang('tms::lang.customs_settings')</h4>
<div class="row">
<div class="col-md-4">
<div class="form-group">
{!! Form::label('customs_ref_prefix', __('tms::lang.customs_ref_prefix').':') !!}
{!! Form::text('customs_ref_prefix', $settings['customs_ref_prefix'] ?? 'CUS', ['class'=>'form-control']) !!}
</div>
</div>
</div>
@if($accounting_enabled)
<div class="checkbox">
<label>{!! Form::checkbox('auto_post_customs_journal', 1, !empty($settings['auto_post_customs_journal'])) !!} @lang('tms::lang.auto_post_customs_journal')</label>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
{!! Form::label('customs_duty_expense_account_id', __('tms::lang.customs_duty_expense_account').':') !!}
{!! Form::select('customs_duty_expense_account_id', $accounts, $settings['customs_duty_expense_account_id'] ?? null, ['class'=>'form-control select2','placeholder'=>__('tms::lang.select'),'style'=>'width:100%']) !!}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::label('customs_payment_account_id', __('tms::lang.customs_payment_account').':') !!}
{!! Form::select('customs_payment_account_id', $accounts, $settings['customs_payment_account_id'] ?? null, ['class'=>'form-control select2','placeholder'=>__('tms::lang.select'),'style'=>'width:100%']) !!}
</div>
</div>
</div>
@endif
<hr>
<h4>@lang('tms::lang.customs_shipment_integration')</h4>
<div class="checkbox">
<label>{!! Form::checkbox('sync_customs_shipment_status', 1, $settings['sync_customs_shipment_status'] ?? true) !!} @lang('tms::lang.sync_customs_shipment_status')</label>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('auto_link_customs_shipment', 1, $settings['auto_link_customs_shipment'] ?? true) !!} @lang('tms::lang.auto_link_customs_shipment')</label>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('auto_create_shipment_on_customs_import', 1, $settings['auto_create_shipment_on_customs_import'] ?? true) !!} @lang('tms::lang.auto_create_shipment_on_customs_import')</label>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('require_customs_cleared_before_transit', 1, $settings['require_customs_cleared_before_transit'] ?? true) !!} @lang('tms::lang.require_customs_cleared_before_transit')</label>
</div>
<div class="checkbox">
<label>{!! Form::checkbox('exclude_uncleared_from_routes', 1, $settings['exclude_uncleared_from_routes'] ?? true) !!} @lang('tms::lang.exclude_uncleared_from_routes')</label>
</div>
<hr>
<h4>@lang('tms::lang.mission_integration')</h4>
<div class="checkbox">
<label>{!! Form::checkbox('sync_mission_status', 1, $settings['sync_mission_status'] ?? true) !!} @lang('tms::lang.sync_mission_status')</label>
</div>
<button type="submit" class="mt-btn-primary btn"><i class="fa fa-save"></i> @lang('tms::lang.save')</button>
{!! Form::close() !!}
</div>
</div>
</section>
@endsection