...
$search = jqGridUtils::GetParam('_search','true');
if($search == 'true')
{
$from = jqGridUtils::GetParam('from',date('m/d/Y'));
$to = jqGridUtils::GetParam('to',date('m/d/Y'));
$companyid = jqGridUtils::GetParam('companyid', '');
$_SESSION['from'] = $from;
$_SESSION['to'] = $to;
}
$table = 'BK';
$grid->SelectCommand = "
SELECT BK.NO_BK,
BK.BKID,
BK.TGL,
BK.URAIAN,
BK.KASBANKID,K.BANK,
BK.TYPES,
bk.companyid
FROM BK
LEFT JOIN KASBANK K ON (BK.KASBANKID = K.KASBANKID)
where bk.tgl between '".$from."' and '".$to."'
and bk.companyid = $companyid
";
$grid->dataType = 'json';
$grid->setColModel();
$grid->table = $table;
$grid->setUrl( 'bk_.php');
$grid->setColProperty("BKID", array("label" => "ID", "hidden" => true));
$grid->setColProperty("KASBANKID", array("label" => "ID", "hidden" => true));
$grid->setColProperty("COMPANYID", array("label" => "ID", "hidden" => true,
"editoptions" => array("defaultValue"=>$companyid )));
$grid->setAutocomplete("BANK", "#KASBANKID", "
select
ct.BANK,
ct.BANK,
ct.KASBANKID
from KASBANK ct
where ( upper(ct.bank ) LIKE '%' || upper( ? ) || '%' )
and CT.companyid = $companyid
order by ct.bank ", null, true, true);
...