
<script>
    $(document).ready(function (){
        $('#ledger-lists').select2();

        $('#ledger-lists').on('change', function (){
            let account = $(this).val();

            $('#account-label').addClass('error');
            if(account != ""){
                $('#account-label').removeClass('error');
            }
        });
    });
</script>
<?php echo Form::open(['action'=>['LedgerMappingsController@updateMapLedger', 'id'=>$id], 'method'=>'POST', 'id'=>'map-ledger-account']); ?>

<div class="guestDetails_input">
    <div class="guestDetails_inputLabel">
        <?php echo Form::label('account', 'Select an Account to Map this Ledger:', ['id'=>'account-label', 'class'=>'error']); ?>

        <span class="error">*</span></div>
    <div class="guestDetails_input">
        <select name="account" id="ledger-lists" style="width: 450px">
            <option value="">--Select a Ledger--</option>
            <?php $__currentLoopData = $unMappedLedgers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($row->id); ?>"><?php echo e($row->acc_name); ?>

                    <?php if($row->mainAccountDetails != null): ?>
                         - <?php echo strtoupper($row->mainAccountDetails->name); ?>

                    <?php endif; ?>
                </option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
</div>
<?php echo Form::close(); ?>

<?php /**PATH C:\xampp\htdocs\finewood\resources\views/libs/map-ledger-account.blade.php ENDPATH**/ ?>