@extends('admin.layouts.master') @section('content')

{{ trans('dynamicCommission::lang.dynamic_commissions') }}

{!! Form::open(['route' => ['dynamicCommission.routes.update'], 'class' => '', 'id' => 'form', 'data-toggle' => ' validator']) !!} @php $commissions = get_from_option_table('dynamicCommission_milestones', []); // dd($commissions); $reset_on_payout = get_from_option_table('dynamicCommission_reset_on_payout', 0); @endphp @unless(empty($commissions)) {!! Form::hidden('milestones[amounts][0]', 0, ['required']) !!} @endunless @foreach($commissions as $key => $commission)
@if($loop->first) {!! Form::label('amounts', trans('dynamicCommission::lang.when_sold') . ': ', ['class' => 'control-label']) !!} @endif
{{ config('system_settings.currency_symbol') ?: '$' }} {!! Form::number('milestones[amounts][]', $commission['milestone'], ['min' => 0, 'steps' => 'any', 'class' => 'form-control', 'placeholder' => trans('dynamicCommission::lang.milestone_amount'), $commission['milestone'] == 0 ? 'disabled' : '', 'required']) !!} {{ trans('dynamicCommission::lang.and_up') }}
@if($loop->first) {!! Form::label('amounts', trans('dynamicCommission::lang.commission_rate') . ': ', ['class' => 'control-label']) !!} @endif
{!! Form::number('milestones[commissions][]', $commission['commission'], ['min' => 0, 'steps' => 'any', 'class' => 'form-control', 'placeholder' => trans('dynamicCommission::lang.commission'), 'required']) !!} {{ trans('app.percent') }}
@if($loop->first) @endif @unless($commission['milestone'] == 0) @endunless
@endforeach {{-- virtual_milestones --}}
{!! Form::submit(trans('app.update'), ['class' => 'btn btn-lg btn-flat btn-new pull-right']) !!}
{!! Form::close() !!}
{!! Form::label('dynamicCommission_reset_on_payout', trans('dynamicCommission::lang.sold_amount_reset_on_payout'). ':', ['class' => 'with-help control-label']) !!}
@endsection @section('page-script') @include('dynamicCommission::scripts.dynamic_fields') @endsection