<commit_before><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Description of SalesReturn
 *
 * @author <NAME>
 */
class Sales_return_model extends CI_Model {

    function get_buyer_dropdown() {
        $db_tables = $this->config->item('db_tables');
        $this->db->select('*');
        $this->db->from($db_tables['pub_contacts']);
        $this->db->where_in('contact_type', array('Buyer'));
        $this->db->order_by('contact_type', "asc");
        $query = $this->db->get();
        $db_rows = $query->result_array();
        $options[''] = "Select Party Name";
        foreach ($db_rows as $index => $row) {
            $options[$row['contact_ID']] = $row['name'];
        }
        if (!isset($options)) {
            $options[''] = "";
        }

        return form_dropdown('buyer_id', $options, '', 'class="form-control select2 select2-hidden-accessible" tabindex="-1" required="true" aria-hidden="true"');
    }

    function get_binding_store_dropdown() {
        $db_tables = $this->config->item('db_tables');
        $this->db->select('*');
        $this->db->from($db_tables['pub_contacts']);
        $this->db->where_in('contact_type', array('Binding Store'));
        $this->db->order_by('contact_type', "asc");
        $query = $this->db->get();
        $db_rows = $query->result_array();
        $options[''] = "Select Party Name";
        foreach ($db_rows as $index => $row) {
            $options[$row['contact_ID']] = $row['name'];
        }
        if (!isset($options)) {
            $options[''] = "";
        }

        return form_dropdown('buyer_id', $options, '', 'class="form-control select2 select2-hidden-accessible" tabindex="-1" required="true" aria-hidden="true"');
    }

    function book_selector_table() {
<commit_msg>added Multi insert form In both book return and send to rebind<commit_after><?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Description of SalesReturn
 *
 * @author <NAME>
 */
class Sales_return_model extends CI_Model {

    function get_buyer_dropdown() {
        $db_tables = $this->config->item('db_tables');
        $this->db->select('*');
        $this->db->from($db_tables['pub_contacts']);
        $this->db->where_in('contact_type', array('Buyer'));
        $this->db->order_by('name', "asc");
        $query = $this->db->get();
        $db_rows = $query->result_array();
        $options[''] = "Select Party Name";
        foreach ($db_rows as $index => $row) {
            $options[$row['contact_ID']] = $row['name'];
        }
        if (!isset($options)) {
            $options[''] = "";
        }

        return form_dropdown('buyer_id', $options, '', 'class="form-control select2 select2-hidden-accessible" tabindex="-1" required="true" aria-hidden="true"');
    }

    function get_binding_store_dropdown() {
        $db_tables = $this->config->item('db_tables');
        $this->db->select('*');
        $this->db->from($db_tables['pub_contacts']);
        $this->db->where_in('contact_type', array('Binding Store'));
        $this->db->order_by('name', "asc");
        $query = $this->db->get();
        $db_rows = $query->result_array();
        $options[''] = "Select Party Name";
        foreach ($db_rows as $index => $row) {
            $options[$row['contact_ID']] = $row['name'];
        }
        if (!isset($options)) {
            $options[''] = "";
        }

        return form_dropdown('buyer_id', $options, '', 'class="form-control select2 select2-hidden-accessible" tabindex="-1" required="true" aria-hidden="true"');
    }

    function book_selector_table() {

{'fraction_non_alphanumeric': 0.20027510316368638, 'fraction_numerical': 0.003301237964236589, 'mean_word_length': 2.9012875536480687, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4029604', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1114, 'n_words': 199}