11 $serviceShowInfo =
true;
12 $serviceLoadMenu =
true;
13 $serviceShowMenu =
true;
16 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
22 PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_BASIC);
31 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
42 $sql =
"SELECT img, rt, flagset 46 $img_rs = db_query($sql, $dbh);
48 list($img_vendor, $cu_rt, $flagset) = db_fetch_row($img_rs, 0);
49 $img_vendor = trim($img_vendor);
50 $cu_rt = trim($cu_rt);
51 db_free_result($img_rs);
53 if ( (trim($img_vendor) ==
'' || strtoupper(trim($img_vendor)) ==
'NO') || (($flagset & GetFlagsetValue(
"CU_SHOWIMAGES")) == 0)) {
56 $serviceErrorMsg = $MC->msg(
'Feature Not Set', HCU_DISPLAY_AS_HTML) .
".<BR>" . $MC->msg(
'Contact CU', HCU_DISPLAY_AS_HTML);
57 $serviceErrorCode =
'915';
59 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
64 # find out how many valid checking accounts the user can access: 65 $sql =
"SELECT description, trim(display_name), trim(ab.accounttype), trim(micraccount), trim(ab.accountnumber) 66 FROM {$Cu}useraccounts ua 67 INNER JOIN {$Cu}accountbalance ab ON ab.accountnumber = ua.accountnumber 68 AND ab.accounttype = ua.accounttype 69 and ab.certnumber = ua.certnumber 70 AND upper(deposittype) = 'Y' 71 AND trim(micraccount) > '' 72 WHERE ua.user_id = {$HB_ENV["Uid
"]} 73 AND ua.recordtype = 'D'";
75 $acctRS = db_query($sql, $dbh);
77 if (db_num_rows($acctRS) == 0) {
79 $serviceErrorMsg = $MC->msg(
'No Valid Accounts', HCU_DISPLAY_AS_HTML) .
"<BR>" . $MC->msg(
'Contact CU', HCU_DISPLAY_AS_HTML);
80 $serviceErrorCode =
'915';
82 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
89 $accountList = array();
90 while ( list($desc, $display, $atype, $micr, $acct) = db_fetch_row($acctRS, $row++) ) {
91 $displayName = getAccountDescription($dbh, $HB_ENV[
"Cu"], $acct, $desc, $atype, $display, $HB_ENV[
"Fset3"]);
92 $accountList[] = array(
"text" => $displayName,
"value" =>
"$micr|$acct|$atype" );
95 db_free_result($acctRS);
98 <script type=
"text/javascript">
100 var accountList = <?php echo HCU_JsonEncode( $accountList ) ?>;
101 $(document).ready(
function() {
102 var dsGetArchive =
new kendo.data.DataSource({
111 url:
"hcuArchiveCheck.data?cu=<?php echo $HB_ENV["cu
"] ?>",
113 contentType:
"application/json",
116 action:
"thisshouldgetoverwritten" 122 parse:
function(response) {
128 requestStart:
function(e) {
129 kendo.ui.progress($(
"#archive"),
true);
131 requestEnd:
function(e) {
135 kendo.ui.progress($(
"#archive"),
false);
138 if ( e.response && e.response.homecuErrors )
139 error = e.response.homecuErrors;
141 if ( error && error.length > 0 ) {
144 this.cancelChanges();
146 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
148 if ( e.response && e.response.homecuData && (e.response.homecuData.img_url.length > 0) ) {
149 CreateWindow(e.response.homecuData.img_url);
156 $(
'#dateCleared').kendoDatePicker({format:
"MM/dd/yyyy"});
157 $(
'#dateCleared').data(
'kendoDatePicker').value(kendo.toString(
new Date(),
'MM/dd/yyyy'));
160 $(
"#accountChoice").kendoDropDownList({
161 dataTextField:
"text",
162 dataValueField:
"value",
163 dataSource: accountList
166 var checkNumber = $(
"#checkNumber").kendoMaskedTextBox({
167 mask:
"<?php echo str_repeat('0', 20); ?>",
168 placeholder:
"<?php echo $MC->msg('Check Number', HCU_DISPLAY_AS_HTML); ?>" 169 }).data(
"kendoMaskedTextBox");
171 var amount = $(
"#amount").kendoNumericTextBox({
172 placeholder:
"####.##",
176 }).data(
"kendoNumericTextBox");
178 $(
"#viewCheck").click(
function() {
179 if ( $.homecuValidator.validate() ) {
180 var request = { action:
"create_url", check_number: checkNumber.raw(),
181 amount: $(
"#amount").val(), date_cleared: $(
"#dateCleared").val(),
182 account: $(
"#accountChoice").val() };
184 dsGetArchive.transport.read.type =
"POST";
185 dsGetArchive.read( request );
190 $.homecuValidator.setup({formValidate:
"formArchive",
191 formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>"});
193 function CreateWindow(url) {
194 $(
'#checkWindow').kendoWindow({
196 actions: [
"Close" ],
199 title:
"<?php echo $MC->msg("View Check Image
", HCU_DISPLAY_AS_JS) ?>",
204 windowStack.push(
this);
215 var dialog = $(
"#checkWindow").data(
'kendoWindow');
216 dialog.center().open();
221 $(document).on(
"click",
".k-overlay",
function () {
223 if ( windowStack.length > 0 ) {
224 windowStack[windowStack.length-1].close();
232 margin-right: initial;
233 margin-left: initial;
237 bottom: -10px !important;
240 <div
class=
"container" id=
"archive">
242 <form
class=
'formInputx well well-sm col-xs-12' id=
'formArchive' name=
'formArchive'>
244 <div
class=
"col-xs-12 hcuSpacer">
245 <h3><?php echo $MC->msg(
'View Check Image', HCU_DISPLAY_AS_HTML); ?> <span
id=
"displayStatus"></span></h3>
250 <div
class=
"col-xs-12 hcuSpacer">
251 <label
for=
"checkNumber"><?php echo $MC->msg(
'Check Number', HCU_DISPLAY_AS_HTML); ?>: </label>
253 <input
id=
"checkNumber" 257 data-required-msg=
"<?php echo "'{$MC->msg('Check Number
', HCU_DISPLAY_AS_HTML)}' {$MC->msg(
'is a Required Field', HCU_DISPLAY_AS_HTML)}
" ?>" 258 class=
"hcu-all-100" />
264 <div
class=
"col-xs-12 hcuSpacer">
265 <label
for=
"amount"><?php echo $MC->msg(
'Amount', HCU_DISPLAY_AS_HTML); ?>: </label>
272 data-required-msg=
"<?php echo "'{$MC->msg('Amount
', HCU_DISPLAY_AS_HTML)}' {$MC->msg(
'is a Required Field', HCU_DISPLAY_AS_HTML)}
" ?>" 273 class=
"hcu-all-100" />
279 <div
class=
"col-xs-12 hcuSpacer">
280 <label
for=
"dateCleared"><?php echo $MC->msg(
'Date Cleared', HCU_DISPLAY_AS_HTML); ?>: </label>
282 <input type=
"text" class=
"hcu-all-100" id=
'dateCleared' name=
'dateCleared' value=
'' homecu-match=
"date" 283 required data-required-msg=
"<?php echo "'{$MC->msg('Date Cleared
', HCU_DISPLAY_AS_HTML)}' {$MC->msg(
'is a Required Field', HCU_DISPLAY_AS_HTML)}
"; ?>" 284 data-homecuCustomMatch-msg=
"<?php echo "'{$MC->msg('Date Cleared
', HCU_DISPLAY_AS_HTML)}' {$MC->msg(
'is not a valid date', HCU_DISPLAY_AS_HTML)}
"; ?>" />
290 <div
class=
"col-xs-12 hcuSpacer">
291 <label
for=
"accountChoice"><?php echo $MC->msg(
'Account', HCU_DISPLAY_AS_HTML); ?>: </label>
293 <input
class=
"hcu-all-100" id=
'accountChoice' />
299 <div
class=
"hcu-template">
300 <div
class=
"hcu-edit-buttons k-state-default">
301 <a href=
"##" id=
"viewCheck" name=
"btnView" class=
"k-button k-primary">
302 <span
class=
"fa fa-eye"></span> <?php print $MC->msg(
'View', HCU_DISPLAY_AS_HTML); ?>
308 <div
id=
"checkWindow"></div>
310 }
catch (Exception $ex) {
312 $thisPageErrors = $ex->getMessage();
313 $errorObject = HCU_JsonDecode($thisPageErrors,
true,
false);
314 $serviceErrorMsg = strlen( $errorObject->content ) > 0 ? $errorObject->content : $thisPageErrors;
316 $serviceErrorTitle =
"";
317 if ( strlen( $errorObject->title ) ) {
318 $serviceErrorTitle = $errorObject->title;
322 $serviceErrorCode =
'916';
324 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
332 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');