Example #1
0
     $o->orgctrl = $ctrl->selectionOrg($o->createdby, $defaultorganization_id, 'N', "", 'Y');
     $o->bpartnergroupctrl = $ctrl->getSelectBPartnerGroup($o->bpartnergroup_id, 'Y', "");
     $o->currencyctrl = $ctrl->getSelectCurrency(0, 'N');
     $o->countryctrl = $ctrl->getSelectCountry(0, 'N');
     $o->termsctrl = $ctrl->getSelectTerms(0, 'Y');
     $o->taxctrl = $ctrl->getSelectTax($o->tax_id, 'Y');
     if ($accountmoduleexist == true) {
         $o->accountsctrl = $ctrl->getSelectAccounts($o->accounts_id, 'Y', "onchange=''", "accounts_id", "");
     } else {
         $o->accountsctrl = "Accounting Module doesn't exist <input type='hidden' name='accounts_id' value=0>";
     }
     //	$o->accountsctrl=$ctrl->getSelectAccounts($o->accounts_id,'Y',"onchange=''","accounts_id",$whereaccount);
     $o->showSearchForm();
     //$where = $o->getWhereStr($o->bpartner_no,$o->bpartner_name,$o->accounts_id,$o->tax_id,$o->isactive);
     $wherestr = " WHERE bp.bpartner_id>0 and bp.organization_id={$defaultorganization_id} ";
     $wherestr .= $o->getWhereStr();
     if ($issearch == 1) {
         $limit = "";
     } else {
         $limit = " limit {$rowperpage} ";
     }
     if ($issearch == 1) {
         $o->showBPartnerTable($wherestr, "ORDER BY bp.defaultlevel,bp.bpartner_no,bp.bpartner_name", $limit);
     }
     break;
 case "sortlist":
     $wherestr = str_replace("~", "'", $_POST['wherestr']);
     $type_sort = $_POST['type_sort'];
     $fld_sort = $_POST['fld_sort'];
     $idSort = $_POST['idSort'];
     echo $orderstr = " order by {$fld_sort} {$type_sort}";