PageRenderTime 56ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/reports/leaves_reports/output/include/leave_summaryreport_settings.php

https://bitbucket.org/lecturer34/hrmis
PHP | 1743 lines | 1051 code | 618 blank | 74 comment | 33 complexity | 7979d87d7e2228d34a6ea0026063bebf MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. $tdataleave_summaryreport=array();
  3. $tdataleave_summaryreport[".ShortName"]="leave_summaryreport";
  4. $tdataleave_summaryreport[".OwnerID"]="";
  5. $tdataleave_summaryreport[".OriginalTable"]="vwpromotions";
  6. // field labels
  7. $fieldLabelsleave_summaryreport = array();
  8. if(mlang_getcurrentlang()=="English")
  9. {
  10. $fieldLabelsleave_summaryreport["English"]=array();
  11. $fieldToolTipsleave_summaryreport["English"]=array();
  12. $fieldLabelsleave_summaryreport["English"]["surname"] = "Surname";
  13. $fieldToolTipsleave_summaryreport["English"]["surname"] = "";
  14. $fieldLabelsleave_summaryreport["English"]["firstname"] = "Firstname";
  15. $fieldToolTipsleave_summaryreport["English"]["firstname"] = "";
  16. $fieldLabelsleave_summaryreport["English"]["othernames"] = "Othernames";
  17. $fieldToolTipsleave_summaryreport["English"]["othernames"] = "";
  18. $fieldLabelsleave_summaryreport["English"]["personnelno"] = "Personnel No.";
  19. $fieldToolTipsleave_summaryreport["English"]["personnelno"] = "";
  20. $fieldLabelsleave_summaryreport["English"]["dept"] = "Department";
  21. $fieldToolTipsleave_summaryreport["English"]["dept"] = "";
  22. $fieldLabelsleave_summaryreport["English"]["description"] = "Leave Type";
  23. $fieldToolTipsleave_summaryreport["English"]["description"] = "";
  24. $fieldLabelsleave_summaryreport["English"]["status"] = "Status";
  25. $fieldToolTipsleave_summaryreport["English"]["status"] = "";
  26. $fieldLabelsleave_summaryreport["English"]["leavecount"] = "Number of leaves";
  27. $fieldToolTipsleave_summaryreport["English"]["leavecount"] = "";
  28. $fieldLabelsleave_summaryreport["English"]["faculty"] = "Faculty";
  29. $fieldToolTipsleave_summaryreport["English"]["faculty"] = "";
  30. $fieldLabelsleave_summaryreport["English"]["rank"] = "Rank";
  31. $fieldToolTipsleave_summaryreport["English"]["rank"] = "";
  32. $fieldLabelsleave_summaryreport["English"]["cadre"] = "Cadre";
  33. $fieldToolTipsleave_summaryreport["English"]["cadre"] = "";
  34. $fieldLabelsleave_summaryreport["English"]["staffcategory"] = "Staff Category";
  35. $fieldToolTipsleave_summaryreport["English"]["staffcategory"] = "";
  36. if (count($fieldToolTipsleave_summaryreport["English"])){
  37. $tdataleave_summaryreport[".isUseToolTips"]=true;
  38. }
  39. }
  40. $tdataleave_summaryreport[".NCSearch"]=true;
  41. $tdataleave_summaryreport[".shortTableName"] = "leave_summaryreport";
  42. $tdataleave_summaryreport[".nSecOptions"] = 0;
  43. $tdataleave_summaryreport[".recsPerRowList"] = 1;
  44. $tdataleave_summaryreport[".tableGroupBy"] = "1";
  45. $tdataleave_summaryreport[".mainTableOwnerID"] = "";
  46. $tdataleave_summaryreport[".moveNext"] = 1;
  47. $tdataleave_summaryreport[".showAddInPopup"] = false;
  48. $tdataleave_summaryreport[".showEditInPopup"] = false;
  49. $tdataleave_summaryreport[".showViewInPopup"] = false;
  50. $tdataleave_summaryreport[".fieldsForRegister"] = array();
  51. $tdataleave_summaryreport[".listAjax"] = false;
  52. $tdataleave_summaryreport[".audit"] = false;
  53. $tdataleave_summaryreport[".locking"] = false;
  54. $tdataleave_summaryreport[".listIcons"] = true;
  55. $tdataleave_summaryreport[".exportTo"] = true;
  56. $tdataleave_summaryreport[".printFriendly"] = true;
  57. $tdataleave_summaryreport[".showSimpleSearchOptions"] = false;
  58. $tdataleave_summaryreport[".showSearchPanel"] = true;
  59. if (isMobile()){
  60. $tdataleave_summaryreport[".isUseAjaxSuggest"] = false;
  61. }else {
  62. $tdataleave_summaryreport[".isUseAjaxSuggest"] = true;
  63. }
  64. // button handlers file names
  65. $tdataleave_summaryreport[".addPageEvents"] = false;
  66. // use datepicker for search panel
  67. $tdataleave_summaryreport[".isUseCalendarForSearch"] = false;
  68. // use timepicker for search panel
  69. $tdataleave_summaryreport[".isUseTimeForSearch"] = false;
  70. $tdataleave_summaryreport[".isUseiBox"] = false;
  71. $tdataleave_summaryreport[".isUseInlineJs"] = $tdataleave_summaryreport[".isUseInlineAdd"] || $tdataleave_summaryreport[".isUseInlineEdit"];
  72. $tdataleave_summaryreport[".allSearchFields"] = array();
  73. $tdataleave_summaryreport[".globSearchFields"][] = "description";
  74. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  75. if (!in_array("description", $tdataleave_summaryreport[".allSearchFields"]))
  76. {
  77. $tdataleave_summaryreport[".allSearchFields"][] = "description";
  78. }
  79. $tdataleave_summaryreport[".globSearchFields"][] = "personnelno";
  80. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  81. if (!in_array("personnelno", $tdataleave_summaryreport[".allSearchFields"]))
  82. {
  83. $tdataleave_summaryreport[".allSearchFields"][] = "personnelno";
  84. }
  85. $tdataleave_summaryreport[".globSearchFields"][] = "dept";
  86. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  87. if (!in_array("dept", $tdataleave_summaryreport[".allSearchFields"]))
  88. {
  89. $tdataleave_summaryreport[".allSearchFields"][] = "dept";
  90. }
  91. $tdataleave_summaryreport[".globSearchFields"][] = "status";
  92. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  93. if (!in_array("status", $tdataleave_summaryreport[".allSearchFields"]))
  94. {
  95. $tdataleave_summaryreport[".allSearchFields"][] = "status";
  96. }
  97. $tdataleave_summaryreport[".globSearchFields"][] = "leavecount";
  98. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  99. if (!in_array("leavecount", $tdataleave_summaryreport[".allSearchFields"]))
  100. {
  101. $tdataleave_summaryreport[".allSearchFields"][] = "leavecount";
  102. }
  103. $tdataleave_summaryreport[".globSearchFields"][] = "faculty";
  104. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  105. if (!in_array("faculty", $tdataleave_summaryreport[".allSearchFields"]))
  106. {
  107. $tdataleave_summaryreport[".allSearchFields"][] = "faculty";
  108. }
  109. $tdataleave_summaryreport[".globSearchFields"][] = "rank";
  110. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  111. if (!in_array("rank", $tdataleave_summaryreport[".allSearchFields"]))
  112. {
  113. $tdataleave_summaryreport[".allSearchFields"][] = "rank";
  114. }
  115. $tdataleave_summaryreport[".globSearchFields"][] = "cadre";
  116. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  117. if (!in_array("cadre", $tdataleave_summaryreport[".allSearchFields"]))
  118. {
  119. $tdataleave_summaryreport[".allSearchFields"][] = "cadre";
  120. }
  121. $tdataleave_summaryreport[".globSearchFields"][] = "staffcategory";
  122. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  123. if (!in_array("staffcategory", $tdataleave_summaryreport[".allSearchFields"]))
  124. {
  125. $tdataleave_summaryreport[".allSearchFields"][] = "staffcategory";
  126. }
  127. $tdataleave_summaryreport[".googleLikeFields"][] = "description";
  128. $tdataleave_summaryreport[".googleLikeFields"][] = "personnelno";
  129. $tdataleave_summaryreport[".googleLikeFields"][] = "dept";
  130. $tdataleave_summaryreport[".googleLikeFields"][] = "status";
  131. $tdataleave_summaryreport[".googleLikeFields"][] = "leavecount";
  132. $tdataleave_summaryreport[".googleLikeFields"][] = "faculty";
  133. $tdataleave_summaryreport[".googleLikeFields"][] = "rank";
  134. $tdataleave_summaryreport[".googleLikeFields"][] = "cadre";
  135. $tdataleave_summaryreport[".googleLikeFields"][] = "staffcategory";
  136. $tdataleave_summaryreport[".panelSearchFields"][] = "description";
  137. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  138. if (!in_array("description", $tdataleave_summaryreport[".allSearchFields"]))
  139. {
  140. $tdataleave_summaryreport[".allSearchFields"][] = "description";
  141. }
  142. $tdataleave_summaryreport[".panelSearchFields"][] = "personnelno";
  143. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  144. if (!in_array("personnelno", $tdataleave_summaryreport[".allSearchFields"]))
  145. {
  146. $tdataleave_summaryreport[".allSearchFields"][] = "personnelno";
  147. }
  148. $tdataleave_summaryreport[".panelSearchFields"][] = "dept";
  149. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  150. if (!in_array("dept", $tdataleave_summaryreport[".allSearchFields"]))
  151. {
  152. $tdataleave_summaryreport[".allSearchFields"][] = "dept";
  153. }
  154. $tdataleave_summaryreport[".panelSearchFields"][] = "status";
  155. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  156. if (!in_array("status", $tdataleave_summaryreport[".allSearchFields"]))
  157. {
  158. $tdataleave_summaryreport[".allSearchFields"][] = "status";
  159. }
  160. $tdataleave_summaryreport[".panelSearchFields"][] = "leavecount";
  161. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  162. if (!in_array("leavecount", $tdataleave_summaryreport[".allSearchFields"]))
  163. {
  164. $tdataleave_summaryreport[".allSearchFields"][] = "leavecount";
  165. }
  166. $tdataleave_summaryreport[".panelSearchFields"][] = "faculty";
  167. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  168. if (!in_array("faculty", $tdataleave_summaryreport[".allSearchFields"]))
  169. {
  170. $tdataleave_summaryreport[".allSearchFields"][] = "faculty";
  171. }
  172. $tdataleave_summaryreport[".panelSearchFields"][] = "rank";
  173. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  174. if (!in_array("rank", $tdataleave_summaryreport[".allSearchFields"]))
  175. {
  176. $tdataleave_summaryreport[".allSearchFields"][] = "rank";
  177. }
  178. $tdataleave_summaryreport[".panelSearchFields"][] = "cadre";
  179. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  180. if (!in_array("cadre", $tdataleave_summaryreport[".allSearchFields"]))
  181. {
  182. $tdataleave_summaryreport[".allSearchFields"][] = "cadre";
  183. }
  184. $tdataleave_summaryreport[".panelSearchFields"][] = "staffcategory";
  185. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  186. if (!in_array("staffcategory", $tdataleave_summaryreport[".allSearchFields"]))
  187. {
  188. $tdataleave_summaryreport[".allSearchFields"][] = "staffcategory";
  189. }
  190. $tdataleave_summaryreport[".advSearchFields"][] = "description";
  191. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  192. if (!in_array("description", $tdataleave_summaryreport[".allSearchFields"]))
  193. {
  194. $tdataleave_summaryreport[".allSearchFields"][] = "description";
  195. }
  196. $tdataleave_summaryreport[".advSearchFields"][] = "personnelno";
  197. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  198. if (!in_array("personnelno", $tdataleave_summaryreport[".allSearchFields"]))
  199. {
  200. $tdataleave_summaryreport[".allSearchFields"][] = "personnelno";
  201. }
  202. $tdataleave_summaryreport[".advSearchFields"][] = "dept";
  203. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  204. if (!in_array("dept", $tdataleave_summaryreport[".allSearchFields"]))
  205. {
  206. $tdataleave_summaryreport[".allSearchFields"][] = "dept";
  207. }
  208. $tdataleave_summaryreport[".advSearchFields"][] = "status";
  209. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  210. if (!in_array("status", $tdataleave_summaryreport[".allSearchFields"]))
  211. {
  212. $tdataleave_summaryreport[".allSearchFields"][] = "status";
  213. }
  214. $tdataleave_summaryreport[".advSearchFields"][] = "leavecount";
  215. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  216. if (!in_array("leavecount", $tdataleave_summaryreport[".allSearchFields"]))
  217. {
  218. $tdataleave_summaryreport[".allSearchFields"][] = "leavecount";
  219. }
  220. $tdataleave_summaryreport[".advSearchFields"][] = "faculty";
  221. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  222. if (!in_array("faculty", $tdataleave_summaryreport[".allSearchFields"]))
  223. {
  224. $tdataleave_summaryreport[".allSearchFields"][] = "faculty";
  225. }
  226. $tdataleave_summaryreport[".advSearchFields"][] = "rank";
  227. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  228. if (!in_array("rank", $tdataleave_summaryreport[".allSearchFields"]))
  229. {
  230. $tdataleave_summaryreport[".allSearchFields"][] = "rank";
  231. }
  232. $tdataleave_summaryreport[".advSearchFields"][] = "cadre";
  233. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  234. if (!in_array("cadre", $tdataleave_summaryreport[".allSearchFields"]))
  235. {
  236. $tdataleave_summaryreport[".allSearchFields"][] = "cadre";
  237. }
  238. $tdataleave_summaryreport[".advSearchFields"][] = "staffcategory";
  239. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  240. if (!in_array("staffcategory", $tdataleave_summaryreport[".allSearchFields"]))
  241. {
  242. $tdataleave_summaryreport[".allSearchFields"][] = "staffcategory";
  243. }
  244. $tdataleave_summaryreport[".isTableType"] = "report";
  245. // Access doesn't support subqueries from the same table as main
  246. $tdataleave_summaryreport[".subQueriesSupAccess"] = true;
  247. $gstrOrderBy = "";
  248. if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
  249. $gstrOrderBy = "order by ".$gstrOrderBy;
  250. $tdataleave_summaryreport[".strOrderBy"] = $gstrOrderBy;
  251. $tdataleave_summaryreport[".orderindexes"] = array();
  252. $tdataleave_summaryreport[".sqlHead"] = "Select vwpromotions.surname, vwpromotions.firstname, vwpromotions.othernames, tblleavetype.description, vwpromotions.personnelno, vwpromotions.dept, tblleaveapplication.status, vwpromotions.employeeid AS leavecount, vwpromotions.faculty, tblrank.name AS rank, tblcadre.` name` AS cadre, tblstaffcategory.name AS staffcategory";
  253. $tdataleave_summaryreport[".sqlFrom"] = "FROM vwpromotions INNER JOIN tblleaveapplication ON vwpromotions.employeeid = tblleaveapplication.employeeid INNER JOIN tblleaveplan ON tblleaveapplication.planid = tblleaveplan.planid INNER JOIN tblleavetype ON tblleaveplan.leavetypeid = tblleavetype.leavetypeid INNER JOIN tblrank ON vwpromotions.rank = tblrank.rankid INNER JOIN tblcadre ON tblrank.cadreid = tblcadre.cadreid INNER JOIN tblstaffcategory ON tblcadre.categoryid = tblstaffcategory.categoryid";
  254. $tdataleave_summaryreport[".sqlWhereExpr"] = "";
  255. $tdataleave_summaryreport[".sqlTail"] = "GROUP BY vwpromotions.personnelno, vwpromotions.employeeid";
  256. //fill array of records per page for list and report without group fields
  257. $arrRPP = array();
  258. $arrRPP[] = 10;
  259. $arrRPP[] = 20;
  260. $arrRPP[] = 30;
  261. $arrRPP[] = 50;
  262. $arrRPP[] = 100;
  263. $arrRPP[] = 500;
  264. $arrRPP[] = -1;
  265. $tdataleave_summaryreport[".arrRecsPerPage"] = $arrRPP;
  266. //fill array of groups per page for report with group fields
  267. $arrGPP = array();
  268. $arrGPP[] = 1;
  269. $arrGPP[] = 3;
  270. $arrGPP[] = 5;
  271. $arrGPP[] = 10;
  272. $arrGPP[] = 50;
  273. $arrGPP[] = 100;
  274. $arrGPP[] = -1;
  275. $tdataleave_summaryreport[".arrGroupsPerPage"] = $arrGPP;
  276. $tableKeys = array();
  277. $tdataleave_summaryreport[".Keys"] = $tableKeys;
  278. $tdataleave_summaryreport[".listFields"] = array();
  279. $tdataleave_summaryreport[".listFields"][] = "surname";
  280. $tdataleave_summaryreport[".listFields"][] = "firstname";
  281. $tdataleave_summaryreport[".listFields"][] = "othernames";
  282. $tdataleave_summaryreport[".listFields"][] = "description";
  283. $tdataleave_summaryreport[".listFields"][] = "personnelno";
  284. $tdataleave_summaryreport[".listFields"][] = "dept";
  285. $tdataleave_summaryreport[".listFields"][] = "status";
  286. $tdataleave_summaryreport[".listFields"][] = "leavecount";
  287. $tdataleave_summaryreport[".listFields"][] = "faculty";
  288. $tdataleave_summaryreport[".listFields"][] = "rank";
  289. $tdataleave_summaryreport[".listFields"][] = "cadre";
  290. $tdataleave_summaryreport[".listFields"][] = "staffcategory";
  291. $tdataleave_summaryreport[".addFields"] = array();
  292. $tdataleave_summaryreport[".addFields"][] = "surname";
  293. $tdataleave_summaryreport[".addFields"][] = "firstname";
  294. $tdataleave_summaryreport[".addFields"][] = "othernames";
  295. $tdataleave_summaryreport[".addFields"][] = "personnelno";
  296. $tdataleave_summaryreport[".addFields"][] = "dept";
  297. $tdataleave_summaryreport[".addFields"][] = "faculty";
  298. $tdataleave_summaryreport[".addFields"][] = "rank";
  299. $tdataleave_summaryreport[".inlineAddFields"] = array();
  300. $tdataleave_summaryreport[".inlineAddFields"][] = "surname";
  301. $tdataleave_summaryreport[".inlineAddFields"][] = "firstname";
  302. $tdataleave_summaryreport[".inlineAddFields"][] = "othernames";
  303. $tdataleave_summaryreport[".inlineAddFields"][] = "description";
  304. $tdataleave_summaryreport[".inlineAddFields"][] = "personnelno";
  305. $tdataleave_summaryreport[".inlineAddFields"][] = "dept";
  306. $tdataleave_summaryreport[".inlineAddFields"][] = "status";
  307. $tdataleave_summaryreport[".inlineAddFields"][] = "leavecount";
  308. $tdataleave_summaryreport[".inlineAddFields"][] = "faculty";
  309. $tdataleave_summaryreport[".inlineAddFields"][] = "rank";
  310. $tdataleave_summaryreport[".inlineAddFields"][] = "cadre";
  311. $tdataleave_summaryreport[".inlineAddFields"][] = "staffcategory";
  312. $tdataleave_summaryreport[".editFields"] = array();
  313. $tdataleave_summaryreport[".editFields"][] = "surname";
  314. $tdataleave_summaryreport[".editFields"][] = "firstname";
  315. $tdataleave_summaryreport[".editFields"][] = "othernames";
  316. $tdataleave_summaryreport[".editFields"][] = "personnelno";
  317. $tdataleave_summaryreport[".editFields"][] = "dept";
  318. $tdataleave_summaryreport[".editFields"][] = "faculty";
  319. $tdataleave_summaryreport[".editFields"][] = "rank";
  320. $tdataleave_summaryreport[".inlineEditFields"] = array();
  321. $tdataleave_summaryreport[".inlineEditFields"][] = "surname";
  322. $tdataleave_summaryreport[".inlineEditFields"][] = "firstname";
  323. $tdataleave_summaryreport[".inlineEditFields"][] = "othernames";
  324. $tdataleave_summaryreport[".inlineEditFields"][] = "description";
  325. $tdataleave_summaryreport[".inlineEditFields"][] = "personnelno";
  326. $tdataleave_summaryreport[".inlineEditFields"][] = "dept";
  327. $tdataleave_summaryreport[".inlineEditFields"][] = "status";
  328. $tdataleave_summaryreport[".inlineEditFields"][] = "leavecount";
  329. $tdataleave_summaryreport[".inlineEditFields"][] = "faculty";
  330. $tdataleave_summaryreport[".inlineEditFields"][] = "rank";
  331. $tdataleave_summaryreport[".inlineEditFields"][] = "cadre";
  332. $tdataleave_summaryreport[".inlineEditFields"][] = "staffcategory";
  333. // surname
  334. $fdata = array();
  335. $fdata["strName"] = "surname";
  336. $fdata["ownerTable"] = "vwpromotions";
  337. $fdata["Label"]="Surname";
  338. $fdata["FieldType"]= 200;
  339. $fdata["UseiBox"] = false;
  340. $fdata["EditFormat"]= "Text field";
  341. $fdata["ViewFormat"]= "";
  342. $fdata["NeedEncode"]=true;
  343. $fdata["GoodName"]= "surname";
  344. $fdata["FullName"]= "vwpromotions.surname";
  345. $fdata["Index"]= 1;
  346. $fdata["EditParams"]="";
  347. $fdata["EditParams"].= " maxlength=30";
  348. $fdata["bListPage"]=true;
  349. $fdata["bAddPage"]=true;
  350. $fdata["bInlineAdd"]=true;
  351. $fdata["bEditPage"]=true;
  352. $fdata["bInlineEdit"]=true;
  353. $fdata["bViewPage"]=true;
  354. $fdata["bPrinterPage"]=true;
  355. $fdata["bExportPage"]=true;
  356. //Begin validation
  357. $fdata["validateAs"] = array();
  358. //End validation
  359. $fdata["FieldPermissions"]=true;
  360. $tdataleave_summaryreport["surname"]=$fdata;
  361. // firstname
  362. $fdata = array();
  363. $fdata["strName"] = "firstname";
  364. $fdata["ownerTable"] = "vwpromotions";
  365. $fdata["Label"]="Firstname";
  366. $fdata["FieldType"]= 200;
  367. $fdata["UseiBox"] = false;
  368. $fdata["EditFormat"]= "Text field";
  369. $fdata["ViewFormat"]= "";
  370. $fdata["NeedEncode"]=true;
  371. $fdata["GoodName"]= "firstname";
  372. $fdata["FullName"]= "vwpromotions.firstname";
  373. $fdata["Index"]= 2;
  374. $fdata["EditParams"]="";
  375. $fdata["EditParams"].= " maxlength=30";
  376. $fdata["bListPage"]=true;
  377. $fdata["bAddPage"]=true;
  378. $fdata["bInlineAdd"]=true;
  379. $fdata["bEditPage"]=true;
  380. $fdata["bInlineEdit"]=true;
  381. $fdata["bViewPage"]=true;
  382. $fdata["bPrinterPage"]=true;
  383. $fdata["bExportPage"]=true;
  384. //Begin validation
  385. $fdata["validateAs"] = array();
  386. //End validation
  387. $fdata["FieldPermissions"]=true;
  388. $tdataleave_summaryreport["firstname"]=$fdata;
  389. // othernames
  390. $fdata = array();
  391. $fdata["strName"] = "othernames";
  392. $fdata["ownerTable"] = "vwpromotions";
  393. $fdata["Label"]="Othernames";
  394. $fdata["FieldType"]= 200;
  395. $fdata["UseiBox"] = false;
  396. $fdata["EditFormat"]= "Text field";
  397. $fdata["ViewFormat"]= "";
  398. $fdata["NeedEncode"]=true;
  399. $fdata["GoodName"]= "othernames";
  400. $fdata["FullName"]= "vwpromotions.othernames";
  401. $fdata["Index"]= 3;
  402. $fdata["EditParams"]="";
  403. $fdata["EditParams"].= " maxlength=30";
  404. $fdata["bListPage"]=true;
  405. $fdata["bAddPage"]=true;
  406. $fdata["bInlineAdd"]=true;
  407. $fdata["bEditPage"]=true;
  408. $fdata["bInlineEdit"]=true;
  409. $fdata["bViewPage"]=true;
  410. $fdata["bPrinterPage"]=true;
  411. $fdata["bExportPage"]=true;
  412. //Begin validation
  413. $fdata["validateAs"] = array();
  414. //End validation
  415. $fdata["FieldPermissions"]=true;
  416. $tdataleave_summaryreport["othernames"]=$fdata;
  417. // description
  418. $fdata = array();
  419. $fdata["strName"] = "description";
  420. $fdata["ownerTable"] = "tblleavetype";
  421. $fdata["Label"]="Leave Type";
  422. $fdata["FieldType"]= 200;
  423. $fdata["UseiBox"] = false;
  424. $fdata["EditFormat"]= "Lookup wizard";
  425. $fdata["ViewFormat"]= "";
  426. $fdata["LookupType"]=1;
  427. $fdata["pLookupType"] = 1;
  428. $fdata["freeInput"] = 0;
  429. $fdata["autoCompleteFieldsOnEdit"] = 0;
  430. $fdata["autoCompleteFields"] = array();
  431. $fdata["LinkField"]="description";
  432. $fdata["LinkFieldType"]=200;
  433. $fdata["DisplayField"]="description";
  434. $fdata["LookupTable"]="tblleavetype";
  435. $fdata["LookupOrderBy"]="description";
  436. $fdata["NeedEncode"]=true;
  437. $fdata["GoodName"]= "description";
  438. $fdata["FullName"]= "tblleavetype.description";
  439. $fdata["Index"]= 4;
  440. $fdata["bListPage"]=true;
  441. $fdata["bInlineAdd"]=true;
  442. $fdata["bInlineEdit"]=true;
  443. $fdata["bViewPage"]=true;
  444. $fdata["bAdvancedSearch"]=true;
  445. $fdata["bPrinterPage"]=true;
  446. $fdata["bExportPage"]=true;
  447. //Begin validation
  448. $fdata["validateAs"] = array();
  449. //End validation
  450. $fdata["FieldPermissions"]=true;
  451. $tdataleave_summaryreport["description"]=$fdata;
  452. // personnelno
  453. $fdata = array();
  454. $fdata["strName"] = "personnelno";
  455. $fdata["ownerTable"] = "vwpromotions";
  456. $fdata["Label"]="Personnel No.";
  457. $fdata["FieldType"]= 200;
  458. $fdata["UseiBox"] = false;
  459. $fdata["EditFormat"]= "Text field";
  460. $fdata["ViewFormat"]= "";
  461. $fdata["NeedEncode"]=true;
  462. $fdata["GoodName"]= "personnelno";
  463. $fdata["FullName"]= "vwpromotions.personnelno";
  464. $fdata["Index"]= 5;
  465. $fdata["EditParams"]="";
  466. $fdata["EditParams"].= " maxlength=7";
  467. $fdata["bListPage"]=true;
  468. $fdata["bAddPage"]=true;
  469. $fdata["bInlineAdd"]=true;
  470. $fdata["bEditPage"]=true;
  471. $fdata["bInlineEdit"]=true;
  472. $fdata["bViewPage"]=true;
  473. $fdata["bAdvancedSearch"]=true;
  474. $fdata["bPrinterPage"]=true;
  475. $fdata["bExportPage"]=true;
  476. //Begin validation
  477. $fdata["validateAs"] = array();
  478. //End validation
  479. $fdata["FieldPermissions"]=true;
  480. $tdataleave_summaryreport["personnelno"]=$fdata;
  481. // dept
  482. $fdata = array();
  483. $fdata["strName"] = "dept";
  484. $fdata["ownerTable"] = "vwpromotions";
  485. $fdata["Label"]="Department";
  486. $fdata["FieldType"]= 200;
  487. $fdata["UseiBox"] = false;
  488. $fdata["EditFormat"]= "Lookup wizard";
  489. $fdata["ViewFormat"]= "";
  490. $fdata["LookupType"]=1;
  491. $fdata["pLookupType"] = 1;
  492. $fdata["freeInput"] = 0;
  493. $fdata["autoCompleteFieldsOnEdit"] = 0;
  494. $fdata["autoCompleteFields"] = array();
  495. $fdata["LinkField"]="name";
  496. $fdata["LinkFieldType"]=200;
  497. $fdata["DisplayField"]="name";
  498. $fdata["LookupTable"]="tbldepartment";
  499. $fdata["LookupOrderBy"]="name";
  500. $fdata["SimpleAdd"]=true;
  501. $fdata["NeedEncode"]=true;
  502. $fdata["GoodName"]= "dept";
  503. $fdata["FullName"]= "vwpromotions.dept";
  504. $fdata["Index"]= 6;
  505. $fdata["bListPage"]=true;
  506. $fdata["bAddPage"]=true;
  507. $fdata["bInlineAdd"]=true;
  508. $fdata["bEditPage"]=true;
  509. $fdata["bInlineEdit"]=true;
  510. $fdata["bViewPage"]=true;
  511. $fdata["bAdvancedSearch"]=true;
  512. $fdata["bPrinterPage"]=true;
  513. $fdata["bExportPage"]=true;
  514. //Begin validation
  515. $fdata["validateAs"] = array();
  516. //End validation
  517. $fdata["FieldPermissions"]=true;
  518. $tdataleave_summaryreport["dept"]=$fdata;
  519. // status
  520. $fdata = array();
  521. $fdata["strName"] = "status";
  522. $fdata["ownerTable"] = "tblleaveapplication";
  523. $fdata["Label"]="Status";
  524. $fdata["FieldType"]= 129;
  525. $fdata["UseiBox"] = false;
  526. $fdata["EditFormat"]= "Lookup wizard";
  527. $fdata["ViewFormat"]= "";
  528. $fdata["LookupType"]=1;
  529. $fdata["pLookupType"] = 1;
  530. $fdata["freeInput"] = 0;
  531. $fdata["autoCompleteFieldsOnEdit"] = 0;
  532. $fdata["autoCompleteFields"] = array();
  533. $fdata["LinkField"]="status";
  534. $fdata["LinkFieldType"]=129;
  535. $fdata["DisplayField"]="status";
  536. $fdata["LookupTable"]="tblleavestatus";
  537. $fdata["LookupOrderBy"]="status";
  538. $fdata["SimpleAdd"]=true;
  539. $fdata["NeedEncode"]=true;
  540. $fdata["GoodName"]= "status";
  541. $fdata["FullName"]= "tblleaveapplication.status";
  542. $fdata["Index"]= 7;
  543. $fdata["bListPage"]=true;
  544. $fdata["bInlineAdd"]=true;
  545. $fdata["bInlineEdit"]=true;
  546. $fdata["bViewPage"]=true;
  547. $fdata["bAdvancedSearch"]=true;
  548. $fdata["bPrinterPage"]=true;
  549. $fdata["bExportPage"]=true;
  550. //Begin validation
  551. $fdata["validateAs"] = array();
  552. //End validation
  553. $fdata["FieldPermissions"]=true;
  554. $tdataleave_summaryreport["status"]=$fdata;
  555. // leavecount
  556. $fdata = array();
  557. $fdata["strName"] = "leavecount";
  558. $fdata["ownerTable"] = "vwpromotions";
  559. $fdata["Label"]="Number of leaves";
  560. $fdata["FieldType"]= 3;
  561. $fdata["UseiBox"] = false;
  562. $fdata["EditFormat"]= "Text field";
  563. $fdata["ViewFormat"]= "";
  564. $fdata["NeedEncode"]=true;
  565. $fdata["GoodName"]= "leavecount";
  566. $fdata["FullName"]= "vwpromotions.employeeid";
  567. $fdata["Index"]= 8;
  568. $fdata["EditParams"]="";
  569. $fdata["bListPage"]=true;
  570. $fdata["bInlineAdd"]=true;
  571. $fdata["bInlineEdit"]=true;
  572. $fdata["bViewPage"]=true;
  573. $fdata["bAdvancedSearch"]=true;
  574. $fdata["bPrinterPage"]=true;
  575. $fdata["bExportPage"]=true;
  576. //Begin validation
  577. $fdata["validateAs"] = array();
  578. $fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
  579. //End validation
  580. $fdata["FieldPermissions"]=true;
  581. $tdataleave_summaryreport["leavecount"]=$fdata;
  582. // faculty
  583. $fdata = array();
  584. $fdata["strName"] = "faculty";
  585. $fdata["ownerTable"] = "vwpromotions";
  586. $fdata["Label"]="Faculty";
  587. $fdata["FieldType"]= 200;
  588. $fdata["UseiBox"] = false;
  589. $fdata["EditFormat"]= "Lookup wizard";
  590. $fdata["ViewFormat"]= "";
  591. $fdata["LookupType"]=1;
  592. $fdata["pLookupType"] = 1;
  593. $fdata["freeInput"] = 0;
  594. $fdata["autoCompleteFieldsOnEdit"] = 0;
  595. $fdata["autoCompleteFields"] = array();
  596. $fdata["LinkField"]="fame";
  597. $fdata["LinkFieldType"]=200;
  598. $fdata["DisplayField"]="fame";
  599. $fdata["LookupTable"]="tblfaccentres";
  600. $fdata["LookupOrderBy"]="fame";
  601. $fdata["SimpleAdd"]=true;
  602. $fdata["NeedEncode"]=true;
  603. $fdata["GoodName"]= "faculty";
  604. $fdata["FullName"]= "vwpromotions.faculty";
  605. $fdata["Index"]= 9;
  606. $fdata["bListPage"]=true;
  607. $fdata["bAddPage"]=true;
  608. $fdata["bInlineAdd"]=true;
  609. $fdata["bEditPage"]=true;
  610. $fdata["bInlineEdit"]=true;
  611. $fdata["bViewPage"]=true;
  612. $fdata["bAdvancedSearch"]=true;
  613. $fdata["bPrinterPage"]=true;
  614. $fdata["bExportPage"]=true;
  615. //Begin validation
  616. $fdata["validateAs"] = array();
  617. //End validation
  618. $fdata["FieldPermissions"]=true;
  619. $tdataleave_summaryreport["faculty"]=$fdata;
  620. // rank
  621. $fdata = array();
  622. $fdata["strName"] = "rank";
  623. $fdata["ownerTable"] = "tblrank";
  624. $fdata["Label"]="Rank";
  625. $fdata["FieldType"]= 200;
  626. $fdata["UseiBox"] = false;
  627. $fdata["EditFormat"]= "Lookup wizard";
  628. $fdata["ViewFormat"]= "";
  629. $fdata["LookupType"]=1;
  630. $fdata["pLookupType"] = 1;
  631. $fdata["freeInput"] = 0;
  632. $fdata["autoCompleteFieldsOnEdit"] = 0;
  633. $fdata["autoCompleteFields"] = array();
  634. $fdata["LinkField"]="name";
  635. $fdata["LinkFieldType"]=200;
  636. $fdata["DisplayField"]="name";
  637. $fdata["LookupTable"]="tblrank";
  638. $fdata["LookupOrderBy"]="name";
  639. $fdata["SimpleAdd"]=true;
  640. $fdata["NeedEncode"]=true;
  641. $fdata["GoodName"]= "rank";
  642. $fdata["FullName"]= "tblrank.name";
  643. $fdata["Index"]= 10;
  644. $fdata["bListPage"]=true;
  645. $fdata["bAddPage"]=true;
  646. $fdata["bInlineAdd"]=true;
  647. $fdata["bEditPage"]=true;
  648. $fdata["bInlineEdit"]=true;
  649. $fdata["bViewPage"]=true;
  650. $fdata["bAdvancedSearch"]=true;
  651. $fdata["bPrinterPage"]=true;
  652. $fdata["bExportPage"]=true;
  653. //Begin validation
  654. $fdata["validateAs"] = array();
  655. //End validation
  656. $fdata["FieldPermissions"]=true;
  657. $tdataleave_summaryreport["rank"]=$fdata;
  658. // cadre
  659. $fdata = array();
  660. $fdata["strName"] = "cadre";
  661. $fdata["ownerTable"] = "tblcadre";
  662. $fdata["Label"]="Cadre";
  663. $fdata["FieldType"]= 200;
  664. $fdata["UseiBox"] = false;
  665. $fdata["EditFormat"]= "Lookup wizard";
  666. $fdata["ViewFormat"]= "";
  667. $fdata["LookupType"]=1;
  668. $fdata["pLookupType"] = 1;
  669. $fdata["freeInput"] = 0;
  670. $fdata["autoCompleteFieldsOnEdit"] = 0;
  671. $fdata["autoCompleteFields"] = array();
  672. $fdata["LinkField"]=" name";
  673. $fdata["LinkFieldType"]=200;
  674. $fdata["DisplayField"]=" name";
  675. $fdata["LookupTable"]="tblcadre";
  676. $fdata["LookupOrderBy"]=" name";
  677. $fdata["SimpleAdd"]=true;
  678. $fdata["NeedEncode"]=true;
  679. $fdata["GoodName"]= "cadre";
  680. $fdata["FullName"]= "tblcadre.` name`";
  681. $fdata["Index"]= 11;
  682. $fdata["bListPage"]=true;
  683. $fdata["bInlineAdd"]=true;
  684. $fdata["bInlineEdit"]=true;
  685. $fdata["bViewPage"]=true;
  686. $fdata["bAdvancedSearch"]=true;
  687. $fdata["bPrinterPage"]=true;
  688. $fdata["bExportPage"]=true;
  689. //Begin validation
  690. $fdata["validateAs"] = array();
  691. //End validation
  692. $fdata["FieldPermissions"]=true;
  693. $tdataleave_summaryreport["cadre"]=$fdata;
  694. // staffcategory
  695. $fdata = array();
  696. $fdata["strName"] = "staffcategory";
  697. $fdata["ownerTable"] = "tblstaffcategory";
  698. $fdata["Label"]="Staff Category";
  699. $fdata["FieldType"]= 129;
  700. $fdata["UseiBox"] = false;
  701. $fdata["EditFormat"]= "Lookup wizard";
  702. $fdata["ViewFormat"]= "";
  703. $fdata["LookupType"]=1;
  704. $fdata["pLookupType"] = 1;
  705. $fdata["freeInput"] = 0;
  706. $fdata["autoCompleteFieldsOnEdit"] = 0;
  707. $fdata["autoCompleteFields"] = array();
  708. $fdata["LinkField"]="name";
  709. $fdata["LinkFieldType"]=129;
  710. $fdata["DisplayField"]="name";
  711. $fdata["LookupTable"]="tblstaffcategory";
  712. $fdata["LookupOrderBy"]="name";
  713. $fdata["SimpleAdd"]=true;
  714. $fdata["NeedEncode"]=true;
  715. $fdata["GoodName"]= "staffcategory";
  716. $fdata["FullName"]= "tblstaffcategory.name";
  717. $fdata["Index"]= 12;
  718. $fdata["bListPage"]=true;
  719. $fdata["bInlineAdd"]=true;
  720. $fdata["bInlineEdit"]=true;
  721. $fdata["bViewPage"]=true;
  722. $fdata["bAdvancedSearch"]=true;
  723. $fdata["bPrinterPage"]=true;
  724. $fdata["bExportPage"]=true;
  725. //Begin validation
  726. $fdata["validateAs"] = array();
  727. //End validation
  728. $fdata["FieldPermissions"]=true;
  729. $tdataleave_summaryreport["staffcategory"]=$fdata;
  730. $tables_data["leave_summaryreport"]=&$tdataleave_summaryreport;
  731. $field_labels["leave_summaryreport"] = &$fieldLabelsleave_summaryreport;
  732. $fieldToolTips["leave_summaryreport"] = &$fieldToolTipsleave_summaryreport;
  733. // -----------------start prepare master-details data arrays ------------------------------//
  734. // tables which are detail tables for current table (master)
  735. $detailsTablesData["leave_summaryreport"] = array();
  736. // tables which are master tables for current table (detail)
  737. $masterTablesData["leave_summaryreport"] = array();
  738. // -----------------end prepare master-details data arrays ------------------------------//
  739. require_once(getabspath("classes/sql.php"));
  740. function createSqlQuery_leave_summaryreport()
  741. {
  742. $proto0=array();
  743. $proto0["m_strHead"] = "Select";
  744. $proto0["m_strFieldList"] = "vwpromotions.surname, vwpromotions.firstname, vwpromotions.othernames, tblleavetype.description, vwpromotions.personnelno, vwpromotions.dept, tblleaveapplication.status, vwpromotions.employeeid AS leavecount, vwpromotions.faculty, tblrank.name AS rank, tblcadre.` name` AS cadre, tblstaffcategory.name AS staffcategory";
  745. $proto0["m_strFrom"] = "FROM vwpromotions INNER JOIN tblleaveapplication ON vwpromotions.employeeid = tblleaveapplication.employeeid INNER JOIN tblleaveplan ON tblleaveapplication.planid = tblleaveplan.planid INNER JOIN tblleavetype ON tblleaveplan.leavetypeid = tblleavetype.leavetypeid INNER JOIN tblrank ON vwpromotions.rank = tblrank.rankid INNER JOIN tblcadre ON tblrank.cadreid = tblcadre.cadreid INNER JOIN tblstaffcategory ON tblcadre.categoryid = tblstaffcategory.categoryid";
  746. $proto0["m_strWhere"] = "";
  747. $proto0["m_strOrderBy"] = "";
  748. $proto0["m_strTail"] = "GROUP BY vwpromotions.personnelno, vwpromotions.employeeid";
  749. $proto1=array();
  750. $proto1["m_sql"] = "";
  751. $proto1["m_uniontype"] = "SQLL_UNKNOWN";
  752. $obj = new SQLNonParsed(array(
  753. "m_sql" => ""
  754. ));
  755. $proto1["m_column"]=$obj;
  756. $proto1["m_contained"] = array();
  757. $proto1["m_strCase"] = "";
  758. $proto1["m_havingmode"] = "0";
  759. $proto1["m_inBrackets"] = "0";
  760. $proto1["m_useAlias"] = "0";
  761. $obj = new SQLLogicalExpr($proto1);
  762. $proto0["m_where"] = $obj;
  763. $proto3=array();
  764. $proto3["m_sql"] = "";
  765. $proto3["m_uniontype"] = "SQLL_UNKNOWN";
  766. $obj = new SQLNonParsed(array(
  767. "m_sql" => ""
  768. ));
  769. $proto3["m_column"]=$obj;
  770. $proto3["m_contained"] = array();
  771. $proto3["m_strCase"] = "";
  772. $proto3["m_havingmode"] = "0";
  773. $proto3["m_inBrackets"] = "0";
  774. $proto3["m_useAlias"] = "0";
  775. $obj = new SQLLogicalExpr($proto3);
  776. $proto0["m_having"] = $obj;
  777. $proto0["m_fieldlist"] = array();
  778. $proto5=array();
  779. $obj = new SQLField(array(
  780. "m_strName" => "surname",
  781. "m_strTable" => "vwpromotions"
  782. ));
  783. $proto5["m_expr"]=$obj;
  784. $proto5["m_alias"] = "";
  785. $obj = new SQLFieldListItem($proto5);
  786. $proto0["m_fieldlist"][]=$obj;
  787. $proto7=array();
  788. $obj = new SQLField(array(
  789. "m_strName" => "firstname",
  790. "m_strTable" => "vwpromotions"
  791. ));
  792. $proto7["m_expr"]=$obj;
  793. $proto7["m_alias"] = "";
  794. $obj = new SQLFieldListItem($proto7);
  795. $proto0["m_fieldlist"][]=$obj;
  796. $proto9=array();
  797. $obj = new SQLField(array(
  798. "m_strName" => "othernames",
  799. "m_strTable" => "vwpromotions"
  800. ));
  801. $proto9["m_expr"]=$obj;
  802. $proto9["m_alias"] = "";
  803. $obj = new SQLFieldListItem($proto9);
  804. $proto0["m_fieldlist"][]=$obj;
  805. $proto11=array();
  806. $obj = new SQLField(array(
  807. "m_strName" => "description",
  808. "m_strTable" => "tblleavetype"
  809. ));
  810. $proto11["m_expr"]=$obj;
  811. $proto11["m_alias"] = "";
  812. $obj = new SQLFieldListItem($proto11);
  813. $proto0["m_fieldlist"][]=$obj;
  814. $proto13=array();
  815. $obj = new SQLField(array(
  816. "m_strName" => "personnelno",
  817. "m_strTable" => "vwpromotions"
  818. ));
  819. $proto13["m_expr"]=$obj;
  820. $proto13["m_alias"] = "";
  821. $obj = new SQLFieldListItem($proto13);
  822. $proto0["m_fieldlist"][]=$obj;
  823. $proto15=array();
  824. $obj = new SQLField(array(
  825. "m_strName" => "dept",
  826. "m_strTable" => "vwpromotions"
  827. ));
  828. $proto15["m_expr"]=$obj;
  829. $proto15["m_alias"] = "";
  830. $obj = new SQLFieldListItem($proto15);
  831. $proto0["m_fieldlist"][]=$obj;
  832. $proto17=array();
  833. $obj = new SQLField(array(
  834. "m_strName" => "status",
  835. "m_strTable" => "tblleaveapplication"
  836. ));
  837. $proto17["m_expr"]=$obj;
  838. $proto17["m_alias"] = "";
  839. $obj = new SQLFieldListItem($proto17);
  840. $proto0["m_fieldlist"][]=$obj;
  841. $proto19=array();
  842. $obj = new SQLField(array(
  843. "m_strName" => "employeeid",
  844. "m_strTable" => "vwpromotions"
  845. ));
  846. $proto19["m_expr"]=$obj;
  847. $proto19["m_alias"] = "leavecount";
  848. $obj = new SQLFieldListItem($proto19);
  849. $proto0["m_fieldlist"][]=$obj;
  850. $proto21=array();
  851. $obj = new SQLField(array(
  852. "m_strName" => "faculty",
  853. "m_strTable" => "vwpromotions"
  854. ));
  855. $proto21["m_expr"]=$obj;
  856. $proto21["m_alias"] = "";
  857. $obj = new SQLFieldListItem($proto21);
  858. $proto0["m_fieldlist"][]=$obj;
  859. $proto23=array();
  860. $obj = new SQLField(array(
  861. "m_strName" => "name",
  862. "m_strTable" => "tblrank"
  863. ));
  864. $proto23["m_expr"]=$obj;
  865. $proto23["m_alias"] = "rank";
  866. $obj = new SQLFieldListItem($proto23);
  867. $proto0["m_fieldlist"][]=$obj;
  868. $proto25=array();
  869. $obj = new SQLField(array(
  870. "m_strName" => " name",
  871. "m_strTable" => "tblcadre"
  872. ));
  873. $proto25["m_expr"]=$obj;
  874. $proto25["m_alias"] = "cadre";
  875. $obj = new SQLFieldListItem($proto25);
  876. $proto0["m_fieldlist"][]=$obj;
  877. $proto27=array();
  878. $obj = new SQLField(array(
  879. "m_strName" => "name",
  880. "m_strTable" => "tblstaffcategory"
  881. ));
  882. $proto27["m_expr"]=$obj;
  883. $proto27["m_alias"] = "staffcategory";
  884. $obj = new SQLFieldListItem($proto27);
  885. $proto0["m_fieldlist"][]=$obj;
  886. $proto0["m_fromlist"] = array();
  887. $proto29=array();
  888. $proto29["m_link"] = "SQLL_MAIN";
  889. $proto30=array();
  890. $proto30["m_strName"] = "vwpromotions";
  891. $proto30["m_columns"] = array();
  892. $proto30["m_columns"][] = "employeeid";
  893. $proto30["m_columns"][] = "surname";
  894. $proto30["m_columns"][] = "firstname";
  895. $proto30["m_columns"][] = "othernames";
  896. $proto30["m_columns"][] = "personnelno";
  897. $proto30["m_columns"][] = "rank";
  898. $proto30["m_columns"][] = "dept";
  899. $proto30["m_columns"][] = "faculty";
  900. $proto30["m_columns"][] = "effectivedate";
  901. $obj = new SQLTable($proto30);
  902. $proto29["m_table"] = $obj;
  903. $proto29["m_alias"] = "";
  904. $proto31=array();
  905. $proto31["m_sql"] = "";
  906. $proto31["m_uniontype"] = "SQLL_UNKNOWN";
  907. $obj = new SQLNonParsed(array(
  908. "m_sql" => ""
  909. ));
  910. $proto31["m_column"]=$obj;
  911. $proto31["m_contained"] = array();
  912. $proto31["m_strCase"] = "";
  913. $proto31["m_havingmode"] = "0";
  914. $proto31["m_inBrackets"] = "0";
  915. $proto31["m_useAlias"] = "0";
  916. $obj = new SQLLogicalExpr($proto31);
  917. $proto29["m_joinon"] = $obj;
  918. $obj = new SQLFromListItem($proto29);
  919. $proto0["m_fromlist"][]=$obj;
  920. $proto33=array();
  921. $proto33["m_link"] = "SQLL_INNERJOIN";
  922. $proto34=array();
  923. $proto34["m_strName"] = "tblleaveapplication";
  924. $proto34["m_columns"] = array();
  925. $proto34["m_columns"][] = "leaveid";
  926. $proto34["m_columns"][] = "employeeid";
  927. $proto34["m_columns"][] = "planid";
  928. $proto34["m_columns"][] = "fiscalyear";
  929. $proto34["m_columns"][] = "fromdate";
  930. $proto34["m_columns"][] = "todate";
  931. $proto34["m_columns"][] = "daystaken";
  932. $proto34["m_columns"][] = "remark";
  933. $proto34["m_columns"][] = "ifschedule";
  934. $proto34["m_columns"][] = "status";
  935. $obj = new SQLTable($proto34);
  936. $proto33["m_table"] = $obj;
  937. $proto33["m_alias"] = "";
  938. $proto35=array();
  939. $proto35["m_sql"] = "vwpromotions.employeeid = tblleaveapplication.employeeid";
  940. $proto35["m_uniontype"] = "SQLL_UNKNOWN";
  941. $obj = new SQLField(array(
  942. "m_strName" => "employeeid",
  943. "m_strTable" => "vwpromotions"
  944. ));
  945. $proto35["m_column"]=$obj;
  946. $proto35["m_contained"] = array();
  947. $proto35["m_strCase"] = "= tblleaveapplication.employeeid";
  948. $proto35["m_havingmode"] = "0";
  949. $proto35["m_inBrackets"] = "0";
  950. $proto35["m_useAlias"] = "0";
  951. $obj = new SQLLogicalExpr($proto35);
  952. $proto33["m_joinon"] = $obj;
  953. $obj = new SQLFromListItem($proto33);
  954. $proto0["m_fromlist"][]=$obj;
  955. $proto37=array();
  956. $proto37["m_link"] = "SQLL_INNERJOIN";
  957. $proto38=array();
  958. $proto38["m_strName"] = "tblleaveplan";
  959. $proto38["m_columns"] = array();
  960. $proto38["m_columns"][] = "planid";
  961. $proto38["m_columns"][] = "gender";
  962. $proto38["m_columns"][] = "stafflevel";
  963. $proto38["m_columns"][] = "stafftype";
  964. $proto38["m_columns"][] = "nationality";
  965. $proto38["m_columns"][] = "days";
  966. $proto38["m_columns"][] = "ifschedulable";
  967. $proto38["m_columns"][] = "accrualrate";
  968. $proto38["m_columns"][] = "leavetypeid";
  969. $obj = new SQLTable($proto38);
  970. $proto37["m_table"] = $obj;
  971. $proto37["m_alias"] = "";
  972. $proto39=array();
  973. $proto39["m_sql"] = "tblleaveapplication.planid = tblleaveplan.planid";
  974. $proto39["m_uniontype"] = "SQLL_UNKNOWN";
  975. $obj = new SQLField(array(
  976. "m_strName" => "planid",
  977. "m_strTable" => "tblleaveapplication"
  978. ));
  979. $proto39["m_column"]=$obj;
  980. $proto39["m_contained"] = array();
  981. $proto39["m_strCase"] = "= tblleaveplan.planid";
  982. $proto39["m_havingmode"] = "0";
  983. $proto39["m_inBrackets"] = "0";
  984. $proto39["m_useAlias"] = "0";
  985. $obj = new SQLLogicalExpr($proto39);
  986. $proto37["m_joinon"] = $obj;
  987. $obj = new SQLFromListItem($proto37);
  988. $proto0["m_fromlist"][]=$obj;
  989. $proto41=array();
  990. $proto41["m_link"] = "SQLL_INNERJOIN";
  991. $proto42=array();
  992. $proto42["m_strName"] = "tblleavetype";
  993. $proto42["m_columns"] = array();
  994. $proto42["m_columns"][] = "leavetypeid";
  995. $proto42["m_columns"][] = "description";
  996. $obj = new SQLTable($proto42);
  997. $proto41["m_table"] = $obj;
  998. $proto41["m_alias"] = "";
  999. $proto43=array();
  1000. $proto43["m_sql"] = "tblleaveplan.leavetypeid = tblleavetype.leavetypeid";
  1001. $proto43["m_uniontype"] = "SQLL_UNKNOWN";
  1002. $obj = new SQLField(array(
  1003. "m_strName" => "leavetypeid",
  1004. "m_strTable" => "tblleaveplan"
  1005. ));
  1006. $proto43["m_column"]=$obj;
  1007. $proto43["m_contained"] = array();
  1008. $proto43["m_strCase"] = "= tblleavetype.leavetypeid";
  1009. $proto43["m_havingmode"] = "0";
  1010. $proto43["m_inBrackets"] = "0";
  1011. $proto43["m_useAlias"] = "0";
  1012. $obj = new SQLLogicalExpr($proto43);
  1013. $proto41["m_joinon"] = $obj;
  1014. $obj = new SQLFromListItem($proto41);
  1015. $proto0["m_fromlist"][]=$obj;
  1016. $proto45=array();
  1017. $proto45["m_link"] = "SQLL_INNERJOIN";
  1018. $proto46=array();
  1019. $proto46["m_strName"] = "tblrank";
  1020. $proto46["m_columns"] = array();
  1021. $proto46["m_columns"][] = "rankid";
  1022. $proto46["m_columns"][] = "cadreid";
  1023. $proto46["m_columns"][] = "name";
  1024. $proto46["m_columns"][] = "grade";
  1025. $obj = new SQLTable($proto46);
  1026. $proto45["m_table"] = $obj;
  1027. $proto45["m_alias"] = "";
  1028. $proto47=array();
  1029. $proto47["m_sql"] = "vwpromotions.rank = tblrank.rankid";
  1030. $proto47["m_uniontype"] = "SQLL_UNKNOWN";
  1031. $obj = new SQLField(array(
  1032. "m_strName" => "rank",
  1033. "m_strTable" => "vwpromotions"
  1034. ));
  1035. $proto47["m_column"]=$obj;
  1036. $proto47["m_contained"] = array();
  1037. $proto47["m_strCase"] = "= tblrank.rankid";
  1038. $proto47["m_havingmode"] = "0";
  1039. $proto47["m_inBrackets"] = "0";
  1040. $proto47["m_useAlias"] = "0";
  1041. $obj = new SQLLogicalExpr($proto47);
  1042. $proto45["m_joinon"] = $obj;
  1043. $obj = new SQLFromListItem($proto45);
  1044. $proto0["m_fromlist"][]=$obj;
  1045. $proto49=array();
  1046. $proto49["m_link"] = "SQLL_INNERJOIN";
  1047. $proto50=array();
  1048. $proto50["m_strName"] = "tblcadre";
  1049. $proto50["m_columns"] = array();
  1050. $proto50["m_columns"][] = "cadreid";
  1051. $proto50["m_columns"][] = " name";
  1052. $proto50["m_columns"][] = "categoryid";
  1053. $obj = new SQLTable($proto50);
  1054. $proto49["m_table"] = $obj;
  1055. $proto49["m_alias"] = "";
  1056. $proto51=array();
  1057. $proto51["m_sql"] = "tblrank.cadreid = tblcadre.cadreid";
  1058. $proto51["m_uniontype"] = "SQLL_UNKNOWN";
  1059. $obj = new SQLField(array(
  1060. "m_strName" => "cadreid",
  1061. "m_strTable" => "tblrank"
  1062. ));
  1063. $proto51["m_column"]=$obj;
  1064. $proto51["m_contained"] = array();
  1065. $proto51["m_strCase"] = "= tblcadre.cadreid";
  1066. $proto51["m_havingmode"] = "0";
  1067. $proto51["m_inBrackets"] = "0";
  1068. $proto51["m_useAlias"] = "0";
  1069. $obj = new SQLLogicalExpr($proto51);
  1070. $proto49["m_joinon"] = $obj;
  1071. $obj = new SQLFromListItem($proto49);
  1072. $proto0["m_fromlist"][]=$obj;
  1073. $proto53=array();
  1074. $proto53["m_link"] = "SQLL_INNERJOIN";
  1075. $proto54=array();
  1076. $proto54["m_strName"] = "tblstaffcategory";
  1077. $proto54["m_columns"] = array();
  1078. $proto54["m_columns"][] = "categoryid";
  1079. $proto54["m_columns"][] = "name";
  1080. $obj = new SQLTable($proto54);
  1081. $proto53["m_table"] = $obj;
  1082. $proto53["m_alias"] = "";
  1083. $proto55=array();
  1084. $proto55["m_sql"] = "tblcadre.categoryid = tblstaffcategory.categoryid";
  1085. $proto55["m_uniontype"] = "SQLL_UNKNOWN";
  1086. $obj = new SQLField(array(
  1087. "m_strName" => "categoryid",
  1088. "m_strTable" => "tblcadre"
  1089. ));
  1090. $proto55["m_column"]=$obj;
  1091. $proto55["m_contained"] = array();
  1092. $proto55["m_strCase"] = "= tblstaffcategory.categoryid";
  1093. $proto55["m_havingmode"] = "0";
  1094. $proto55["m_inBrackets"] = "0";
  1095. $proto55["m_useAlias"] = "0";
  1096. $obj = new SQLLogicalExpr($proto55);
  1097. $proto53["m_joinon"] = $obj;
  1098. $obj = new SQLFromListItem($proto53);
  1099. $proto0["m_fromlist"][]=$obj;
  1100. $proto0["m_groupby"] = array();
  1101. $proto57=array();
  1102. $obj = new SQLField(array(
  1103. "m_strName" => "personnelno",
  1104. "m_strTable" => "vwpromotions"
  1105. ));
  1106. $proto57["m_column"]=$obj;
  1107. $obj = new SQLGroupByItem($proto57);
  1108. $proto0["m_groupby"][]=$obj;
  1109. $proto59=array();
  1110. $obj = new SQLField(array(
  1111. "m_strName" => "employeeid",
  1112. "m_strTable" => "vwpromotions"
  1113. ));
  1114. $proto59["m_column"]=$obj;
  1115. $obj = new SQLGroupByItem($proto59);
  1116. $proto0["m_groupby"][]=$obj;
  1117. $proto0["m_orderby"] = array();
  1118. $obj = new SQLQuery($proto0);
  1119. return $obj;
  1120. }
  1121. $queryData_leave_summaryreport = createSqlQuery_leave_summaryreport();
  1122. $tdataleave_summaryreport[".sqlquery"] = $queryData_leave_summaryreport;
  1123. $tableEvents["leave_summaryreport"] = new eventsBase;
  1124. $tdataleave_summaryreport[".hasEvents"] = false;
  1125. ?>