<!-- Number Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('number', __('models/receiveMoneys.fields.number').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('number', null, ['class' => 'form-control','maxlength' => 15,'maxlength' => 15, 'readonly']); ?>

</div>
</div>

<!-- Unit Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('divisi_unit', __('models/receiveMoneys.fields.unit').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::select('divisi_unit', $unitItems, null, ['class' => 'form-control select2', 'required' => 'required', 'onchange' => 'setBankUnit(this)']); ?>

</div>
</div>

<!-- Checking Account Date Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('checking_account_date', __('models/receiveMoneys.fields.checking_account_date').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('checking_account_date', null, ['class' => 'form-control datetime', 'required' => 'required' ,'data-optiondate' => json_encode( ['locale' => ['format' => config('local.date_format_javascript') ]]),'id'=>'checking_account_date']); ?>

</div>
</div>

<!-- Transaction Date Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('transaction_date', __('models/receiveMoneys.fields.transaction_date').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('transaction_date', null, ['class' => 'form-control datetime', 'required' => 'required' ,'data-optiondate' => json_encode( ['locale' => ['format' => config('local.date_format_javascript') ]]),'id'=>'transaction_date']); ?>

</div>
</div>

<!-- Customer Code Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('customer_code', __('models/receiveMoneys.fields.customer_code').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::select('customer_code', $customerItems ?? [] , null, array_merge(['class' => 'form-control select2', 'data-url' => route('selectAjax'), 'data-repository' => 'Base\\MasterpelangganRepository' ], config('local.select2.ajax'))); ?>

</div>
</div>

<!-- Bank Code Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('bank_code', __('models/receiveMoneys.fields.bank_code').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::select('bank_code', $bankItems, null, ['class' => 'form-control select2', 'required' => 'required']); ?>

</div>
</div>

<!-- Amount Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('amount', __('models/receiveMoneys.fields.amount').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::number('amount', null, ['class' => 'form-control inputmask', 'required' => 'required', 'data-unmask' => 1, 'data-optionmask' => json_encode(config('local.number.integer')) ]); ?>

</div>
</div>

<!-- Lhph Number Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('lhph_number', __('models/receiveMoneys.fields.lhph_number').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('lhph_number', null, ['class' => 'form-control','maxlength' => 10]); ?>

</div>
</div>

<!-- Note Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('note', __('models/receiveMoneys.fields.note').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('note', null, ['class' => 'form-control','maxlength' => 50]); ?>

</div>
</div>

<?php if(isset($receiveMoney->id)): ?>   
<!-- Bkm Number Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('bkm_number', __('models/receiveMoneys.fields.bkm_number').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('bkm_number', null, ['class' => 'form-control','maxlength' => 10, 'readonly']); ?>

</div>
</div>    
<?php endif; ?>


<!-- Customer Identifier Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('customer_identifier', __('models/receiveMoneys.fields.customer_identifier').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::select('customer_identifier',$customerIdentifier ?? [], null, array_merge(['class' => 'form-control select2', 'data-url' => route('selectAjax'), 'data-repository' => 'Base\\MappingCustomersRepository' ], config('local.select2.ajax'))); ?>

</div>
</div>

<!-- Type Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('type', __('models/receiveMoneys.fields.type').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <label class="radio-inline">
        <?php echo Form::radio('type', "KS", null); ?> KS
    </label>
    <label class="radio-inline">
        <?php echo Form::radio('type', "PD", null); ?> PD
    </label>    
</div>
</div>

<!-- Cash Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('cash', __('models/receiveMoneys.fields.cash').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9">    
    <label class="radio-inline">
        <?php echo Form::radio('cash', "KU", null); ?> KU
    </label>
    <label class="radio-inline">
        <?php echo Form::radio('cash', "UT", null); ?> UT
    </label>
</div>
</div>

<!-- Nomonp Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('nomonp', __('models/receiveMoneys.fields.nomonp').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('nomonp', null, ['class' => 'form-control','maxlength' => 15,'maxlength' => 15]); ?>

</div>
</div>

<!-- Stsnk Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('stsnk', __('models/receiveMoneys.fields.stsnk').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <label class="radio-inline">
        <?php echo Form::radio('stsnk', "T", null); ?> Tidak
    </label>
    <label class="radio-inline">
        <?php echo Form::radio('stsnk', "NK", null); ?> Ya
    </label>    
</div>
</div>

<!-- Giro Number Field -->
<div class="form-group row mb-3">
    <?php echo Form::label('giro_number', __('models/receiveMoneys.fields.giro_number').':', ['class' => 'col-md-3 col-form-label']); ?>

<div class="col-md-9"> 
    <?php echo Form::text('giro_number', null, ['class' => 'form-control','maxlength' => 20,'maxlength' => 20]); ?>

</div>
</div>

<?php $__env->startPush('scripts'); ?>
    <script>
        function setBankUnit(elm){
            let _val = $(elm).val()
            $('select[name=bank_code]').val('')
            $('select[name=bank_code]').trigger('change')
            $('select[name=bank_code]').find('optgroup').prop('disabled',true)
            $('select[name=bank_code]').find('optgroup[label='+_val+']').prop('disabled',false)
        }
    </script>
<?php $__env->stopPush(); ?><?php /**PATH /data/docker/wjc/portal/resources/views/transaction/receive_moneys/fields.blade.php ENDPATH**/ ?>