getCustomViewCombo(); if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') { if($oCustomView->setdefaultviewid != "") { $viewid = $oCustomView->setdefaultviewid; }else { $viewid = "0"; } } $focus = new Invoice(); echo get_form_header($current_module_strings['LBL_MY_TOP_INVOICE'],$other_text, false); $xtpl=new XTemplate ('modules/Invoice/ListTopInvoice.html'); global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("IMAGE_PATH",$image_path); //Retreive the list from Database //<<<<<<<<>>>>>>>> $date_var = date('Y-m-d'); $where = ' and crmentity.smownerid='.$current_user->id.' and invoice.duedate >= \''.$date_var.'\' ORDER BY total DESC'; $query = getListQuery("Invoice",$where); //<<<<<<<>>>>>>>> $list_result = $adb->limitQuery($query,0,5); //$list_result = $adb->query($query); //Retreiving the no of rows $noofrows = $adb->num_rows($list_result); //Retreiving the start value from request if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') { $start = $_REQUEST['start']; } else { $start = 1; } //Retreive the Navigation array $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); if ($navigation_array['start'] == 1) { if($noofrows != 0) $start_rec = $navigation_array['start']; else $start_rec = 0; if($noofrows > $list_max_entries_per_page) { $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; } else { $end_rec = $noofrows; } } else { if($navigation_array['next'] > $list_max_entries_per_page) { $start_rec = $navigation_array['next'] - $list_max_entries_per_page; $end_rec = $navigation_array['next'] - 1; } else { $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; $end_rec = $noofrows; } } //Retreive the List View Table Header $listview_header = getListViewHeader($focus,"Invoice",$url_string,$sorder,$order_by,"HomePage",$oCustomView); $xtpl->assign("LISTHEADER", $listview_header); $listview_entries = getListViewEntries($focus,"Invoice",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); $xtpl->assign("LISTENTITY", $listview_entries); $xtpl->parse("main"); $xtpl->out("main"); ?>