<style type="text/css">
    .chosen-container a.chosen-single{line-height: 24px !important;}
    .form-group{margin-bottom: 4px !important;}
</style>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?= print_lang($app_lang,'mod_db_cr_voucher_edit_breadcrumb'); ?></h2>
        <ol class="breadcrumb">
            <li>
                <a class="url-elem" href="<?php echo url('/dashboard'); ?>"><?= print_lang($app_lang,'home'); ?></a>
            </li>
            <li>
                <a class="url-elem" href="<?php echo url('/debit-credit-voucher'); ?>"><?= print_lang($app_lang,'mod_db_cr_voucher_view_breadcrumb'); ?></a>
            </li>
            <li class="active">
                <strong><?= print_lang($app_lang,'mod_db_cr_voucher_edit_breadcrumb'); ?></strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>



<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox-title">
        <h5><?= print_lang($app_lang,'fields_with'); ?> <strong class="text-danger">*</strong> <?= print_lang($app_lang,'are_mandatory'); ?></h5>

        <div class="text-<?php if($app_direction == 'rtl'){echo 'left';}else{echo 'right';} ?>">
            <input style="width: 100px; border: none; background: #e0e0e0; padding: 9px 5px; text-align: center; border-radius: 2px; color: black;" type="text" class="pointer-none" value="<?= print_lang($app_lang,'add_entry_sr_num').' '.$editing_data['serial_id']; ?>" readonly="">
        </div>
    </div>
    <div class="ibox-content">
        <!-- spinner -->
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
        <!-- spinner -->

        <form role="form" id="debit-credit-voucher-form" action="<?php echo url('/debit-credit-voucher/update').'/'.$editing_data['uid']; ?>">
            <div class="row extra-mar-botm">
                <div class="col-md-6">
                    <div class="form-group">
                        <label><?= print_lang($app_lang,'mod_db_cr_voucher_add_type'); ?></label>
                        <select class="form-control chosen-select" name="type">
                            <option value="debit" <?php if($editing_data['type'] == 'debit'){echo "selected='selected'"; }?>><?= print_lang($app_lang,'mod_db_cr_voucher_add_type_debit'); ?></option>
                            <option value="credit" <?php if($editing_data['type'] == 'credit'){echo "selected='selected'"; }?>><?= print_lang($app_lang,'mod_db_cr_voucher_add_type_credit'); ?></option>                                </select>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label><?= print_lang($app_lang,'mod_db_cr_voucher_add_account'); ?> <strong class="text-danger">*</strong><span class="blink_me" style="font-size: 14px; font-weight: 700; color: red;" id="payment_account_span"></span></label>
                        <select class="form-control chosen-select" name="account">
                            <option disabled="" selected="">-- <?= print_lang($app_lang,'mod_db_cr_voucher_add_account'); ?> --</option>
                            <?php foreach($accounts as $row){ ?>
                                <option <?php if($editing_data['account'] == $row['uid']){echo "selected='selected'"; }?> value="<?= $row['uid']; ?>"><?= $row['display_name']; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                </div>
            </div>
            <div class="row extra-mar-botm">
                <div class="col-md-6">
                    <div class="form-group">
                        <label><?= print_lang($app_lang,'mod_db_cr_voucher_add_currency'); ?> <strong class="text-danger">*</strong></label>
                        <select class="form-control chosen-select" name="currency">
                            <option disabled="" selected="">-- <?= print_lang($app_lang,'mod_db_cr_voucher_add_currency'); ?> --</option>
                            <?php foreach($currencies as $row){ ?>
                                <option <?php if($editing_data['currency'] == $row['uid']){echo "selected='selected'"; }?> value="<?= $row['uid']; ?>" data-usd-equalance="<?= $row['usd_equalance']; ?>"><?= $row['name']; ?> (<?= $row['symbol']; ?>)</option>
                            <?php } ?>
                        </select>
                    </div>
                </div>

                
                <div class="col-md-6">
                    <div class="form-group">
                        <label><?= print_lang($app_lang,'mod_db_cr_voucher_add_amount'); ?> <strong class="text-danger">*</strong></label>
                        <input type="number" class="form-control" name="amount" value="<?= $editing_data['amount']; ?>" placeholder="<?= print_lang($app_lang,'mod_db_cr_voucher_add_amount'); ?>">
                    </div>
                </div>
            </div>

            <div class="row extra-mar-botm">
                <div class="col-md-12">
                    <div class="form-group">
                        <label><?= print_lang($app_lang,'mod_db_cr_voucher_add_details'); ?></label>
                        <textarea class="form-control" placeholder="<?= print_lang($app_lang,'mod_db_cr_voucher_add_details'); ?>" name="details"><?= $editing_data['details']; ?></textarea>
                    </div>
                </div>
            </div>

            <div class="row extra-mar-botm">
                <div class="col-md-12 text-right">
                    <a class="btn btn-w-m btn-outline btn-danger url-elem" href="<?php echo url('/debit-credit-voucher'); ?>"><?= print_lang($app_lang,'cancel'); ?></a>
                    <button class="btn btn-w-m btn-primary" type="submit"><?= print_lang($app_lang,'mod_db_cr_voucher_edit_update'); ?></button>
                </div>
            </div>

        </form>
    </div>

</div>