PageRenderTime 54ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/reports/leaves_reports/output/include/leave_planreport_settings.php

https://bitbucket.org/lecturer34/hrmis
PHP | 1012 lines | 607 code | 358 blank | 47 comment | 24 complexity | e55a40789a2d2da94e6955a664eda290 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. $tdataleave_planreport=array();
  3. $tdataleave_planreport[".ShortName"]="leave_planreport";
  4. $tdataleave_planreport[".OwnerID"]="";
  5. $tdataleave_planreport[".OriginalTable"]="tblleaveplan";
  6. // field labels
  7. $fieldLabelsleave_planreport = array();
  8. if(mlang_getcurrentlang()=="English")
  9. {
  10. $fieldLabelsleave_planreport["English"]=array();
  11. $fieldToolTipsleave_planreport["English"]=array();
  12. $fieldLabelsleave_planreport["English"]["gender"] = "Gender";
  13. $fieldToolTipsleave_planreport["English"]["gender"] = "";
  14. $fieldLabelsleave_planreport["English"]["stafflevel"] = "Staff Level";
  15. $fieldToolTipsleave_planreport["English"]["stafflevel"] = "";
  16. $fieldLabelsleave_planreport["English"]["stafftype"] = "Staff Type";
  17. $fieldToolTipsleave_planreport["English"]["stafftype"] = "";
  18. $fieldLabelsleave_planreport["English"]["days"] = "Days";
  19. $fieldToolTipsleave_planreport["English"]["days"] = "";
  20. $fieldLabelsleave_planreport["English"]["description"] = "Leave Type";
  21. $fieldToolTipsleave_planreport["English"]["description"] = "";
  22. $fieldLabelsleave_planreport["English"]["countryname"] = "Nationality";
  23. $fieldToolTipsleave_planreport["English"]["countryname"] = "";
  24. $fieldLabelsleave_planreport["English"][""] = "";
  25. $fieldToolTipsleave_planreport["English"][""] = "";
  26. $fieldLabelsleave_planreport["English"][""] = "Leave Plan";
  27. $fieldToolTipsleave_planreport["English"][""] = "";
  28. if (count($fieldToolTipsleave_planreport["English"])){
  29. $tdataleave_planreport[".isUseToolTips"]=true;
  30. }
  31. }
  32. $tdataleave_planreport[".NCSearch"]=true;
  33. $tdataleave_planreport[".shortTableName"] = "leave_planreport";
  34. $tdataleave_planreport[".nSecOptions"] = 0;
  35. $tdataleave_planreport[".recsPerRowList"] = 1;
  36. $tdataleave_planreport[".tableGroupBy"] = "0";
  37. $tdataleave_planreport[".mainTableOwnerID"] = "";
  38. $tdataleave_planreport[".moveNext"] = 1;
  39. $tdataleave_planreport[".showAddInPopup"] = false;
  40. $tdataleave_planreport[".showEditInPopup"] = false;
  41. $tdataleave_planreport[".showViewInPopup"] = false;
  42. $tdataleave_planreport[".fieldsForRegister"] = array();
  43. $tdataleave_planreport[".listAjax"] = false;
  44. $tdataleave_planreport[".audit"] = false;
  45. $tdataleave_planreport[".locking"] = false;
  46. $tdataleave_planreport[".listIcons"] = true;
  47. $tdataleave_planreport[".edit"] = true;
  48. $tdataleave_planreport[".inlineEdit"] = true;
  49. $tdataleave_planreport[".view"] = true;
  50. $tdataleave_planreport[".exportTo"] = true;
  51. $tdataleave_planreport[".printFriendly"] = true;
  52. $tdataleave_planreport[".delete"] = true;
  53. $tdataleave_planreport[".showSimpleSearchOptions"] = false;
  54. $tdataleave_planreport[".showSearchPanel"] = true;
  55. if (isMobile()){
  56. $tdataleave_planreport[".isUseAjaxSuggest"] = false;
  57. }else {
  58. $tdataleave_planreport[".isUseAjaxSuggest"] = true;
  59. }
  60. // button handlers file names
  61. $tdataleave_planreport[".addPageEvents"] = false;
  62. // use datepicker for search panel
  63. $tdataleave_planreport[".isUseCalendarForSearch"] = false;
  64. // use timepicker for search panel
  65. $tdataleave_planreport[".isUseTimeForSearch"] = false;
  66. $tdataleave_planreport[".isUseiBox"] = false;
  67. $tdataleave_planreport[".isUseInlineJs"] = $tdataleave_planreport[".isUseInlineAdd"] || $tdataleave_planreport[".isUseInlineEdit"];
  68. $tdataleave_planreport[".allSearchFields"] = array();
  69. $tdataleave_planreport[".globSearchFields"][] = "gender";
  70. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  71. if (!in_array("gender", $tdataleave_planreport[".allSearchFields"]))
  72. {
  73. $tdataleave_planreport[".allSearchFields"][] = "gender";
  74. }
  75. $tdataleave_planreport[".globSearchFields"][] = "stafflevel";
  76. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  77. if (!in_array("stafflevel", $tdataleave_planreport[".allSearchFields"]))
  78. {
  79. $tdataleave_planreport[".allSearchFields"][] = "stafflevel";
  80. }
  81. $tdataleave_planreport[".globSearchFields"][] = "stafftype";
  82. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  83. if (!in_array("stafftype", $tdataleave_planreport[".allSearchFields"]))
  84. {
  85. $tdataleave_planreport[".allSearchFields"][] = "stafftype";
  86. }
  87. $tdataleave_planreport[".globSearchFields"][] = "days";
  88. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  89. if (!in_array("days", $tdataleave_planreport[".allSearchFields"]))
  90. {
  91. $tdataleave_planreport[".allSearchFields"][] = "days";
  92. }
  93. $tdataleave_planreport[".globSearchFields"][] = "description";
  94. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  95. if (!in_array("description", $tdataleave_planreport[".allSearchFields"]))
  96. {
  97. $tdataleave_planreport[".allSearchFields"][] = "description";
  98. }
  99. $tdataleave_planreport[".globSearchFields"][] = "countryname";
  100. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  101. if (!in_array("countryname", $tdataleave_planreport[".allSearchFields"]))
  102. {
  103. $tdataleave_planreport[".allSearchFields"][] = "countryname";
  104. }
  105. $tdataleave_planreport[".googleLikeFields"][] = "gender";
  106. $tdataleave_planreport[".googleLikeFields"][] = "stafflevel";
  107. $tdataleave_planreport[".googleLikeFields"][] = "stafftype";
  108. $tdataleave_planreport[".googleLikeFields"][] = "days";
  109. $tdataleave_planreport[".googleLikeFields"][] = "description";
  110. $tdataleave_planreport[".googleLikeFields"][] = "countryname";
  111. $tdataleave_planreport[".panelSearchFields"][] = "gender";
  112. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  113. if (!in_array("gender", $tdataleave_planreport[".allSearchFields"]))
  114. {
  115. $tdataleave_planreport[".allSearchFields"][] = "gender";
  116. }
  117. $tdataleave_planreport[".panelSearchFields"][] = "stafflevel";
  118. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  119. if (!in_array("stafflevel", $tdataleave_planreport[".allSearchFields"]))
  120. {
  121. $tdataleave_planreport[".allSearchFields"][] = "stafflevel";
  122. }
  123. $tdataleave_planreport[".panelSearchFields"][] = "stafftype";
  124. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  125. if (!in_array("stafftype", $tdataleave_planreport[".allSearchFields"]))
  126. {
  127. $tdataleave_planreport[".allSearchFields"][] = "stafftype";
  128. }
  129. $tdataleave_planreport[".panelSearchFields"][] = "days";
  130. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  131. if (!in_array("days", $tdataleave_planreport[".allSearchFields"]))
  132. {
  133. $tdataleave_planreport[".allSearchFields"][] = "days";
  134. }
  135. $tdataleave_planreport[".panelSearchFields"][] = "description";
  136. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  137. if (!in_array("description", $tdataleave_planreport[".allSearchFields"]))
  138. {
  139. $tdataleave_planreport[".allSearchFields"][] = "description";
  140. }
  141. $tdataleave_planreport[".panelSearchFields"][] = "countryname";
  142. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  143. if (!in_array("countryname", $tdataleave_planreport[".allSearchFields"]))
  144. {
  145. $tdataleave_planreport[".allSearchFields"][] = "countryname";
  146. }
  147. $tdataleave_planreport[".advSearchFields"][] = "gender";
  148. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  149. if (!in_array("gender", $tdataleave_planreport[".allSearchFields"]))
  150. {
  151. $tdataleave_planreport[".allSearchFields"][] = "gender";
  152. }
  153. $tdataleave_planreport[".advSearchFields"][] = "stafflevel";
  154. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  155. if (!in_array("stafflevel", $tdataleave_planreport[".allSearchFields"]))
  156. {
  157. $tdataleave_planreport[".allSearchFields"][] = "stafflevel";
  158. }
  159. $tdataleave_planreport[".advSearchFields"][] = "stafftype";
  160. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  161. if (!in_array("stafftype", $tdataleave_planreport[".allSearchFields"]))
  162. {
  163. $tdataleave_planreport[".allSearchFields"][] = "stafftype";
  164. }
  165. $tdataleave_planreport[".advSearchFields"][] = "days";
  166. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  167. if (!in_array("days", $tdataleave_planreport[".allSearchFields"]))
  168. {
  169. $tdataleave_planreport[".allSearchFields"][] = "days";
  170. }
  171. $tdataleave_planreport[".advSearchFields"][] = "description";
  172. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  173. if (!in_array("description", $tdataleave_planreport[".allSearchFields"]))
  174. {
  175. $tdataleave_planreport[".allSearchFields"][] = "description";
  176. }
  177. $tdataleave_planreport[".advSearchFields"][] = "countryname";
  178. // do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
  179. if (!in_array("countryname", $tdataleave_planreport[".allSearchFields"]))
  180. {
  181. $tdataleave_planreport[".allSearchFields"][] = "countryname";
  182. }
  183. $tdataleave_planreport[".isTableType"] = "report";
  184. // Access doesn't support subqueries from the same table as main
  185. $tdataleave_planreport[".subQueriesSupAccess"] = true;
  186. $gstrOrderBy = "";
  187. if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
  188. $gstrOrderBy = "order by ".$gstrOrderBy;
  189. $tdataleave_planreport[".strOrderBy"] = $gstrOrderBy;
  190. $tdataleave_planreport[".orderindexes"] = array();
  191. $tdataleave_planreport[".sqlHead"] = "SELECT tblleaveplan.gender, tblleaveplan.stafflevel, tblleaveplan.stafftype, tblleaveplan.days, tblleavetype.description, tblcountries.countryname";
  192. $tdataleave_planreport[".sqlFrom"] = "FROM tblleaveplan INNER JOIN tblleavetype ON tblleaveplan.leavetypeid = tblleavetype.leavetypeid INNER JOIN tblcountries ON tblleaveplan.nationality = tblcountries.countryid";
  193. $tdataleave_planreport[".sqlWhereExpr"] = "";
  194. $tdataleave_planreport[".sqlTail"] = "";
  195. //fill array of records per page for list and report without group fields
  196. $arrRPP = array();
  197. $arrRPP[] = 10;
  198. $arrRPP[] = 20;
  199. $arrRPP[] = 30;
  200. $arrRPP[] = 50;
  201. $arrRPP[] = 100;
  202. $arrRPP[] = 500;
  203. $arrRPP[] = -1;
  204. $tdataleave_planreport[".arrRecsPerPage"] = $arrRPP;
  205. //fill array of groups per page for report with group fields
  206. $arrGPP = array();
  207. $arrGPP[] = 1;
  208. $arrGPP[] = 3;
  209. $arrGPP[] = 5;
  210. $arrGPP[] = 10;
  211. $arrGPP[] = 50;
  212. $arrGPP[] = 100;
  213. $arrGPP[] = -1;
  214. $tdataleave_planreport[".arrGroupsPerPage"] = $arrGPP;
  215. $tableKeys = array();
  216. $tdataleave_planreport[".Keys"] = $tableKeys;
  217. $tdataleave_planreport[".listFields"] = array();
  218. $tdataleave_planreport[".listFields"][] = "gender";
  219. $tdataleave_planreport[".listFields"][] = "stafflevel";
  220. $tdataleave_planreport[".listFields"][] = "stafftype";
  221. $tdataleave_planreport[".listFields"][] = "days";
  222. $tdataleave_planreport[".listFields"][] = "description";
  223. $tdataleave_planreport[".listFields"][] = "countryname";
  224. $tdataleave_planreport[".addFields"] = array();
  225. $tdataleave_planreport[".addFields"][] = "gender";
  226. $tdataleave_planreport[".addFields"][] = "stafflevel";
  227. $tdataleave_planreport[".addFields"][] = "stafftype";
  228. $tdataleave_planreport[".addFields"][] = "days";
  229. $tdataleave_planreport[".inlineAddFields"] = array();
  230. $tdataleave_planreport[".inlineAddFields"][] = "gender";
  231. $tdataleave_planreport[".inlineAddFields"][] = "stafflevel";
  232. $tdataleave_planreport[".inlineAddFields"][] = "stafftype";
  233. $tdataleave_planreport[".inlineAddFields"][] = "days";
  234. $tdataleave_planreport[".inlineAddFields"][] = "description";
  235. $tdataleave_planreport[".inlineAddFields"][] = "countryname";
  236. $tdataleave_planreport[".editFields"] = array();
  237. $tdataleave_planreport[".editFields"][] = "gender";
  238. $tdataleave_planreport[".editFields"][] = "stafflevel";
  239. $tdataleave_planreport[".editFields"][] = "stafftype";
  240. $tdataleave_planreport[".editFields"][] = "days";
  241. $tdataleave_planreport[".inlineEditFields"] = array();
  242. $tdataleave_planreport[".inlineEditFields"][] = "gender";
  243. $tdataleave_planreport[".inlineEditFields"][] = "stafflevel";
  244. $tdataleave_planreport[".inlineEditFields"][] = "stafftype";
  245. $tdataleave_planreport[".inlineEditFields"][] = "days";
  246. $tdataleave_planreport[".inlineEditFields"][] = "description";
  247. $tdataleave_planreport[".inlineEditFields"][] = "countryname";
  248. // gender
  249. $fdata = array();
  250. $fdata["strName"] = "gender";
  251. $fdata["ownerTable"] = "tblleaveplan";
  252. $fdata["Label"]="Gender";
  253. $fdata["FieldType"]= 129;
  254. $fdata["UseiBox"] = false;
  255. $fdata["EditFormat"]= "Text field";
  256. $fdata["ViewFormat"]= "";
  257. $fdata["NeedEncode"]=true;
  258. $fdata["GoodName"]= "gender";
  259. $fdata["FullName"]= "tblleaveplan.gender";
  260. $fdata["Index"]= 1;
  261. $fdata["EditParams"]="";
  262. $fdata["bListPage"]=true;
  263. $fdata["bAddPage"]=true;
  264. $fdata["bInlineAdd"]=true;
  265. $fdata["bEditPage"]=true;
  266. $fdata["bInlineEdit"]=true;
  267. $fdata["bViewPage"]=true;
  268. $fdata["bAdvancedSearch"]=true;
  269. $fdata["bPrinterPage"]=true;
  270. $fdata["bExportPage"]=true;
  271. //Begin validation
  272. $fdata["validateAs"] = array();
  273. //End validation
  274. $fdata["FieldPermissions"]=true;
  275. $tdataleave_planreport["gender"]=$fdata;
  276. // stafflevel
  277. $fdata = array();
  278. $fdata["strName"] = "stafflevel";
  279. $fdata["ownerTable"] = "tblleaveplan";
  280. $fdata["Label"]="Staff Level";
  281. $fdata["FieldType"]= 129;
  282. $fdata["UseiBox"] = false;
  283. $fdata["EditFormat"]= "Lookup wizard";
  284. $fdata["ViewFormat"]= "";
  285. $fdata["LookupType"]=1;
  286. $fdata["pLookupType"] = 1;
  287. $fdata["freeInput"] = 0;
  288. $fdata["autoCompleteFieldsOnEdit"] = 0;
  289. $fdata["autoCompleteFields"] = array();
  290. $fdata["LinkField"]="name";
  291. $fdata["LinkFieldType"]=129;
  292. $fdata["DisplayField"]="name";
  293. $fdata["LookupTable"]="tblstaffcategory";
  294. $fdata["LookupOrderBy"]="name";
  295. $fdata["SimpleAdd"]=true;
  296. $fdata["NeedEncode"]=true;
  297. $fdata["GoodName"]= "stafflevel";
  298. $fdata["FullName"]= "tblleaveplan.stafflevel";
  299. $fdata["Index"]= 2;
  300. $fdata["bListPage"]=true;
  301. $fdata["bAddPage"]=true;
  302. $fdata["bInlineAdd"]=true;
  303. $fdata["bEditPage"]=true;
  304. $fdata["bInlineEdit"]=true;
  305. $fdata["bViewPage"]=true;
  306. $fdata["bAdvancedSearch"]=true;
  307. $fdata["bPrinterPage"]=true;
  308. $fdata["bExportPage"]=true;
  309. //Begin validation
  310. $fdata["validateAs"] = array();
  311. //End validation
  312. $fdata["FieldPermissions"]=true;
  313. $tdataleave_planreport["stafflevel"]=$fdata;
  314. // stafftype
  315. $fdata = array();
  316. $fdata["strName"] = "stafftype";
  317. $fdata["ownerTable"] = "tblleaveplan";
  318. $fdata["Label"]="Staff Type";
  319. $fdata["FieldType"]= 129;
  320. $fdata["UseiBox"] = false;
  321. $fdata["EditFormat"]= "Lookup wizard";
  322. $fdata["ViewFormat"]= "";
  323. $fdata["LookupType"]=1;
  324. $fdata["pLookupType"] = 1;
  325. $fdata["freeInput"] = 0;
  326. $fdata["autoCompleteFieldsOnEdit"] = 0;
  327. $fdata["autoCompleteFields"] = array();
  328. $fdata["LCType"]= 3;
  329. $fdata["LinkField"]="stafftype";
  330. $fdata["LinkFieldType"]=129;
  331. $fdata["DisplayField"]="stafftype";
  332. $fdata["LookupTable"]="tblstafftype";
  333. $fdata["LookupOrderBy"]="stafftype";
  334. $fdata["SimpleAdd"]=true;
  335. $fdata["Multiselect"]=true;
  336. $fdata["SelectSize"] = 1;
  337. $fdata["NeedEncode"]=true;
  338. $fdata["GoodName"]= "stafftype";
  339. $fdata["FullName"]= "tblleaveplan.stafftype";
  340. $fdata["Index"]= 3;
  341. $fdata["bListPage"]=true;
  342. $fdata["bAddPage"]=true;
  343. $fdata["bInlineAdd"]=true;
  344. $fdata["bEditPage"]=true;
  345. $fdata["bInlineEdit"]=true;
  346. $fdata["bViewPage"]=true;
  347. $fdata["bAdvancedSearch"]=true;
  348. $fdata["bPrinterPage"]=true;
  349. $fdata["bExportPage"]=true;
  350. //Begin validation
  351. $fdata["validateAs"] = array();
  352. //End validation
  353. $fdata["FieldPermissions"]=true;
  354. $tdataleave_planreport["stafftype"]=$fdata;
  355. // days
  356. $fdata = array();
  357. $fdata["strName"] = "days";
  358. $fdata["ownerTable"] = "tblleaveplan";
  359. $fdata["Label"]="Days";
  360. $fdata["FieldType"]= 3;
  361. $fdata["UseiBox"] = false;
  362. $fdata["EditFormat"]= "Text field";
  363. $fdata["ViewFormat"]= "";
  364. $fdata["NeedEncode"]=true;
  365. $fdata["GoodName"]= "days";
  366. $fdata["FullName"]= "tblleaveplan.days";
  367. $fdata["Index"]= 4;
  368. $fdata["EditParams"]="";
  369. $fdata["bListPage"]=true;
  370. $fdata["bAddPage"]=true;
  371. $fdata["bInlineAdd"]=true;
  372. $fdata["bEditPage"]=true;
  373. $fdata["bInlineEdit"]=true;
  374. $fdata["bViewPage"]=true;
  375. $fdata["bAdvancedSearch"]=true;
  376. $fdata["bPrinterPage"]=true;
  377. $fdata["bExportPage"]=true;
  378. //Begin validation
  379. $fdata["validateAs"] = array();
  380. $fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
  381. //End validation
  382. $fdata["FieldPermissions"]=true;
  383. $tdataleave_planreport["days"]=$fdata;
  384. // description
  385. $fdata = array();
  386. $fdata["strName"] = "description";
  387. $fdata["ownerTable"] = "tblleavetype";
  388. $fdata["Label"]="Leave Type";
  389. $fdata["FieldType"]= 200;
  390. $fdata["UseiBox"] = false;
  391. $fdata["EditFormat"]= "Lookup wizard";
  392. $fdata["ViewFormat"]= "";
  393. $fdata["LookupType"]=1;
  394. $fdata["pLookupType"] = 1;
  395. $fdata["freeInput"] = 0;
  396. $fdata["autoCompleteFieldsOnEdit"] = 0;
  397. $fdata["autoCompleteFields"] = array();
  398. $fdata["LinkField"]="description";
  399. $fdata["LinkFieldType"]=200;
  400. $fdata["DisplayField"]="description";
  401. $fdata["LookupTable"]="tblleavetype";
  402. $fdata["LookupOrderBy"]="description";
  403. $fdata["NeedEncode"]=true;
  404. $fdata["GoodName"]= "description";
  405. $fdata["FullName"]= "tblleavetype.description";
  406. $fdata["Index"]= 5;
  407. $fdata["bListPage"]=true;
  408. $fdata["bInlineAdd"]=true;
  409. $fdata["bInlineEdit"]=true;
  410. $fdata["bViewPage"]=true;
  411. $fdata["bAdvancedSearch"]=true;
  412. $fdata["bPrinterPage"]=true;
  413. $fdata["bExportPage"]=true;
  414. //Begin validation
  415. $fdata["validateAs"] = array();
  416. //End validation
  417. $fdata["FieldPermissions"]=true;
  418. $tdataleave_planreport["description"]=$fdata;
  419. // countryname
  420. $fdata = array();
  421. $fdata["strName"] = "countryname";
  422. $fdata["ownerTable"] = "tblcountries";
  423. $fdata["Label"]="Nationality";
  424. $fdata["FieldType"]= 200;
  425. $fdata["UseiBox"] = false;
  426. $fdata["EditFormat"]= "Lookup wizard";
  427. $fdata["ViewFormat"]= "";
  428. $fdata["LookupType"]=1;
  429. $fdata["pLookupType"] = 1;
  430. $fdata["freeInput"] = 0;
  431. $fdata["autoCompleteFieldsOnEdit"] = 0;
  432. $fdata["autoCompleteFields"] = array();
  433. $fdata["LinkField"]="countryname";
  434. $fdata["LinkFieldType"]=200;
  435. $fdata["DisplayField"]="countryname";
  436. $fdata["LookupTable"]="tblcountries";
  437. $fdata["LookupOrderBy"]="countryname";
  438. $fdata["SimpleAdd"]=true;
  439. $fdata["NeedEncode"]=true;
  440. $fdata["GoodName"]= "countryname";
  441. $fdata["FullName"]= "tblcountries.countryname";
  442. $fdata["Index"]= 6;
  443. $fdata["bListPage"]=true;
  444. $fdata["bInlineAdd"]=true;
  445. $fdata["bInlineEdit"]=true;
  446. $fdata["bViewPage"]=true;
  447. $fdata["bAdvancedSearch"]=true;
  448. $fdata["bPrinterPage"]=true;
  449. $fdata["bExportPage"]=true;
  450. //Begin validation
  451. $fdata["validateAs"] = array();
  452. //End validation
  453. $fdata["FieldPermissions"]=true;
  454. $tdataleave_planreport["countryname"]=$fdata;
  455. $tables_data["leave_planreport"]=&$tdataleave_planreport;
  456. $field_labels["leave_planreport"] = &$fieldLabelsleave_planreport;
  457. $fieldToolTips["leave_planreport"] = &$fieldToolTipsleave_planreport;
  458. // -----------------start prepare master-details data arrays ------------------------------//
  459. // tables which are detail tables for current table (master)
  460. $detailsTablesData["leave_planreport"] = array();
  461. // tables which are master tables for current table (detail)
  462. $masterTablesData["leave_planreport"] = array();
  463. // -----------------end prepare master-details data arrays ------------------------------//
  464. require_once(getabspath("classes/sql.php"));
  465. function createSqlQuery_leave_planreport()
  466. {
  467. $proto0=array();
  468. $proto0["m_strHead"] = "SELECT";
  469. $proto0["m_strFieldList"] = "tblleaveplan.gender, tblleaveplan.stafflevel, tblleaveplan.stafftype, tblleaveplan.days, tblleavetype.description, tblcountries.countryname";
  470. $proto0["m_strFrom"] = "FROM tblleaveplan INNER JOIN tblleavetype ON tblleaveplan.leavetypeid = tblleavetype.leavetypeid INNER JOIN tblcountries ON tblleaveplan.nationality = tblcountries.countryid";
  471. $proto0["m_strWhere"] = "";
  472. $proto0["m_strOrderBy"] = "";
  473. $proto0["m_strTail"] = "";
  474. $proto1=array();
  475. $proto1["m_sql"] = "";
  476. $proto1["m_uniontype"] = "SQLL_UNKNOWN";
  477. $obj = new SQLNonParsed(array(
  478. "m_sql" => ""
  479. ));
  480. $proto1["m_column"]=$obj;
  481. $proto1["m_contained"] = array();
  482. $proto1["m_strCase"] = "";
  483. $proto1["m_havingmode"] = "0";
  484. $proto1["m_inBrackets"] = "0";
  485. $proto1["m_useAlias"] = "0";
  486. $obj = new SQLLogicalExpr($proto1);
  487. $proto0["m_where"] = $obj;
  488. $proto3=array();
  489. $proto3["m_sql"] = "";
  490. $proto3["m_uniontype"] = "SQLL_UNKNOWN";
  491. $obj = new SQLNonParsed(array(
  492. "m_sql" => ""
  493. ));
  494. $proto3["m_column"]=$obj;
  495. $proto3["m_contained"] = array();
  496. $proto3["m_strCase"] = "";
  497. $proto3["m_havingmode"] = "0";
  498. $proto3["m_inBrackets"] = "0";
  499. $proto3["m_useAlias"] = "0";
  500. $obj = new SQLLogicalExpr($proto3);
  501. $proto0["m_having"] = $obj;
  502. $proto0["m_fieldlist"] = array();
  503. $proto5=array();
  504. $obj = new SQLField(array(
  505. "m_strName" => "gender",
  506. "m_strTable" => "tblleaveplan"
  507. ));
  508. $proto5["m_expr"]=$obj;
  509. $proto5["m_alias"] = "";
  510. $obj = new SQLFieldListItem($proto5);
  511. $proto0["m_fieldlist"][]=$obj;
  512. $proto7=array();
  513. $obj = new SQLField(array(
  514. "m_strName" => "stafflevel",
  515. "m_strTable" => "tblleaveplan"
  516. ));
  517. $proto7["m_expr"]=$obj;
  518. $proto7["m_alias"] = "";
  519. $obj = new SQLFieldListItem($proto7);
  520. $proto0["m_fieldlist"][]=$obj;
  521. $proto9=array();
  522. $obj = new SQLField(array(
  523. "m_strName" => "stafftype",
  524. "m_strTable" => "tblleaveplan"
  525. ));
  526. $proto9["m_expr"]=$obj;
  527. $proto9["m_alias"] = "";
  528. $obj = new SQLFieldListItem($proto9);
  529. $proto0["m_fieldlist"][]=$obj;
  530. $proto11=array();
  531. $obj = new SQLField(array(
  532. "m_strName" => "days",
  533. "m_strTable" => "tblleaveplan"
  534. ));
  535. $proto11["m_expr"]=$obj;
  536. $proto11["m_alias"] = "";
  537. $obj = new SQLFieldListItem($proto11);
  538. $proto0["m_fieldlist"][]=$obj;
  539. $proto13=array();
  540. $obj = new SQLField(array(
  541. "m_strName" => "description",
  542. "m_strTable" => "tblleavetype"
  543. ));
  544. $proto13["m_expr"]=$obj;
  545. $proto13["m_alias"] = "";
  546. $obj = new SQLFieldListItem($proto13);
  547. $proto0["m_fieldlist"][]=$obj;
  548. $proto15=array();
  549. $obj = new SQLField(array(
  550. "m_strName" => "countryname",
  551. "m_strTable" => "tblcountries"
  552. ));
  553. $proto15["m_expr"]=$obj;
  554. $proto15["m_alias"] = "";
  555. $obj = new SQLFieldListItem($proto15);
  556. $proto0["m_fieldlist"][]=$obj;
  557. $proto0["m_fromlist"] = array();
  558. $proto17=array();
  559. $proto17["m_link"] = "SQLL_MAIN";
  560. $proto18=array();
  561. $proto18["m_strName"] = "tblleaveplan";
  562. $proto18["m_columns"] = array();
  563. $proto18["m_columns"][] = "planid";
  564. $proto18["m_columns"][] = "gender";
  565. $proto18["m_columns"][] = "stafflevel";
  566. $proto18["m_columns"][] = "stafftype";
  567. $proto18["m_columns"][] = "nationality";
  568. $proto18["m_columns"][] = "days";
  569. $proto18["m_columns"][] = "ifschedulable";
  570. $proto18["m_columns"][] = "accrualrate";
  571. $proto18["m_columns"][] = "leavetypeid";
  572. $obj = new SQLTable($proto18);
  573. $proto17["m_table"] = $obj;
  574. $proto17["m_alias"] = "";
  575. $proto19=array();
  576. $proto19["m_sql"] = "";
  577. $proto19["m_uniontype"] = "SQLL_UNKNOWN";
  578. $obj = new SQLNonParsed(array(
  579. "m_sql" => ""
  580. ));
  581. $proto19["m_column"]=$obj;
  582. $proto19["m_contained"] = array();
  583. $proto19["m_strCase"] = "";
  584. $proto19["m_havingmode"] = "0";
  585. $proto19["m_inBrackets"] = "0";
  586. $proto19["m_useAlias"] = "0";
  587. $obj = new SQLLogicalExpr($proto19);
  588. $proto17["m_joinon"] = $obj;
  589. $obj = new SQLFromListItem($proto17);
  590. $proto0["m_fromlist"][]=$obj;
  591. $proto21=array();
  592. $proto21["m_link"] = "SQLL_INNERJOIN";
  593. $proto22=array();
  594. $proto22["m_strName"] = "tblleavetype";
  595. $proto22["m_columns"] = array();
  596. $proto22["m_columns"][] = "leavetypeid";
  597. $proto22["m_columns"][] = "description";
  598. $obj = new SQLTable($proto22);
  599. $proto21["m_table"] = $obj;
  600. $proto21["m_alias"] = "";
  601. $proto23=array();
  602. $proto23["m_sql"] = "tblleaveplan.leavetypeid = tblleavetype.leavetypeid";
  603. $proto23["m_uniontype"] = "SQLL_UNKNOWN";
  604. $obj = new SQLField(array(
  605. "m_strName" => "leavetypeid",
  606. "m_strTable" => "tblleaveplan"
  607. ));
  608. $proto23["m_column"]=$obj;
  609. $proto23["m_contained"] = array();
  610. $proto23["m_strCase"] = "= tblleavetype.leavetypeid";
  611. $proto23["m_havingmode"] = "0";
  612. $proto23["m_inBrackets"] = "0";
  613. $proto23["m_useAlias"] = "0";
  614. $obj = new SQLLogicalExpr($proto23);
  615. $proto21["m_joinon"] = $obj;
  616. $obj = new SQLFromListItem($proto21);
  617. $proto0["m_fromlist"][]=$obj;
  618. $proto25=array();
  619. $proto25["m_link"] = "SQLL_INNERJOIN";
  620. $proto26=array();
  621. $proto26["m_strName"] = "tblcountries";
  622. $proto26["m_columns"] = array();
  623. $proto26["m_columns"][] = "countryid";
  624. $proto26["m_columns"][] = "countryname";
  625. $obj = new SQLTable($proto26);
  626. $proto25["m_table"] = $obj;
  627. $proto25["m_alias"] = "";
  628. $proto27=array();
  629. $proto27["m_sql"] = "tblleaveplan.nationality = tblcountries.countryid";
  630. $proto27["m_uniontype"] = "SQLL_UNKNOWN";
  631. $obj = new SQLField(array(
  632. "m_strName" => "nationality",
  633. "m_strTable" => "tblleaveplan"
  634. ));
  635. $proto27["m_column"]=$obj;
  636. $proto27["m_contained"] = array();
  637. $proto27["m_strCase"] = "= tblcountries.countryid";
  638. $proto27["m_havingmode"] = "0";
  639. $proto27["m_inBrackets"] = "0";
  640. $proto27["m_useAlias"] = "0";
  641. $obj = new SQLLogicalExpr($proto27);
  642. $proto25["m_joinon"] = $obj;
  643. $obj = new SQLFromListItem($proto25);
  644. $proto0["m_fromlist"][]=$obj;
  645. $proto0["m_groupby"] = array();
  646. $proto0["m_orderby"] = array();
  647. $obj = new SQLQuery($proto0);
  648. return $obj;
  649. }
  650. $queryData_leave_planreport = createSqlQuery_leave_planreport();
  651. $tdataleave_planreport[".sqlquery"] = $queryData_leave_planreport;
  652. $tableEvents["leave_planreport"] = new eventsBase;
  653. $tdataleave_planreport[".hasEvents"] = false;
  654. ?>