<?php

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

class Productsearch extends CI_Controller {

    function __construct() {
        parent::__construct();
    }
    function getproductsbyparam() {
        $barcode = $this->input->post('BARCODE', true);
        $product = $this->input->post('PRODUCT', true);
        $buyparam = $this->input->post('BUYPARAM', true);
        $buyprice = $this->input->post('BUYPRICE', true);
        $sellparam = $this->input->post('SELLPARAM', true);
        $sellprice = $this->input->post('SELLPRICE', true);
        $cp = $this->input->post('CP', true);
        $cm = $this->input->post('CM', true);
        $ca = $this->input->post('CA', true);
        $this->load->model('inventory/productsearch_model');
        echo $this->productsearch_model->getproductsbyparam($barcode, $product, $buyparam, $buyprice, $sellparam, $sellprice, $cp, $cm, $ca);
    }
}
