
        <form role="form" id="from_items"
              action="<?php echo base_url(); ?>admin/credit_note/cloned_credit_note/<?= $credit_note_info->credit_note_id ?>"
              method="post"
              class="space-y-4">

            <?php
            $selected_client_label = '';
            if (!empty($credit_note_info->client_id)) {
                $selected_client = $this->db->select('name')->where('client_id', $credit_note_info->client_id)->get('tbl_client')->row();
                if (!empty($selected_client->name)) {
                    $selected_client_label = $selected_client->name;
                }
            }
            echo form_lookup_group(
                'client_id',
                lang('select') . ' ' . lang('client'),
                !empty($credit_note_info->client_id) ? $credit_note_info->client_id : '',
                $selected_client_label,
                true,
                array('id' => 'credit_note_client_id_lookup'),
                'mb-3',
                array(
                    'type' => 'client',
                    'min_length' => 0,
                    'placeholder' => lang('search') . ' ' . lang('client'),
                ),
                ''
            );
            ?>

            <?= form_datepicker(
                'credit_note_date',
                lang('credit_note_date'),
                !empty($credit_note_info->credit_note_date) ? $credit_note_info->credit_note_date : date('Y-m-d'),
                false,
                array('id' => 'credit_note_date', 'data-format' => config_item('date_picker_format'), 'required' => true),
                '',
                '',
                'horizontal'
            ); ?>

            <div class="flex items-center justify-end gap-2 pt-2">
                <button type="button" class="inline-flex items-center rounded-lg border border-slate-200 bg-white px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-100 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 dark:hover:bg-slate-700" data-dismiss="modal">
                    <?= lang('close') ?>
                </button>
                <button type="submit" class="inline-flex items-center rounded-lg bg-slate-900 px-4 py-2 text-sm font-semibold text-white hover:bg-slate-800 dark:bg-slate-100 dark:text-slate-900 dark:hover:bg-white">
                    <?= lang('clone') ?>
                </button>
            </div>
        </form>
    
