Odyssey
hcuHistory.prg
1 <?php
2  /*
3  * File: hcuHistory.prg
4  *
5  * Purpose: This script will show the history for an individual account.
6  *
7  * Created by MWS
8  *
9  */
10 
11  // ** SET SCRIPT LEVEL VARIABLES
12  $serviceShowInfo = true;
13  $serviceLoadMenu = true;
14  $serviceShowMenu = true;
15  $serviceLiveCheck = true;
16 
17  // ** INCLUDE MAIN GLOBAL SCRIPT -- Handles security / global variable values
18  require_once(dirname(__FILE__) . '/../library/hcuService.i');
19 
20  /*
21  * ** CHECK USER FEATURE PERMISSIONS **
22  * NOTE: DOES NOT RETURN ON FAILURE
23  */
24  PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_BASIC);
25 
26 
27  // ** INSERT BUSINESS LOGIC FOR THIS FORM
28  $string= array("filter" => FILTER_SANITIZE_STRING);
29  $dms_ok = array('cu'=>$string, 'a'=>$string);
30  HCU_ImportVars($HB_ENV, 'HCUPOST', $dms_ok);
31 
32 
33  // ** SET VARIABLES FOR WEBSITE FLAGS
34  // acctTypes - this value will be used later to rotate through the different account
35  // types to show a drop down of options to the member
36  $acctTypes = Array("dp", "ln", "cc");
37  $acctRowId = HCU_array_key_exists("a", $HB_ENV['HCUPOST']) ?
38  hcu_decrypturl($HB_ENV['HCUPOST']['a'], $HB_ENV['historyHash']) :
39  "";
40 
41  /*
42  * curAcctInfo
43  * This should be the array of information for the CURRENTLY viewed account.
44  * It is set after Get_Balances when data is obtained for the accountlist
45  */
46  $curAcctInfo = Array();
47 
48 
49  $contentTitle = "";
50  // ** INCLUDE PRE CONTENT SCRIPT
51  require_once(dirname(__FILE__) . '/../includes/hcuPreContent.i');
52 
53  // get the list of download formats
54  $Fset = $HB_ENV["Fset"];
55  $Fset3 = $HB_ENV["Fset3"];
56  $formatListAry = array();
57 
58  // start with a message for downloading
59  $formatListAry[] = array( "text" => $MC->msg('Download', HCU_DISPLAY_AS_RAW), "value" => "" );
60 
61  if (($Fset & GetFlagsetValue("CU_MNYDOWN")) == GetFlagsetValue("CU_MNYDOWN") ) {
62  $formatListAry[] = array( "text" => $MC->msg('Money Active Statement', HCU_DISPLAY_AS_RAW), "value" => "mny" );
63  }
64  if (($Fset & GetFlagsetValue("CU_QKNDOWN")) != 0 ) {
65  $formatListAry[] = array( "text" => $MC->msg('Quicken WebConnect', HCU_DISPLAY_AS_RAW), "value" => "qkn" );
66  }
67  if (($Fset3 & GetFlagsetValue("CU3_QBDOWN")) != 0 ) {
68  $formatListAry[] = array( "text" => $MC->msg('QuickBooks WebConnect', HCU_DISPLAY_AS_RAW), "value" => "qb", "type" => "dp" );
69  }
70  if (($Fset & GetFlagsetValue("CU_QIFDOWN")) == GetFlagsetValue("CU_QIFDOWN") ) {
71  $formatListAry[] = array( "text" => $MC->msg('QIF File', HCU_DISPLAY_AS_RAW), "value" => "qif" );
72  }
73 
74  // everyone gets CSV
75  $formatListAry[] = array( "text" => $MC->msg('CSV File', HCU_DISPLAY_AS_RAW), "value" => "csv" );
76 
77  // get the balances now because need to use the deposit type for determining if searching on check number
78  $Get_Balances_ary = Get_Balances($dbh, $HB_ENV);
79 
80  /*
81  * Determine the Pending transactions for the CURRENT account
82  */
83  $pendingItemsData = Array();
84 
85  // gather all the account info now
86  $acctListAry = Array();
87 
88  if ($Get_Balances_ary['status']['code'] == '000') {
89  foreach ($acctTypes as $acctType) {
90  if (HCU_array_key_exists($acctType, $Get_Balances_ary)) {
91  //if (!is_null($Get_Balances_ary[$acctType])){
92  // ** The Member has accounts of this type.
93  // SO we start/end the table
94  if (is_array($Get_Balances_ary[$acctType]) === true) {
95  // ** There are accounts of this type
96  foreach ($Get_Balances_ary[$acctType] as $acctID => $acctRow) {
97  if (HCU_array_key_value('view_balances', $acctRow) && HCU_array_key_value('view_transactions', $acctRow)) {
98  // if didn't come into this script with a row selected, then set up the first one
99  if ( $acctRowId === "" ) {
100  $acctRowId = $acctID;
101  }
102 
103  // * There are some possibilties that have not been covered yet.
104  // * If there is a hisinfo field set, then history is NOT available from this
105  // * screen, so it is NOT included in this drop down
106  $hasHistory = HCU_array_key_exists("hisinfo", $acctRow);
107  if (!$hasHistory || $acctRow['hisinfo'] == '' || $acctRow['hisinfo'] == 'HomeCU') {
108 
109  // CHECK IF ACCOUNT HAS CUSTOMIZED NAME
110  if (strlen($acctRow['displayname']) > 0) {
111  $acctListAry[] = Array("acctValue" => hcu_encrypturl($acctID, $HB_ENV['historyHash']), "acctText" => $acctRow['displayname']);
112  } else {
113  $acctListAry[] = Array("acctValue" => hcu_encrypturl($acctID, $HB_ENV['historyHash']), "acctText" => $acctRow['displaydesc']);
114  }
115 
116  }
117  if ($acctID == $acctRowId) {
118  $curAcctInfo = $acctRow;
119  $curAcctInfo['acctId'] = $acctID;
120  }
121 
122  }
123 
124  }
125  }
126  }
127  }
128  }
129 
130  $getHPRHistoryAry = Get_AccountHPRDetails($dbh, $HB_ENV, $MC, $acctRowId);
131 
132  if (count($getHPRHistoryAry['holds']) > 0 || count($getHPRHistoryAry['pending']) > 0 || count($getHPRHistoryAry['requests']) > 0 ) {
133  foreach($getHPRHistoryAry as $pendType => $pendItems) {
134  if (count($pendItems) > 0) {
135  foreach ($pendItems as $pendDetail) {
136  if ($pendType == "holds") {
137  $listDate = $pendDetail['postdate'];
138  } else {
139  $listDate = "Pending";
140  }
141  $pendingItemsData[] = Array("pendDate" => $listDate, "pendDesc" => hcu_displayHtml($pendDetail['description']), "pendAmt" => $pendDetail['amount']);
142 
143  }
144  }
145  }
146  }
147 
148  // if no account passed in, fake it so can get data if coming from a menu click
149  if ( !isset( $HB_ENV['HCUPOST']["a"]) || strlen( $HB_ENV['HCUPOST']["a"] ) == "" ) {
150  $HB_ENV['HCUPOST']["a"] = hcu_encrypturl($acctRowId, $HB_ENV['historyHash']);
151  }
152 
153  /*
154  * Determine the account type -- This will be the FIRST segment from the hash
155  *
156  */
157  $acctRow_ary = explode('|', $acctRowId);
158  $acctDispType = $acctRow_ary[0];
159 
160  // see if this Deposit account uses check numbers
161  if ( $acctDispType == "D" ) {
162  // build the account id
163  $accountId = "{$acctRow_ary[0]}|{$acctRow_ary[1]}|{$acctRow_ary[2]}|{$acctRow_ary[3]}";
164  $hasCheckNumbers = strtoupper($Get_Balances_ary["dp"][$accountId]["deposittype"]) == "Y";
165  } else {
166  $hasCheckNumbers = false;
167  }
168 
169 ?>
170  <script src='../static/js/homecu.printgrid.js'></script>
171 
172  <div id="acctHistory" class="k-content container-fluid" style="font-size: 12px;">
173  <div id="chkImage"></div>
174  <script>
175 
176  var hcuPendDs = <?php
177  print HCU_JsonEncode($pendingItemsData);
178  ?>;
179 
180  var acctListAry = <?php
181  // * Fetch the account list and create a json string to represent the list.
182  // * At this time, All I have is a function to return balances, but it does a lot of extra work that is not needed for my purpose.
183  // * I am thinking I will need a dumb downed function in the future 6/19/2013
184 
185  print HCU_JsonEncode($acctListAry);
186  ?>;
187 
188  var formatListAry = <?php echo HCU_JsonEncode( $formatListAry ) ?>;
189 
190  // declare this here because of scoping issues
191  var openWindow = [];
192 
193  $(document).ready(function() {
194 
195  // Enhance accessibility: allow form to submit when enter key is pressed when focused in fields.
196  $('#search-transactions').on('keydown', 'input', function(e) {
197  if (e.keyCode === 13) {
198  submitSearch();
199  }
200  });
201 
202  // For the above to work we need a real form.
203  // Disable submit on it so it doesn't break existing functionality.
204  $('#search-transactions').on('submit', function(e) {
205  return false;
206  });
207 
208  // Allow the enter key to actually open the advanced options when you focus on the up/down arrow.
209  $('#searchOptionsAdvancedLabel span').on('keydown', function(e) {
210  if (e.keyCode === 13) {
211  toggleSearchOptionsAdvanced();
212  }
213  });
214 
215  $('#histDateRange').kendoDropDownList({change: selectDateRange});
216  $('#histStartDate').kendoDatePicker({format: "MM/dd/yyyy", change: selectCustomRange});
217  $('#histEndDate').kendoDatePicker({format: "MM/dd/yyyy", change: selectCustomRange});
218 
219  //var dateRangeList = $("#histDateRange").data("kendoDropDownList");
220 
221  // default to 30 days back, three days forward
222  var now = new Date();
223  var endDate = new Date( now.getTime() + 3 * 24 * 3600 * 1000 );
224  var startDate = new Date( now.getTime() - 30 * 24 * 3600 * 1000 ); //
225 
226  $('#histStartDate').data('kendoDatePicker').value(kendo.toString(new Date(startDate), 'MM/dd/yyyy'));
227  $('#histEndDate').data('kendoDatePicker').value(kendo.toString(new Date(endDate), 'MM/dd/yyyy'));
228 
229  // 07-19: Some devices are adding /favicon.ico to url's, breaking DB lookups. Add
230  // ampersand wherever we set 'a' so params after 'a' value are ignored.
231  var dsAcctHistory = new kendo.data.DataSource({
232  transport: {
233  read: {
234  url: 'hcuHistory.data?cu=<?php echo $HB_ENV['cu']; ?>&a=<?php echo $HB_ENV['HCUPOST']['a'] . '&'; ?>',
235  contentType: 'application/x-www-form-urlencoded',
236  type: 'POST',
237  data: function() {
238  return {
239  r1: $('#histStartDate').val(),
240  r2: $('#histEndDate').val(),
241  searchAmt: $("#searchAmt").val(),
242  searchDesc: $("#searchDesc").val(),
243  searchCheckNum: $("#searchCheckNum").val()
244  };
245  },
246  pageable: true,
247  cache: false
248  }
249  },
250  requestStart: function(request) {
251  ShowWaitWindow();
252  },
253  requestEnd: function(response) {
254  setTimeout(function(e) {
255  CloseWaitWindow();
256  }, 500);
257  },
258  schema: {
259  data: "items",
260  total: 'itemcount',
261  model: {
262  fields: {
263  accounttype : {type: "string"},
264  certnumber : {type: "string"},
265  amount : {type: "number"},
266  balance : {type: "number"},
267  date : {
268  type: "string"
269  },
270  checkno : {type: "string"},
271  description : {type: "string"},
272  traceno: {type: "string"},
273  escrow : {type: "number"},
274  fee : {type: "number"},
275  principal : {type: "number"},
276  interest : {type: "number"},
277  totalpay : {type: "number"}
278  }
279  }
280  },
281  pageSize: 20,
282  serverPaging: false,
283  serverFiltering: false,
284  serverSorting: false
285 
286  });
287 
288  dsAcctHistory.read();
289  $("#hcuMobileLedger").kendoGrid({
290  autoBind: false,
291  dataSource: dsAcctHistory,
292  filterable: false,
293  pageable: {
294  pageSizes: [20, 40, 60],
295  info: true,
296  refresh: true,
297  messages: {
298  display: "<?php echo $MC->msg('History footer formatted', HCU_DISPLAY_AS_JS); ?>",
299  refresh: "<?php echo $MC->msg('Refresh', HCU_DISPLAY_AS_JS); ?>",
300  itemsPerPage: "<?php echo $MC->msg('items per page', HCU_DISPLAY_AS_JS); ?>"
301  }
302  },
303  columns: [
304  {
305  field: "date",
306  title: "<?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?>",
307  format:"{0:MM/dd/yyyy}",
308  sortable: {
309  compare: function(a, b) {
310  return a.datesort - b.datesort;
311  }
312  },
313  filterable: false,
314  width: "80px"
315  },
316  {
317  field: "description",
318  title: "<?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?>",
319  filterable: true
320  },
321  {
322  field: "amount",
323  format: "{0:c}",
324  title: "<?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?>",
325  width: "100px",
326  attributes: {
327  style: "text-align: right;"
328  },
329  filterable: true,
330  template: function( dataItem ) {
331  var columnValue = "";
332 
333  <?php if ($acctDispType == 'L' ||
334  $acctDispType == 'C' ): ?>
335 
336  var totalPayClass = dataItem.totalpay < 0 ? 'currency_negative' : 'currency_positive';
337  var balanceClass = dataItem.balance < 0 ? 'currency_negative' : 'currency_positive';
338 
339  columnValue += "<div style='font-weight:bold;' class='" + totalPayClass + "'>" + kendo.toString(dataItem.totalpay, "c") + "</div>";
340  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_LNBALUNUSABLE")) != GetFlagsetValue("CU_LNBALUNUSABLE")): ?>
341  columnValue += "<div style='font-weight:300;' class='" + balanceClass + "'>" + kendo.toString(dataItem.balance, "c") + "</div>";
342  <?php endif; ?>
343 
344  <?php else: ?>
345 
346  var amountClass = dataItem.amount < 0 ? 'currency_negative' : 'currency_positive';
347  var balanceClass = dataItem.balance < 0 ? 'currency_negative' : 'currency_positive';
348 
349  columnValue += "<div style='font-weight:bold;' class='" + amountClass + "'>" + kendo.toString(dataItem.amount, "c") + "</div>";
350  columnValue += "<div style='font-weight:300; font-style:italic;' class='" + balanceClass + "'>" + kendo.toString(dataItem.balance, "c") + "</div>";
351  <?php endif; ?>
352 
353  return columnValue;
354  }
355  }
356  ],
357  <?php if (HCU_array_key_value('out_of_sync', $curAcctInfo)): ?>
358  toolbar: kendo.template($('#pending-toolbar-template').html()),
359  <?php endif; ?>
360  noRecords: {template: "<?php echo $MC->msg('No Records Found', HCU_DISPLAY_AS_JS); ?>"},
361  selectable: "row",
362  change: onMobileRowSelect
363  });
364 
365  $('#hcuAcctLedger').kendoGrid({
366  autoBind: false,
367  dataSource: dsAcctHistory,
368  sortable: true,
369  selectable: "cell",
370  pageable: {
371  pageSizes: [20, 40, 60],
372  info: true,
373  refresh: true,
374  messages: {
375  display: "<?php echo $MC->msg('History footer formatted', HCU_DISPLAY_AS_JS); ?>",
376  refresh: "<?php echo $MC->msg('Refresh', HCU_DISPLAY_AS_JS); ?>",
377  itemsPerPage: "<?php echo $MC->msg('items per page', HCU_DISPLAY_AS_JS); ?>"
378  }
379  },
380  toolbar: kendo.template($('#toolbar-template').html()),
381  <?php if ($acctDispType == 'L'): ?>
382  columns: [
383  {
384  field: "date",
385  title: "<?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?>",
386  format:"{0:MM/dd/yyyy}",
387  sortable: {
388  compare: function(a, b) {
389  return a.datesort - b.datesort;
390  }
391  },
392  width: "80px",
393  attributes: {
394  tabindex: "0"
395  }
396  },
397  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNDESC")) == GetFlagsetValue("CU_SHOWLNTXNDESC")): ?>
398  {
399  field: "description",
400  title: "<?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?>",
401  attributes: {
402  tabindex: "0"
403  }
404  },
405  <?php endif; ?>
406  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNSPLIT")) == GetFlagsetValue("CU_SHOWLNTXNSPLIT")): ?>
407  {
408  field: "principal",
409  template: function(e) {
410  if (e.principal < 0) {
411  return "<span class='currency_negative'>" + kendo.toString(e.principal, 'c') + "</span>";
412  } else {
413  return "<span class='currency_positive'>" + kendo.toString(e.principal, 'c') + "</span>";
414  }
415  },
416  format: "{0:c}",
417  title: "<?php echo $MC->msg('Principal', HCU_DISPLAY_AS_JS); ?>",
418  width: "80px",
419  attributes: {
420  style: "text-align: right;",
421  tabindex: "0"
422  }
423  },
424  {
425  field: "interest",
426  format: "{0:c}",
427  title: "<?php echo ($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_FEE")) == GetFlagsetValue("CU2_SHOW_LN_FEE") ? $MC->msg('Interest', HCU_DISPLAY_AS_JS) : $MC->msg('IntFee', HCU_DISPLAY_AS_JS); ?>",
428  width: "80px",
429  attributes: {
430  style: "text-align: right;",
431  tabindex: "0"
432  }
433  },
434  <?php endif; ?>
435  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_ESCHEMA")) == GetFlagsetValue("CU2_ESCHEMA")): ?>
436  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_FEE")) == GetFlagsetValue("CU2_SHOW_LN_FEE")): ?>
437  {
438  field: "fee",
439  format: "{0:c}",
440  title: "<?php echo $MC->msg('Fee', HCU_DISPLAY_AS_JS); ?>",
441  width: "80px",
442  attributes: {
443  style: "text-align: right;",
444  tabindex: "0"
445  }
446  },
447  <?php endif; ?>
448  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_ESCROW")) == GetFlagsetValue("CU2_SHOW_LN_ESCROW")): ?>
449  {
450  field: "escrow",
451  format: "{0:c}",
452  title: "<?php echo $MC->msg('Escrow', HCU_DISPLAY_AS_JS); ?>",
453  width: "80px",
454  attributes: {
455  style: "text-align: right;",
456  tabindex: "0"
457  }
458  },
459  <?php endif; ?>
460  <?php endif; ?>
461  {
462  field: "totalpay",
463  template: function(e) {
464  if (e.totalpay < 0) {
465  return "<span class='currency_negative'>" + kendo.toString(e.totalpay, 'c') + "</span>";
466  } else {
467  return "<span class='currency_positive'>" + kendo.toString(e.totalpay, 'c') + "</span>";
468  }
469  },
470  title: "<?php echo ($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNSPLIT")) == GetFlagsetValue("CU_SHOWLNTXNSPLIT") ? $MC->msg('Amount', HCU_DISPLAY_AS_JS) : $MC->msg('Payment', HCU_DISPLAY_AS_JS); ?>",
471  width: "100px",
472  attributes: {
473  style: "text-align: right;",
474  tabindex: "0"
475  },
476  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_LNBALUNUSABLE")) != GetFlagsetValue("CU_LNBALUNUSABLE")): ?>
477  },
478  {
479  field: "balance",
480  template: function(e) {
481  if (e.balance < 0) {
482  return "<span class='currency_negative'>" + kendo.toString(e.balance, 'c') + "</span>";
483  } else {
484  return "<span class='currency_positive'>" + kendo.toString(e.balance, 'c') + "</span>";
485  }
486  },
487  title: "<?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?>",
488  width: "100px",
489  attributes: {
490  style: "text-align: right;",
491  tabindex: "0"
492  },
493  <?php endif; ?>
494  }
495  ],
496  <?php elseif ($acctDispType == 'C'): ?>
497  columns: [
498  {
499  field: "date",
500  title: "<?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?>",
501  format:"{0:MM/dd/yyyy}",
502  sortable: {
503  compare: function(a, b) {
504  return a.datesort - b.datesort;
505  }
506  },
507  width: "80px",
508  attributes: {
509  tabindex: "0"
510  },
511  },
512  {
513  field: "description",
514  title: "<?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?>",
515  filterable: true
516  },
517  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_ESCHEMA")) == GetFlagsetValue("CU2_ESCHEMA")): ?>
518  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_FEE")) == GetFlagsetValue("CU2_SHOW_LN_FEE")): ?>
519  {
520  field: "fee",
521  format: "{0:c}",
522  title: "<?php echo $MC->msg('Fee', HCU_DISPLAY_AS_JS); ?>",
523  width: "80px",
524  attributes: {
525  style: "text-align: right;",
526  tabindex: "0"
527  }
528  },
529  <?php endif; ?>
530  <?php endif; ?>
531  {
532  field: "totalpay",
533  template: function(e) {
534  if (e.totalpay < 0) {
535  return "<span class='currency_negative'>" + kendo.toString(e.totalpay, 'c') + "</span>";
536  } else {
537  return "<span class='currency_positive'>" + kendo.toString(e.totalpay, 'c') + "</span>";
538  }
539  },
540  title: "<?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?>",
541  width: "100px",
542  attributes: {
543  style: "text-align: right;",
544  tabindex: "0"
545  }
546  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_LNBALUNUSABLE")) != GetFlagsetValue("CU_LNBALUNUSABLE")): ?>
547  },
548  {
549  field: "balance",
550  title: "<?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?>",
551  template: function(e) {
552  if (e.balance < 0) {
553  return "<span class='currency_negative'>" + kendo.toString(e.balance, 'c') + "</span>";
554  } else {
555  return "<span class='currency_positive'>" + kendo.toString(e.balance, 'c') + "</span>";
556  }
557  },
558  width: "100px",
559  attributes: {
560  style: "text-align: right;",
561  tabindex: "0"
562  }
563  <?php endif; ?>
564  }
565  ],
566  <?php else: ?>
567  columns: [
568  {
569  field: "date",
570  title: "<?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?>",
571  format:"{0:MM/dd/yyyy}",
572  sortable: {
573  compare: function(a, b) {
574  return a.datesort - b.datesort;
575  }
576  },
577  width: "80px",
578  attributes: {
579  tabindex: "0"
580  }
581  },
582  <?php if ($curAcctInfo['deposittype'] == 'Y'): ?>
583  {
584  field: "checkno",
585  title: "<?php echo $MC->msg('Check Number', HCU_DISPLAY_AS_JS); ?>",
586  width: "100px",
587  template: function( dataItem ) {
588  var columnValue = "";
589  if ( dataItem.checkno && dataItem.checkno !== "0" && dataItem.checkno.length > 0 )
590  <?php if (($Fset & GetFlagsetValue("CU_SHOWIMAGES")) > 0): ?>
591  columnValue = dataItem.checkno + " <span class='fa fa-eye'></span>";
592  <?php else: ?>
593  columnValue = dataItem.checkno;
594  <?php endif; ?>
595  return columnValue;
596  }
597 
598  },
599  <?php endif; ?>
600  {
601  field: "description",
602  title: "<?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?>",
603  attributes: {
604  tabindex: "0"
605  }
606  },
607  {
608  field: "amount",
609  title: "<?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?>",
610  template: function(e) {
611  if (e.amount < 0) {
612  return "<span class='currency_negative'>" + kendo.toString(e.amount, 'c') + "</span>";
613  } else {
614  return "<span class='currency_positive'>" + kendo.toString(e.amount, 'c') + "</span>";
615  }
616  },
617  width: "100px",
618  headerAttributes: {
619  style: "text-align: right;"
620  },
621  attributes: {
622  style: "text-align: right;",
623  tabindex: "0"
624  }
625  },
626  {
627  field: "balance",
628  title: "<?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?>",
629  template: function(e) {
630  if (e.balance < 0) {
631  return "<span class='currency_negative'>" + kendo.toString(e.balance, 'c') + "</span>";
632  } else {
633  return "<span class='currency_positive'>" + kendo.toString(e.balance, 'c') + "</span>";
634  }
635  },
636  width: "100px",
637  headerAttributes: {
638  style: "text-align: right;"
639  },
640  attributes: {
641  style: "text-align: right;",
642  tabindex: "0"
643  }
644  }
645  ],
646  <?php endif; ?>
647  change: onCheckSelect,
648  dataBound: function () {
649  <?php if (HCU_array_key_exists("deposittype", $curAcctInfo) && $curAcctInfo['deposittype'] == 'Y'): ?>
650  $("#hcuAcctLedger table tbody tr td").hover(
651  function(e) {
652  if ( e.type == "mouseenter" ) {
653  var target = e.target;
654  if ( target.cellIndex == 1 &&
655  target.innerHTML.length > 0 ) {
656  <?php if (($Fset & GetFlagsetValue("CU_SHOWIMAGES")) > 0): ?>
657  $(this).addClass("k-state-hover");
658  <?php endif; ?>
659  }
660  } else {
661  var selectedItems = $('td.k-state-hover');
662 
663  // always remove the selected class
664  for (var i = 0; i < selectedItems.length; i++) {
665  $(selectedItems[i]).removeClass("k-state-hover");
666  }
667  }
668  }
669  )
670  <?php endif; ?>
671  }
672  });
673 
674  $('#printGrid').kendoButton({
675  imageUrl: 'https://<?php echo $HB_ENV['cloudfrontDomainName']; ?>/homecu/images/printer.png'
676  });
677 
678  $('#hcuTablePending').kendoGrid({
679  dataSource: {
680  data: hcuPendDs,
681  pageable: false,
682  schema: {
683  model: {
684  fields: {
685  pendDate: {
686  type: "string"
687  },
688  pendDesc: {
689  type: "string"
690  },
691  pendAmt: {
692  type: "number"
693  }
694  }
695  }
696  },
697  aggregate: [
698  {field: "pendDesc", aggregate: "count"},
699  {field: "pendAmt", aggregate: "sum"}
700  ]
701  },
702  autoBind: true,
703  sortable: false,
704  scrollable: false,
705  <?php if (HCU_array_key_value('out_of_sync', $curAcctInfo)): ?>
706  toolbar: kendo.template($('#pending-toolbar-template').html()),
707  <?php endif; ?>
708  columns: [
709  {
710  field: "pendDate",
711  title: "<?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?>",
712  width: "80px",
713  hidden: false,
714  attributes: {
715  tabindex: "0"
716  },
717  },
718  {
719  field: "pendDesc",
720  title: "<?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?>",
721  hidden: false,
722  attributes: {
723  tabindex: "0"
724  },
725  footerTemplate: " #= (count == 1 ? '' : kendo.toString(count, '0') + ' <?php echo $MC->msg('Pending Transactions', HCU_DISPLAY_AS_JS); ?>' ) # "
726  },
727  {
728  field: "pendAmt",
729  title: "<?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?>",
730  hidden: false,
731  format: "{0:c}",
732  template: function(e) {
733  if (e.pendAmt < 0) {
734  return "<span class='currency_negative'>" + kendo.toString(e.pendAmt, 'c') + "</span>";
735  } else {
736  return "<span class='currency_positive'>" + kendo.toString(e.pendAmt, 'c') + "</span>";
737  }
738  },
739  width: "100px",
740  attributes: {
741  style: "text-align: right;",
742  tabindex: "0"
743  },
744  headerAttributes: {
745  style: "text-align: right"
746  },
747  footerTemplate: "<div style='text-align:right;' class='#=sum<0 ? 'currency_negative' : 'currency_positive' #'>#= (isNaN(sum) ? '' : (kendo.toString(sum, 'c'))) #</div>"
748  }
749  ]
750  });
751 
752  $('#printGrid').click(function () {
753  printGrid('hcuAcctLedger', $('#acctTitle').text(), '', '<?php echo $HB_ENV['cloudfrontDomainName']; ?>', '<?php echo $HB_ENV['homecuKendoVersion']; ?>');
754  });
755 
756  // create DropDownList from input HTML element
757  $("#acctList").kendoDropDownList({
758  dataTextField: "acctText",
759  dataValueField: "acctValue",
760  dataSource: acctListAry,
761  change: changeAccount,
762  valueTemplate: "#= acctText #", <?php // No encoding ?>
763  template: "#= acctText #"
764  });
765 
766  $("#searchBtn").hide();
767  $("#searchBtn").on("click", submitSearch);
768 
769  $("#searchOptionsAdvanced").hide();
770  $("#searchOptionsAdvancedLabel").on("click", function(e) {
771  var searchOptionsVisible = $("#searchOptionsAdvanced").is(":visible");
772  var searchOptionsChevron = $("#searchOptionsAdvancedLabel").find("span")[1];
773 
774  if (searchOptionsVisible) {
775  $("#searchOptionsAdvanced").hide();
776  $(searchOptionsChevron).removeClass("fa-chevron-up");
777  $(searchOptionsChevron).addClass("fa-chevron-down");
778 
779  // hide/show search button
780  $("#histDateRange").data("kendoDropDownList").value() == "" ?
781  $("#searchBtn").show() :
782  $("#searchBtn").hide();
783 
784  // clear search fields
785  $("#searchAmt").val("");
786  $("#searchDesc").val("");
787  $("#searchCheckNum").val("");
788 
789  // call search so user doesn't have to select another range
790  // then go back to the one theey were on. basically
791  // reset the search results from the advanced options.
792  submitSearch();
793  } else {
794  $("#searchOptionsAdvanced").show();
795  $(searchOptionsChevron).removeClass("fa-chevron-down");
796  $(searchOptionsChevron).addClass("fa-chevron-up");
797 
798  // show search button
799  $("#searchBtn").show();
800  }
801  });
802 
803  function selectDateRange(e) {
804  // set date fields to reflect range selection
805  var value = this.value();
806 
807  if (value == "") {
808  $("#searchBtn").show();
809  } else {
810  $("#searchOptionsAdvanced").is(":visible") ?
811  $("#searchBtn").show() :
812  $("#searchBtn").hide();
813 
814  // set date range here
815  var end = new Date();
816  var start = new Date(end.getTime() - parseInt(value) * 24 * 3600 * 1000);
817  $('#histEndDate').data('kendoDatePicker').value(end);
818  $('#histStartDate').data('kendoDatePicker').value(start);
819 
820  submitSearch();
821  }
822  }
823 
824  function selectCustomRange(e) {
825  $("#histDateRange").data("kendoDropDownList").value("");
826  $("#searchBtn").show();
827  }
828 
829  function submitSearch(e) {
830  dsAcctHistory.read();
831  dsAcctHistory.page(0);
832  }
833 
834  function changeAccount() {
835  var dropdownlist = $("#acctList").data("kendoDropDownList");
836 
837  // get the dataItem corresponding to the selectedIndex.
838  var dataItem = dropdownlist.dataItem();
839  var selAcct = dataItem.acctValue;
840  var histHref = "<?php echo "{$HB_ENV['loginpath']}/hcuHistory.prg?{$HB_ENV['cuquery']}&a="?>" + selAcct;
841 
842  // 07-19: Some devices are adding /favicon.ico to url's, breaking DB lookups. Add
843  // ampersand wherever we set 'a' so params after 'a' value are ignored.
844  histHref += '&';
845  ;
846  window.document.location = histHref;
847  };
848 
849  function onCheckSelect(arg) {
850  var cells = this.select();
851 
852  var selectedItems = $('tr.k-state-selected');
853 
854  // always remove the selected class from the row
855  for (var i = 0; i < selectedItems.length; i++) {
856  $(selectedItems[i]).removeClass("k-state-selected");
857  }
858 
859  // only handle the check number column
860  var cellIndex = cells[0].cellIndex;
861  if ( cellIndex === 1 ) {
862  // point to the data for the row
863  var dataItem = this.dataItem(cells[0].parentNode);
864 
865  if ( dataItem.ckitem && dataItem.ckitem.length > 0 &&
866  dataItem.ckhash && dataItem.ckhash.length > 0 )
867  createWindow(dataItem.ckitem, dataItem.ckhash);
868  }
869  }
870 
871  // keep "global" so can reference elsewhere
872  var wnd;
873  var detailTemplate = kendo.template($("#templateDetail").html());
874 
875  function onMobileRowSelect( arg ) {
876  var displayInfo = arg;
877  var dTemplate;
878 
879  var grid = $("#hcuMobileLedger").data("kendoGrid");
880  var selectedItem = grid.dataItem(grid.select());
881 
882  var selectedItems = $('tr.k-state-selected');
883 
884  // always remove the selected class (for looks)
885  for (var i = 0; i < selectedItems.length; i++) {
886  $(selectedItems[i]).removeClass("k-state-selected");
887  }
888 
889 
890  wnd = $('#detailWindow').kendoWindow({
891  modal: true,
892  iframe: false,
893  visible: false,
894  width:"85%",
895  maxWidth:700,
896  title: "<?php echo $MC->msg('Details', HCU_DISPLAY_AS_JS); ?>",
897  activate: function(e) {
898  var latestWindow = $("#detailWindow").data("kendoWindow");
899  openWindow.push( latestWindow );
900  },
901  close: function(e) {
902  // just remove the latest
903  openWindow.pop();
904  }
905  }).data('kendoWindow');
906 
907 
908 
909  wnd.content( detailTemplate( selectedItem ) );
910 
911  wnd.center().open().toFront();
912  }
913 
914  // this holds a pointer to info related to the check view window
915  var printButton;
916 
917  <?php if (count($pendingItemsData) == 0): ?>
918  $('#divPendTrans').hide();
919  <?php endif; ?>
920 
921  // create DropDownList from input HTML element
922  $("#downloadList").kendoDropDownList({
923  dataTextField: "text",
924  dataValueField: "value",
925  dataSource: formatListAry,
926  change: startDownload
927  });
928  $('#acctTitle').html($('#acctList').data('kendoDropDownList').text());
929 
930  // window for account details
931  var detailsWindow = $("#details-container"),
932  detailsButton = $("#detailsButton");
933 
934  detailsButton.click(function() {
935  detailsWindow.data("kendoWindow").center().open();
936  });
937 
938  detailsWindow.kendoWindow({
939  width: "85%",
940  title: "<?php echo $MC->msg('Details', HCU_DISPLAY_AS_JS); ?>",
941  visible: false,
942  modal: true,
943  maxWidth: 700,
944  actions: [
945  "Close"
946  ],
947  activate: function(e) {
948  var latestWindow = $("#details-container").data("kendoWindow");
949  openWindow.push( latestWindow );
950  },
951  close: function(e) {
952  // just remove the latest
953  openWindow.pop();
954  }
955  }).data("kendoWindow");
956 
957 
958  // show the page stuff
959  $(".initiallyHide").show();
960 
961  $(document).on("click", ".k-overlay", function () {
962  // close the currently open window
963  if ( openWindow.length > 0 ) {
964  openWindow[openWindow.length-1].close();
965  }
966  });
967 
968  });
969 
970  function createWindow(item, hash) {
971  $('#checkWindow').kendoWindow({
972  visible: false,
973  actions: [ "Print", "Close" ],
974  iframe: true,
975  modal: true,
976  title: "<?php echo $MC->msg("View Check Image", HCU_DISPLAY_AS_JS) ?>",
977  resizable: true,
978  activate: function(e) {
979  var latestWindow = $("#checkWindow").data("kendoWindow");
980  openWindow.push( latestWindow );
981  },
982  close: function(e) {
983  // just remove the latest
984  // clear on close so reuse opens empty
985  var winobj = openWindow.pop();
986  winobj.content('');
987  winobj.refresh('');
988  },
989  width: 700,
990  height: 650,
991  <?php if (!$serviceViewFromCuAdmin): ?>
992  content: "<?php echo $HB_ENV['homebankingpath'] ?>/ImageSOLO.prg?<?php echo $HB_ENV['cuquery'] ?>&CKITEM=" + item + "&CKHASH=" + hash
993  <?php else: ?>
994  content: "<?php echo $HB_ENV['homebankingpath'] ?>/ImageSOLO.prg?<?php echo $HB_ENV['cuquery'] ?>&adm=1&CKITEM=" + item + "&CKHASH=" + hash
995  <?php endif; ?>
996  });
997  // doing it this way for IE8
998  var dialog = $("#checkWindow").data('kendoWindow');
999  dialog.center().open();
1000 
1001  printButton = dialog.wrapper.find(".k-i-print");
1002  printButton.click(function (e) {
1003  <?php if (!$serviceViewFromCuAdmin): ?>
1004  window.open( "<?php echo $HB_ENV['homebankingpath'] ?>/ImageSOLO.prg?<?php echo $HB_ENV['cuquery'] ?>&CKITEM=" + item + "&CKHASH=" + hash, "print_view" );
1005  <?php else: ?>
1006  window.open( "<?php echo $HB_ENV['homebankingpath'] ?>/ImageSOLO.prg?<?php echo $HB_ENV['cuquery'] ?>&adm=1&CKITEM=" + item + "&CKHASH=" + hash, "print_view" );
1007  <?php endif; ?>
1008  });
1009 
1010  homecuTooltip.reset();
1011  homecuTooltip.custom.content = "<?php echo $MC->msg('View/Print in new window', HCU_DISPLAY_AS_JS); ?>";
1012  printButton.kendoTooltip(homecuTooltip.custom).data("kendoTooltip");
1013  }
1014 
1015  function showCheckImage( ckitem, ckhash ) {
1016  if ( ckitem && ckitem.length > 0 &&
1017  ckhash && ckhash.length > 0 )
1018  createWindow(ckitem, ckhash);
1019  }
1020 
1021  function startDownload(e) {
1022  var value = $("#downloadList").val();
1023 
1024  // VALUE EMPTY SHOULDN'T GO ANYWHERE
1025  if (value) {
1026  // set the download info
1027  document.downloadPost.downfmt.value = value;
1028  document.downloadPost.start.value = $("#histStartDate").val();
1029  document.downloadPost.end.value = $("#histEndDate").val();
1030 
1031  // submit the download request
1032  document.downloadPost.submit();
1033 
1034  // reset
1035  var dropdownlist = $("#downloadList").data("kendoDropDownList");
1036  dropdownlist.value("");
1037  }
1038 
1039 
1040  }
1041 
1042  /**
1043  * Call when the enter key is pressed when focused on the advanced search label or
1044  * arrow key (or click, to centralize the code.) This toggles the div open and closed.
1045  * @return void
1046  */
1047  function toggleSearchOptionsAdvanced()
1048  {
1049  var chevron = $('#search-chevron');
1050 
1051  if ($("#searchOptionsAdvanced").is(":visible")) {
1052  $("#searchOptionsAdvanced").hide();
1053  $(chevron).removeClass('fa-chevron-up').addClass('fa-chevron-down');
1054  return;
1055  }
1056 
1057  $("#searchOptionsAdvanced").show();
1058  $(chevron).removeClass('fa-chevron-down').addClass('fa-chevron-up');
1059  }
1060 
1061  </script>
1062  <style>
1063  .k-i-expand:before {
1064  content: '';
1065  }
1066  .k-i-expand {
1067  background: url('https://<?php echo $HB_ENV['cloudfrontDomainName']; ?>/homecu/images/printer.png');
1068  background-position: 0px 0px;
1069  background-size: contain;
1070  background-repeat: no-repeat;
1071  }
1072  .k-link:not(.k-state-disabled):hover > .k-i-expand,
1073  .k-state-hover .k-i-expand {
1074  background-position: 0px 0px;
1075  }
1076  .k-grid-toolbar {
1077  padding: .2em;
1078  }
1079  #details-container h2
1080  {
1081  margin: 0;
1082  }
1083 
1084  #details-container em
1085  {
1086  color: #8c8c8c;
1087  }
1088 
1089  #details-container dt
1090  {
1091  margin:0;
1092  display: inline;
1093  }
1094  #hcuTabledp .expandFactor {visibility: visible;}
1095  #hcuTabledp .smallFactor {visibility: hidden;}
1096 
1097  .summary-data-notify {
1098  color: red;
1099  }
1100  #divPendTrans {
1101  padding-top:20px;
1102  }
1103 
1104  .initiallyHide {
1105  display:<?php echo SetInitialHideProperty($mobileDetect); ?>
1106  }
1107 
1108  /* Default is extra small (mobile) */
1109  .history-search-label {
1110  text-align:left;
1111  }
1112 
1113  .history-search-control {
1114  text-align:left;
1115  }
1116 
1117  .history-padding {
1118  padding:5px 15px;
1119  }
1120 
1121  .detail-padding {
1122  padding: 0;
1123  margin: 0;
1124  }
1125 
1126  .red-color {
1127  color: #F00;
1128  }
1129  .blue-color {
1130  color: #00F;
1131  }
1132 
1133  /* Small devices @screen-sm-min (tablets, 768px and up) */
1134  @media (min-width: 768px) {
1135  .history-search-label {
1136  text-align:right;
1137  }
1138 
1139  .history-search-control {
1140  text-align:center;
1141  }
1142  }
1143  #hcuTablePending {
1144  max-width: 600px;
1145  }
1146  .local-sync-error {
1147  color: darkorange;
1148  margin: 5px;
1149  font-size: 1.5em;
1150  }
1151 
1152  #summary-info,
1153  #txnDetail {
1154  width: 100%;
1155  display:table;
1156  }
1157 
1158  #summary-info .summary-row:hover,
1159  #txnDetail .summary-row:hover {
1160  background-color: #eaeaea;
1161  }
1162  #summary-info .summary-row,
1163  #txnDetail .summary-row {
1164  display:table-row;
1165  }
1166  #summary-info .summary-desc,
1167  #txnDetail .summary-desc {
1168  font-weight: bold;
1169  display:table-cell;
1170  text-align: left;
1171  padding: 5px;
1172  border-bottom: 1px solid #ccc;
1173  }
1174  #summary-info .summary-value,
1175  #txnDetail .summary-value {
1176  display:table-cell;
1177  text-align: right;
1178  padding: 5px;
1179  border-bottom: 1px solid #ccc;
1180  }
1181 
1182  #summary-info .summary-row:last-of-type .summary-desc,
1183  #summary-info .summary-row:last-of-type .summary-value,
1184  #txnDetail .summary-row:last-of-type .summary-desc,
1185  #txnDetail .summary-row:last-of-type .summary-value {
1186  border: none;
1187  }
1188 
1189  .summary-value .summary-notice,
1190  .summary-desc .summary-notice {
1191  color: red;
1192  }
1193  .summary-data {
1194  color: #666;
1195  }
1196 
1197  .summary-data-notify {
1198  color: red;
1199  }
1200 
1201  .local-field-margin {
1202  margin-top: 5px;
1203  margin-bottom: 5px;
1204  }
1205 
1206  #searchOptionsAdvancedLabel {
1207  cursor: pointer;
1208  }
1209 
1210  #search-chev:focus {
1211  outline: 2px solid #5E9ED6;
1212  }
1213 
1214  .local-readonly {
1215  color: darkorange;
1216  }
1217  .local-announce {
1218  padding-top: 20px;
1219  }
1220 
1221  td:focus {
1222  outline: 2px solid #5E9ED6;
1223  }
1224 
1225  .summary-row:focus {
1226  outline: 2px solid #5E9ED6;
1227  }
1228 
1229  </style>
1230 
1231  <form name="downloadPost" method="post"
1232  action="hcuDownload.prg?cu=<?php echo urlencode($HB_ENV['Cu']); ?>">
1233  <input type="hidden" name="action" value="download">
1234  <input type="hidden" name="cu" value="<?php echo $HB_ENV['HCUPOST']['cu']; ?>">
1235  <input type="hidden" name="downfmt" value="">
1236  <input type="hidden" name="start" value="">
1237  <input type="hidden" name="end" value="">
1238  <input type="hidden" name="selacct" value="<?php echo $HB_ENV['HCUPOST']['a']; ?>">
1239  </form>
1240  <div class="row initiallyHide">
1241  <div class='col-xs-12 col-sm-4 col-md-3' style="text-align:left;">
1242  <input id='acctList' value="<?php echo $HB_ENV['HCUPOST']['a']; ?>" style='width:100%; height:100%; text-align: left; margin-top:10px;'/>
1243  </div>
1244  <div class='col-xs-12 col-sm-4 col-md-3' style='text-align:left;'>
1245  <span id="detailsButton" class="k-button" style="width:100%; height:100%; margin-top: 10px;" tabindex="0"><span class="fa fa-crosshairs"></span>&nbsp;<?php echo $MC->msg('Open for Details', HCU_DISPLAY_AS_HTML); ?></span>
1246  </div>
1247  <div class='col-xs-12 col-sm-4 col-md-3' style='text-align:center;'>
1248  <span class="hidden-xs" id="hideDownload"><input id='downloadList' style="width:100%; height:100%; text-align: left; margin-top:10px;" /></span>
1249  </div>
1250  </div>
1251 
1252  <?php
1253  if ( $curAcctInfo["restrictions"] == "R" ) {
1254  ?>
1255  <div class='row'>
1256  <div class='col-xs-12 local-announce'>
1257  <span class="local-readonly"><span class="fa fa-flag-o" ></span> <?php echo $MC->msg('Account Readonly', HCU_DISPLAY_AS_HTML); ?></span>
1258  </div>
1259  </div>
1260  <?php
1261  }
1262 
1263  /*
1264  * Here are the details for the account
1265  */
1266  ?>
1267  <div id="details-container" class="initiallyHide">
1268  <div class="panel panel-default container-fluid">
1269  <!--<div class="row">
1270  <div class='col-xs-12' style="text-align:center; padding:0;">
1271  <h4 id='acctTitle' style="margin-bottom:15px;"></h4>
1272  </div>
1273  </div>-->
1274  <?php if (!$HB_ENV['live']): ?>
1275  <!--<div class="row">
1276  <div class='col-xs-12' style='text-align:center; padding:0;'>
1277  <?php echo $MC->msg('Account Status as of', HCU_DISPLAY_AS_HTML); ?>
1278  <span style='font-style:italic; margin-bottom: 5px;'><?php echo $HB_ENV['lastupdate']; ?></span>
1279  </div>
1280  </div>-->
1281  <?php endif; ?>
1282  <div id='summary-info'>
1283  <?php if ( $curAcctInfo["restrictions"] == "R" ) { ?>
1284  <div class='row'>
1285  <div class='col-xs-12'>
1286  <span class="local-readonly"><span class="fa fa-flag-o" ></span> <?php echo $MC->msg('Account Readonly', HCU_DISPLAY_AS_HTML); ?></span>
1287  </div>
1288  </div>
1289  <?php } ?>
1290 
1291  <?php if (substr($curAcctInfo['acctId'], 0, 1) == 'D'): ?>
1292  <?php if (HCU_array_key_exists('description', $curAcctInfo)): ?>
1293  <div class='summary-row' tabindex="0">
1294  <div class='summary-desc'><?php echo $MC->msg('Description', HCU_DISPLAY_AS_HTML); ?></div>
1295  <div class='summary-value'><?php echo $curAcctInfo['description']; ?></div>
1296  </div>
1297  <?php endif; ?>
1298  <?php if (HCU_array_key_exists('currentbal', $curAcctInfo)): ?>
1299  <div class='summary-row' tabindex="0">
1300  <div class='summary-desc'><?php echo $MC->msg('Current Bal', HCU_DISPLAY_AS_HTML); ?></div>
1301  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['currentbal']); ?></div>
1302  </div>
1303  <?php endif; ?>
1304  <?php if (HCU_array_key_exists('availablebal', $curAcctInfo)): ?>
1305  <div class='summary-row' tabindex="0">
1306  <div class='summary-desc'><?php echo $MC->msg('Available', HCU_DISPLAY_AS_HTML); ?></div>
1307  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['availablebal']); ?></div>
1308  </div>
1309  <?php endif; ?>
1310  <?php if (HCU_array_key_exists('ytdinterest', $curAcctInfo)): ?>
1311  <div class='summary-row' tabindex="0">
1312  <div class='summary-desc'><?php echo $MC->msg('YTD Interest', HCU_DISPLAY_AS_HTML); ?></div>
1313  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['ytdinterest']); ?></div>
1314  </div>
1315  <?php endif; ?>
1316  <?php if (HCU_array_key_exists('lastyrinterest', $curAcctInfo)): ?>
1317  <div class='summary-row' tabindex="0">
1318  <div class='summary-desc'><?php echo $MC->msg('Prior Yr Interest', HCU_DISPLAY_AS_HTML); ?></div>
1319  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['lastyrinterest']); ?></div>
1320  </div>
1321  <?php endif; ?>
1322  <?php elseif (substr($curAcctInfo['acctId'], 0, 1) == 'L'): ?>
1323 
1324  <?php if (HCU_array_key_exists('currentbal', $curAcctInfo)): ?>
1325  <div class='summary-row' tabindex="0">
1326  <div class='summary-desc'><?php echo $MC->msg('Current Bal', HCU_DISPLAY_AS_HTML); ?></div>
1327  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['currentbal']); ?></div>
1328  </div>
1329  <?php endif; ?>
1330  <?php if (HCU_array_key_exists('paymentamount', $curAcctInfo)): ?>
1331  <div class='summary-row' tabindex="0">
1332  <div class='summary-desc'><?php echo $MC->msg('Payment', HCU_DISPLAY_AS_HTML); ?></div>
1333  <div class='summary-value'><?php echo ($curAcctInfo['paymentamount'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['paymentamount'])); ?></div>
1334  </div>
1335  <?php endif; ?>
1336  <?php if (HCU_array_key_exists('nextduedate', $curAcctInfo)): ?>
1337  <div class='summary-row' tabindex="0">
1338  <div class='summary-desc'><?php echo $MC->msg('Next Due', HCU_DISPLAY_AS_HTML); ?></div>
1339  <div class='summary-value <?php echo (($curAcctInfo['nextduedate'] !== '' && $curAcctInfo['nextduedate'] != 'N/A') ? 'summary-notice' : '' ); ?>'><?php echo hcuFormatDate($curAcctInfo['nextduedate']); ?></div>
1340  </div>
1341  <?php if (HCU_array_key_exists('pastdue', $curAcctInfo) && $curAcctInfo['pastdue'] == '1' && ($curAcctInfo['nextduedate'] !== '' && $curAcctInfo['nextduedate'] != 'N/A')): ?>
1342  <div class='summary-row' tabindex="0">
1343  <div class='col-xs-12 summary-notice' style="padding:0;"><?php echo $MC->msg('Payment Past Due', HCU_DISPLAY_AS_HTML); ?></div>
1344  </div>
1345  <?php endif; ?>
1346  <?php endif; ?>
1347  <?php if (HCU_array_key_exists('tenday', $curAcctInfo)): ?>
1348  <?php if (HCU_array_key_exists('payoff', $curAcctInfo)): ?>
1349  <div class='summary-row' tabindex="0">
1350  <div class='summary-desc' style='padding-left:20px;'>Today's Payoff</div>
1351  <div class='summary-value'><?php echo ($curAcctInfo['payoff'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['payoff'])); ?></div>
1352  </div>
1353  <?php endif; ?>
1354  <div class='summary-row' tabindex="0">
1355  <div class='summary-desc'style='padding-left:20px;'><?php echo $MC->msg('Ten-days', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('Payoff', HCU_DISPLAY_AS_HTML); ?></div>
1356  <div class='summary-value'><?php echo ($curAcctInfo['tenday'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['tenday'])); ?></div>
1357  </div>
1358  <?php else: ?>
1359  <?php if (HCU_array_key_exists('payoff', $curAcctInfo)): ?>
1360  <div class='summary-row' tabindex="0">
1361  <div class='summary-desc'><?php echo $MC->msg('Payoff', HCU_DISPLAY_AS_HTML); ?></div>
1362  <div class='summary-value'><?php echo ($curAcctInfo['payoff'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['payoff'])); ?></div>
1363  </div>
1364  <?php endif; ?>
1365  <?php endif; ?>
1366  <?php if (HCU_array_key_exists('interestrate', $curAcctInfo)): ?>
1367  <div class='summary-row' tabindex="0">
1368  <div class='summary-desc'><?php echo $MC->msg('Interest Rate', HCU_DISPLAY_AS_HTML); ?></div>
1369  <div class='summary-value'><?php echo ($curAcctInfo['interestrate'] == 'N/A' ? 'N/A' : hcuFormatNumber($curAcctInfo['interestrate']) . '%'); ?></div>
1370  </div>
1371  <?php endif; ?>
1372  <?php if (HCU_array_key_exists('creditlimit', $curAcctInfo)): ?>
1373  <?php if (floatval($curAcctInfo['creditlimit']) > 0): ?>
1374  <div class='summary-row' tabindex="0">
1375  <div class='summary-desc'><?php echo $MC->msg('Limit', HCU_DISPLAY_AS_HTML); ?></div>
1376  <div class='summary-value'><?php echo ($curAcctInfo['creditlimit'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['creditlimit'])); ?></div>
1377  </div>
1378  <?php endif; ?>
1379  <?php endif; ?>
1380  <?php if (HCU_array_key_exists('availablebal', $curAcctInfo)): ?>
1381  <?php if (floatval($curAcctInfo['creditlimit']) > 0): ?>
1382  <div class='summary-row' tabindex="0">
1383  <div class='summary-desc'><?php echo $MC->msg('Available', HCU_DISPLAY_AS_HTML); ?></div>
1384  <div class='summary-value'><?php echo ($curAcctInfo['availablebal'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['availablebal'])); ?></div>
1385  </div>
1386  <?php endif; ?>
1387  <?php endif; ?>
1388  <?php if (HCU_array_key_exists('ytdinterest', $curAcctInfo)): ?>
1389  <div class='summary-row' tabindex="0">
1390  <div class='summary-desc'><?php echo $MC->msg('YTD Interest', HCU_DISPLAY_AS_HTML); ?></div>
1391  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['ytdinterest']); ?></div>
1392  </div>
1393  <?php endif; ?>
1394  <?php if (HCU_array_key_exists('lastyrinterest', $curAcctInfo)): ?>
1395  <div class='summary-row' tabindex="0">
1396  <div class='summary-desc'><?php echo $MC->msg('Prior Yr Interest', HCU_DISPLAY_AS_HTML); ?></div>
1397  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['lastyrinterest']); ?></div>
1398  </div>
1399  <?php endif; ?>
1400  <?php elseif (substr($curAcctInfo['acctId'], 0, 1) == 'C'): ?>
1401 
1402  <?php if (HCU_array_key_exists('currentbal', $curAcctInfo)): ?>
1403  <div class='summary-row' tabindex="0">
1404  <div class='summary-desc'><?php echo $MC->msg('Current Bal', HCU_DISPLAY_AS_HTML); ?></div>
1405  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['currentbal']); ?></div>
1406  </div>
1407  <?php endif; ?>
1408  <?php if (HCU_array_key_exists('lastpaymentdate', $curAcctInfo)): ?>
1409  <div class='summary-row' tabindex="0">
1410  <div class='summary-desc'><?php echo $MC->msg('Last Paid', HCU_DISPLAY_AS_HTML); ?></div>
1411  <div class='summary-value'><?php echo hcuFormatDate($curAcctInfo['lastpaymentdate']); ?></div>
1412  </div>
1413  <?php endif; ?>
1414  <?php if (HCU_array_key_exists('paymentamount', $curAcctInfo)): ?>
1415  <div class='summary-row' tabindex="0">
1416  <div class='summary-desc'><?php echo $MC->msg('Payment', HCU_DISPLAY_AS_HTML); ?></div>
1417  <div class='summary-value'><?php echo ($curAcctInfo['paymentamount'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['paymentamount'])); ?></div>
1418  </div>
1419  <?php endif; ?>
1420  <?php if (HCU_array_key_exists('nextduedate', $curAcctInfo)): ?>
1421  <div class='summary-row' tabindex="0">
1422  <div class='summary-desc'><?php echo $MC->msg('Next Due', HCU_DISPLAY_AS_HTML); ?></div>
1423  <div class='summary-value <?php echo (($curAcctInfo['nextduedate'] !== '' && $curAcctInfo['nextduedate'] != 'N/A') ? 'summary-notice' : '' ); ?>'><?php echo hcuFormatDate($curAcctInfo['nextduedate']); ?></div>
1424  </div>
1425  <?php if ($curAcctInfo['pastdue'] == '1' && ($curAcctInfo['nextduedate'] !== '' && $curAcctInfo['nextduedate'] != 'N/A')): ?>
1426  <div class='row'>
1427  <div class='col-xs-12 col-sm-5 summary-notice'><?php echo $MC->msg('Payment Past Due', HCU_DISPLAY_AS_HTML); ?></div>
1428  </div>
1429  <?php endif; ?>
1430  <?php endif; ?>
1431  <?php if (HCU_array_key_exists('interestrate', $curAcctInfo)): ?>
1432  <div class='summary-row' tabindex="0">
1433  <div class='summary-desc'><?php echo $MC->msg('Interest Rate', HCU_DISPLAY_AS_HTML); ?></div>
1434  <div class='summary-value'><?php echo ($curAcctInfo['interestrate'] == 'N/A' ? 'N/A' : hcuFormatNumber($curAcctInfo['interestrate']) . '%'); ?></div>
1435  </div>
1436  <?php endif; ?>
1437  <?php if (HCU_array_key_exists('creditlimit', $curAcctInfo)): ?>
1438  <div class='summary-row' tabindex="0">
1439  <div class='summary-desc'><?php echo $MC->msg('Limit', HCU_DISPLAY_AS_HTML); ?></div>
1440  <div class='summary-value'><?php echo ($curAcctInfo['creditlimit'] == 'N/A' ? 'N/A' : '$' . hcuFormatNumber($curAcctInfo['creditlimit'])); ?></div>
1441  </div>
1442  <?php endif; ?>
1443  <?php if (($Fset2 & $GLOBALS['CU2_HIDE_CCAVAIL']) != $GLOBALS['CU2_HIDE_CCAVAIL']): ?>
1444  <?php if (HCU_array_key_exists('available', $curAcctInfo)): ?>
1445  <div class='summary-row' tabindex="0">
1446  <div class='summary-desc'><?php echo $MC->msg('Available', HCU_DISPLAY_AS_HTML); ?></div>
1447  <div class='summary-value'><?php echo ($curAcctInfo['available'] == 'N/A' ? 'N/A' : (is_numeric($curAcctInfo['available']) ? '$' : '') . hcuFormatNumber($curAcctInfo['available'])); ?></div>
1448  </div>
1449  <?php endif; ?>
1450  <?php endif; ?>
1451  <?php if (HCU_array_key_exists('ytdinterest', $curAcctInfo)): ?>
1452  <div class='summary-row' tabindex="0">
1453  <div class='summary-desc'><?php echo $MC->msg('YTD Interest', HCU_DISPLAY_AS_HTML); ?></div>
1454  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['ytdinterest']); ?></div>
1455  </div>
1456  <?php endif; ?>
1457  <?php if (HCU_array_key_exists('lastyrinterest', $curAcctInfo)): ?>
1458  <div class='summary-row' tabindex="0">
1459  <div class='summary-desc'><?php echo $MC->msg('Prior Yr Interest', HCU_DISPLAY_AS_HTML); ?></div>
1460  <div class='summary-value'>$<?php echo hcuFormatNumber($curAcctInfo['lastyrinterest']); ?></div>
1461  </div>
1462  <?php endif; ?>
1463  <?php endif; ?>
1464  </div>
1465  </div>
1466  </div>
1467  <?php /* end of the details for the account */ ?>
1468 
1469 
1470 
1471  <div class='row initiallyHide'>
1472  <div id='divPendTrans'>
1473  <div class='col-xs-12'>
1474  <h4 id='hcuPendingHdr'><?php echo $MC->msg("Pending Transactions", HCU_DISPLAY_AS_HTML); ?></h4>
1475  </div>
1476  <div class='col-xs-12'>
1477  <div id="hcuTablePending" class="hcu-grid-style"></div>
1478  </div>
1479  <br/>
1480  </div>
1481  </div>
1482  <br/><br/>
1483  <div class='row initiallyHide'>
1484  <div class='col-xs-12' style="max-width: 500px;">
1485  <form id="search-transactions" method="post" action="hcuHistory.data?cu=<?php echo $HB_ENV['cu']; ?>">
1486  <div class="well well-sm">
1487  <h3><?php echo $MC->msg("Search Transactions", HCU_DISPLAY_AS_HTML) ?></h3>
1488  <br>
1489  <div class="row">
1490  <div class="col-xs-12 col-sm-4 local-field-margin">
1491  <select id="histDateRange" title="<?php echo $MC->msg("Search Transactions Date Range", HCU_DISPLAY_AS_HTML) ?>" class="hcu-all-100">
1492  <option value="30">30 <?php echo $MC->msg("days", HCU_DISPLAY_AS_HTML); ?></option>
1493  <option value="45">45 <?php echo $MC->msg("days", HCU_DISPLAY_AS_HTML); ?></option>
1494  <option value="90">90 <?php echo $MC->msg("days", HCU_DISPLAY_AS_HTML); ?></option>
1495  <option value=""><?php echo $MC->msg("Custom", HCU_DISPLAY_AS_HTML); ?></option>
1496  </select>
1497  </div>
1498  <div class="col-xs-12 col-sm-8 local-field-margin">
1499  <input id="histStartDate" type="text" title="<?php echo $MC->msg("Search History Start Date", HCU_DISPLAY_AS_HTML) ?>" value="" style="width: 110px;">
1500  &nbsp;<?php echo $MC->msg( "To", HCU_DISPLAY_AS_HTML ); ?>&nbsp;
1501  <input id="histEndDate" type="text" title="<?php echo $MC->msg("Search History End Date", HCU_DISPLAY_AS_HTML) ?>" value="" style="width: 110px;">
1502  </div>
1503  </div>
1504  <?php if ( $acctDispType == "D" ) { ?>
1505  <div class="row local-search-label">
1506  <div class="col-xs-12 local-field-margin">
1507  <h5 id="searchOptionsAdvancedLabel">
1508  <span><?php echo $MC->msg("Advanced Search", HCU_DISPLAY_AS_HTML) ?>&nbsp;</span>
1509  <span class="fa fa-chevron-down" id="search-chev" tabindex="0"
1510  title="<?php echo $MC->msg("Open Advanced Search", HCU_DISPLAY_AS_HTML) ?>"
1511  aria-label="<?php echo $MC->msg("Open Advanced Instructions", HCU_DISPLAY_AS_HTML); ?>"></span>
1512  </h5>
1513  </div>
1514  </div>
1515 
1516  <div class="row" id="searchOptionsAdvanced">
1517  <div class="col-xs-12 col-sm-4 local-field-margin">
1518  <label><?php echo $MC->msg("Amount", HCU_DISPLAY_AS_HTML) ?></label>
1519  <input type="text" id="searchAmt"
1520  title="<?php echo $MC->msg("Search Transaction Amount", HCU_DISPLAY_AS_HTML) ?>"
1521  class="k-textbox hcu-all-100" value="">
1522  </div>
1523  <div class="col-xs-12 col-sm-8 local-field-margin">
1524  <label><?php echo $MC->msg("Description Contains", HCU_DISPLAY_AS_HTML) ?></label>
1525  <input type="text" id="searchDesc"
1526  title="<?php echo $MC->msg("Search Transaction Description", HCU_DISPLAY_AS_HTML) ?>"
1527  class="k-textbox hcu-all-100" value="">
1528  </div>
1529 
1530  <?php if ( $hasCheckNumbers ) { ?>
1531  <div class="col-xs-12 col-sm-4 local-field-margin">
1532  <label><?php echo $MC->msg("Check", HCU_DISPLAY_AS_HTML) ?> #</label>
1533  <input type="text" id="searchCheckNum"
1534  title="<?php echo $MC->msg("Search Check Number", HCU_DISPLAY_AS_HTML) ?>"
1535  class="k-textbox hcu-all-100" value="">
1536  </div>
1537  <?php } ?>
1538 
1539  </div>
1540  <?php } ?>
1541 
1542  <div class="row">
1543  <div class="col-xs-12 local-field-margin">
1544  <button type="button" id="searchBtn"
1545  aria-label="<?php echo $MC->msg("Search", HCU_DISPLAY_AS_HTML) ?>" class="k-button k-primary">
1546  <span class="fa fa-search"></span>
1547  <span>&nbsp;<?php echo $MC->msg("Select", HCU_DISPLAY_AS_HTML) ?></span>
1548  </button>
1549  </div>
1550  </div>
1551  </div>
1552  </form>
1553  </div>
1554 
1555  <div class='col-xs-12'>
1556  <div class="hidden-xs hcu-grid-style" id="hcuAcctLedgerDiv">
1557  <div id="hcuAcctLedger"></div>
1558  </div>
1559  <div class="visible-xs-block hcu-grid-style" id="hcuMobileLedgerDiv">
1560  <div id="hcuMobileLedger"></div>
1561  </div>
1562  <div id="detailWindow"></div>
1563  <div id="checkWindow"></div>
1564  </div>
1565 
1566  <script type="text/x-kendo-template" id="toolbar-template">
1567  <div class="">
1568  <?php if (HCU_array_key_value('out_of_sync', $curAcctInfo)): ?>
1569  <div class="local-sync-error" style='float:left'>
1570  <span class="fa fa-exclamation-triangle"></span>
1571  <span><?php echo $MC->msg('Unable to load'); ?></span>
1572  </div>
1573  <?php endif; ?>
1574  <button type="button" style='float:right' class="k-button" id="printGrid"></button>
1575  </div>
1576  </script>
1577  <script type="text/x-kendo-template" id="pending-toolbar-template">
1578  <div class="row">
1579  <div class="col-xs-12 local-sync-error">
1580  <span class="fa fa-exclamation-triangle"></span>
1581  <span><?php echo $MC->msg('Unable to load'); ?></span>
1582  </div>
1583  </div>
1584  </script>
1585  <script type="text/x-kendo-template" id="templateDetail">
1586  <div class="panel panel-default container-fluid" id="txnDetail">
1587  <?php if ($acctDispType == 'L'): ?>
1588  <div class="summary-row" tabindex="0">
1589  <div class="summary-desc"><?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?></div>
1590  <div class="summary-value">#= date #</div>
1591  </div>
1592  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNDESC")) == GetFlagsetValue("CU_SHOWLNTXNDESC")): ?>
1593  <div class="summary-row" tabindex="0">
1594  <div class="summary-desc"><?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?></div>
1595  <div class="summary-value">#: description #</div>
1596  </div>
1597  <?php endif; ?>
1598  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNSPLIT")) == GetFlagsetValue("CU_SHOWLNTXNSPLIT")): ?>
1599  <div class="summary-row" tabindex="0">
1600  <div class="summary-desc"><?php echo $MC->msg('Principal', HCU_DISPLAY_AS_JS); ?></div>
1601  <div class="summary-value">#= kendo.toString(principal, "c") #</div>
1602  </div>
1603  <div class="summary-row" tabindex="0">
1604  <div class="summary-desc"><?php echo $MC->msg('Interest', HCU_DISPLAY_AS_JS); ?></div>
1605  <div class="summary-value">#= kendo.toString(interest, "c") #</div>
1606  </div>
1607  <?php endif; ?>
1608  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_ESCHEMA")) == GetFlagsetValue("CU2_ESCHEMA")): ?>
1609  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_FEE")) == GetFlagsetValue("CU2_SHOW_LN_FEE")): ?>
1610  <div class="summary-row" tabindex="0">
1611  <div class="summary-desc"><?php echo $MC->msg('Fee', HCU_DISPLAY_AS_JS); ?></div>
1612  <div class="summary-value">#= kendo.toString(fee, "c") #</div>
1613  </div>
1614  <?php endif; ?>
1615  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_ESCROW")) == GetFlagsetValue("CU2_SHOW_LN_ESCROW")): ?>
1616  <div class="summary-row" tabindex="0">
1617  <div class="summary-desc"><?php echo $MC->msg('Escrow', HCU_DISPLAY_AS_JS); ?></div>
1618  <div class="summary-value">#= kendo.toString(escrow, "c") #</div>
1619  </div>
1620  <?php endif; ?>
1621  <?php endif; ?>
1622  <div class="summary-row" tabindex="0">
1623  <div class="summary-desc"><?php echo ($HB_ENV['Fset'] & GetFlagsetValue("CU_SHOWLNTXNSPLIT")) == GetFlagsetValue("CU_SHOWLNTXNSPLIT") ? $MC->msg('Amount', HCU_DISPLAY_AS_JS) : $MC->msg('Payment', HCU_DISPLAY_AS_JS); ?></div>
1624  <div class="summary-value">#= kendo.toString(totalpay, "c") #</div>
1625  </div>
1626  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_LNBALUNUSABLE")) != GetFlagsetValue("CU_LNBALUNUSABLE")): ?>
1627  <div class="summary-row" tabindex="0">
1628  <div class="summary-desc"><?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?></div>
1629  <div class="summary-value">#= kendo.toString(balance, "c") #</div>
1630  </div>
1631  <?php endif; ?>
1632  <?php elseif ($acctDispType == 'C'): ?>
1633  <div class="summary-row" tabindex="0">
1634  <div class="summary-desc"><?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?></div>
1635  <div class="summary-value">#= date #</div>
1636  </div>
1637  <div class="summary-row" tabindex="0">
1638  <div class="summary-desc"><?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?></div>
1639  <div class="summary-value">#: description #</div>
1640  </div>
1641  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_ESCHEMA")) == GetFlagsetValue("CU2_ESCHEMA")): ?>
1642  <?php if (($HB_ENV['Fset2'] & GetFlagsetValue("CU2_SHOW_LN_FEE")) == GetFlagsetValue("CU2_SHOW_LN_FEE")): ?>
1643  <div class="summary-row" tabindex="0">
1644  <div class="summary-desc"><?php echo $MC->msg('Fee', HCU_DISPLAY_AS_JS); ?></div>
1645  <div class="summary-value">#= kendo.toString(fee, "c") #</div>
1646  </div>
1647  <?php endif; ?>
1648  <?php endif; ?>
1649  <div class="summary-row" tabindex="0">
1650  <div class="summary-desc"><?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?></div>
1651  <div class="summary-value">#= kendo.toString(totalpay, "c") #</div>
1652  </div>
1653  <?php if (($HB_ENV['Fset'] & GetFlagsetValue("CU_LNBALUNUSABLE")) != GetFlagsetValue("CU_LNBALUNUSABLE")): ?>
1654  <div class="summary-row" tabindex="0">
1655  <div class="summary-desc"><?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?></div>
1656  <div class="summary-value">#= kendo.toString(balance, "c") #</div>
1657  </div>
1658  <?php endif; ?>
1659  <?php else: ?>
1660  <div class="summary-row" tabindex="0">
1661  <div class="summary-desc"><?php echo $MC->msg('Date', HCU_DISPLAY_AS_JS); ?></div>
1662  <div class="summary-value">#= date #</div>
1663  </div>
1664  <?php if ($curAcctInfo['deposittype'] == 'Y'): ?>
1665 
1666  <div class="summary-row" tabindex="0">
1667  <div class="summary-desc"><?php echo $MC->msg('Check Number', HCU_DISPLAY_AS_JS); ?></div>
1668  <div class="summary-value">
1669  # if ( checkno !== null) { #
1670  # if ( checkno !== "0" && checkno.length > 0 ) { #
1671  <div onClick="showCheckImage('#= ckitem #', '#= ckhash #' );" >
1672  #= checkno # <?php if (($Fset & GetFlagsetValue("CU_SHOWIMAGES")) > 0) { ?> <span class='fa fa-eye'></span> <?php } ?>
1673  </div>
1674  # } #
1675  # } #
1676  </div>
1677  </div>
1678  <?php endif; ?>
1679  <div class="summary-row" tabindex="0">
1680  <div class="summary-desc"><?php echo $MC->msg('Description', HCU_DISPLAY_AS_JS); ?></div>
1681  <div class="summary-value">#: description #</div>
1682  </div>
1683  <div class="summary-row" tabindex="0">
1684  <div class="summary-desc"><?php echo $MC->msg('Amount', HCU_DISPLAY_AS_JS); ?></div>
1685  <div class="summary-value">#= kendo.toString(amount, "c") #</div>
1686  </div>
1687  <div class="summary-row" tabindex="0">
1688  <div class="summary-desc"><?php echo $MC->msg('Balance', HCU_DISPLAY_AS_JS); ?></div>
1689  <div class="summary-value">#= kendo.toString(balance, "c") #</div>
1690  </div>
1691  <?php endif; ?>
1692  </div>
1693  </script>
1694  </div>
1695 <?php
1696  /*
1697  * ** END CONTENT
1698  */
1699 
1700  // ** INCLUDE POST CONTENT SCRIPT
1701  require_once(dirname(__FILE__) . '/../includes/hcuPostContent.i');
1702 
1703 /**
1704  * For iPad users on version 9.3.5 Safari, the history page will load BLANK. It is not
1705  * executing the show() for .initiallyHide on load. The solution is to set the DOM
1706  * elements to display:block if we catch these users. We tried JS/CSS solutions
1707  * and old-school DOM methods without jQuery, none of them are working.
1708  *
1709  * It was suggested to just test for all IOS (isiOS() only,) but this
1710  * limits affected users. If other issues arise, remove the second
1711  * condition below.
1712  *
1713  * @param object $detect, mobile detect class object set in hcuService.
1714  * @return string block|none
1715  */
1716 function SetInitialHideProperty($detect) {
1717  if ($detect->isiOS() && ($detect->version('iPad') == '9_3_5')) {
1718  return 'block';
1719  }
1720 
1721  return 'none';
1722 }