14 require_once(dirname(__FILE__) .
'/../library/permissions.i');
15 require_once(dirname(__FILE__) .
'/../library/hcuACH.i');
16 require_once(dirname(__FILE__) .
'/../library/hcuTransferScheduled.i');
20 $serviceShowInfo =
true;
21 $serviceLoadMenu =
true;
22 $serviceShowMenu =
true;
25 require_once(dirname(__FILE__) .
'/../library/hcuService.i');
31 $allowScheduled = (($HB_ENV[
'flagset2'] & $GLOBALS[
'CU2_PROCRECUR']) && PermCheckFeatureScreen($dbh, $HB_ENV, $MC, FEATURE_SCHEDULED_TRANSFERS,
'',
false));
37 $chome = $HB_ENV[
"chome"];
38 $Flang = $HB_ENV[
"Flang"];
43 "ach_feature" => array(
'filter' => FILTER_SANITIZE_STRING)
46 HCU_ImportVars($inputVars,
"", $varOk);
48 $ach_feature = isset($inputVars[
'ach_feature']) && strlen( trim( $inputVars[
'ach_feature'] ) ) ? trim( $inputVars[
'ach_feature'] ) :
"choose_single_payment";
51 if ( $ach_feature ==
"choose_batch_payment" ||
52 $ach_feature ==
"choose_batch_collection" ) {
53 header(
"Location: {$HB_ENV["homebankingpath
"]}/hcuACHBatch.prg?{$HB_ENV["cuquery
"]}&ach_feature=$ach_feature");
58 require_once(dirname(__FILE__) .
'/../includes/hcuPreContent.i');
61 $achEnabled = Check_ACHEnabled( $dbh, $HB_ENV );
62 if ( $achEnabled ===
false ) {
64 throw new Exception( HCU_JsonEncode( $MC->msg(
'Option not set', HCU_DISPLAY_AS_HTML) ), 915 );
68 if ( $ach_feature ==
"choose_single_payment" ) {
69 $initialPartnerType =
"e";
70 $termActivity = $MC->msg(
"ACH Payment Info", HCU_DISPLAY_AS_HTML);
71 $achAction =
"submit_payment";
72 $featureCode = FEATURE_ACH_PAYMENTS;
74 $accountsAction =
"payments_list";
76 $accountTypeWords = $MC->msg(
"ACH From Account", HCU_DISPLAY_AS_HTML);
77 $dfiAccountWords = $MC->msg(
"ACH Deposit Account", HCU_DISPLAY_AS_HTML);
78 $batchButton =
"choose_batch_payment";
79 $pageTitle = $MC->msg(
"ACH Payment Title", HCU_DISPLAY_AS_HTML);
81 $progressStep1 = $MC->msg(
"ACH Payee", HCU_DISPLAY_AS_HTML);
82 $progressStep2 = $MC->msg(
"ACH Payment", HCU_DISPLAY_AS_HTML);
83 }
else if ( $ach_feature ==
"choose_single_collection" ) {
84 $initialPartnerType =
"r";
85 $termActivity = $MC->msg(
"ACH Collection Info", HCU_DISPLAY_AS_HTML);
86 $achAction =
"submit_collection";
87 $featureCode = FEATURE_ACH_COLLECTIONS;
89 $accountsAction =
"collections_list";
91 $accountTypeWords = $MC->msg(
"ACH To Account", HCU_DISPLAY_AS_HTML);
92 $dfiAccountWords = $MC->msg(
"ACH Withdrawl Account", HCU_DISPLAY_AS_HTML);
93 $batchButton =
"choose_batch_collection";
94 $pageTitle = $MC->msg(
"ACH Collection Title", HCU_DISPLAY_AS_HTML);
96 $progressStep1 = $MC->msg(
"ACH Payor", HCU_DISPLAY_AS_HTML);
97 $progressStep2 = $MC->msg(
"ACH Collection", HCU_DISPLAY_AS_HTML);
100 $initialPartnerType =
"";
101 $termActivity = $MC->msg(
"Unknown", HCU_DISPLAY_AS_HTML);
102 $achAction =
"unknown";
103 $featureCode =
"unknown";
104 $accountsAction =
"unknown";
105 $batchButton =
"choose_batch_payment";
109 $progressStep3 = $MC->msg(
"ACH Account", HCU_DISPLAY_AS_HTML);
112 $permissionInputs = array(
"feature" => $featureCode );
113 $accessRights = Perm_AccessRights( $dbh, $HB_ENV, $permissionInputs );
115 if ( !$accessRights[
"create"] ) {
117 throw new Exception( HCU_JsonEncode( $MC->msg(
'Rights not set', HCU_DISPLAY_AS_HTML) ), 915 );
121 $limits = Perm_GetValidationLimits( $dbh, $HB_ENV, $permissionInputs );
123 if ( $limits ===
false || !isset( $limits[
"amount_per_transaction"] ) ) {
127 $allowedAmount = intval( $limits[
"amount_per_transaction"] );
130 $Fset = $HB_ENV[
"Fset"];
133 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"achNotice",
true);
135 $hasNoticeACH =
false;
136 $hasNoticePopupACH =
false;
138 $noticeLinkDisplayACH =
"";
140 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
141 if ( $noticesAry[
"notice"][0][
"notice_id"] ) {
142 $hasNoticeACH =
true;
143 $noticeOption = $noticesAry[
'notice'][0];
145 $noticeOptions = Array (
146 'docsid' => $noticeOption[
'notice_id'],
147 'docstype' => $noticeOption[
'notice_type'],
150 'expireTime' => mktime() + 86400
153 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
155 $noticeOptions[
'noticeOnly'] = 1;
157 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
161 $noticeURLACH = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
164 $noticeURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
167 $hasNoticePopupACH = $noticeOption[
"notice_popup"] ? true :
false;
169 $noticeButtonText = $noticeOption[
"notice_linkdisplay"];
174 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"achTerms",
true);
176 $hasTermsACH =
false;
177 $hasTermsPopupACH =
false;
179 $termsLinkDisplayACH =
"";
181 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
182 if ( $noticesAry[
"notice"][0][
"notice_id"] ) {
184 $noticeOption = $noticesAry[
'notice'][0];
186 $noticeOptions = Array (
187 'docsid' => $noticeOption[
'notice_id'],
188 'docstype' => $noticeOption[
'notice_type'],
191 'expireTime' => mktime() + 86400
194 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
196 $noticeOptions[
'noticeOnly'] = 1;
198 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
202 $termsURLACH = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
205 $termsURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
208 $hasTermsPopupACH = $noticeOption[
"notice_popup"] ? true :
false;
210 $termsButtonText = $noticeOption[
"notice_linkdisplay"];
217 $noticesAry = Get_NoticeInfo($dbh, $HB_ENV, $MC,
"D",
"rptTransferTerms",
true);
219 $hasTermsRPT =
false;
220 $hasTermsPopupRPT =
false;
222 $termsLinkDisplayRPT =
"";
224 if ( $noticesAry[
"status"][
"code"] ==
"000" && HCU_array_key_exists(
'0', $noticesAry[
'notice'])) {
225 if ( $noticesAry[
"notice"][0][
"notice_id"] ) {
227 $noticeOption = $noticesAry[
'notice'][0];
229 $noticeOptions = Array (
230 'docsid' => $noticeOption[
'notice_id'],
231 'docstype' => $noticeOption[
'notice_type'],
234 'expireTime' => mktime() + 86400
237 $encryptedDocDetails= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
239 $noticeOptions[
'noticeOnly'] = 1;
241 $encryptedDocDetailsNoticeOnly= HCU_PayloadEncode($HB_ENV[
'Cu'], $noticeOptions);
245 $termsURLRPT = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetails);
248 $termsURLNoticeOnly = $HB_ENV[
'homebankingpath'] .
'/hcuViewNotice.prg?cu=' . $HB_ENV[
'cu'] .
'&x=' . urlencode($encryptedDocDetailsNoticeOnly);
251 $hasTermsPopupRPT = $noticeOption[
"notice_popup"] ? true :
false;
253 $termsButtonText = $noticeOption[
"notice_linkdisplay"];
267 $initialEffDate = ACH_GetEffectiveDate( $HB_ENV );
268 $initialEffDateTimestamp = strtotime( $initialEffDate );
274 $achCutoffMessageString = ACH_GetCutoffTimeMessage($HB_ENV);
277 $frequencyIntervals = TxIntervalList($HB_ENV[
"MC"]);
282 $companyData = ACH_GetCompanyData($HB_ENV);
283 if (HCU_array_key_exists(
"tax_id", $companyData)) {
284 if ($companyData[
'tax_id'] ==
null || trim($companyData[
'tax_id']) ==
"") {
285 throw new Exception( HCU_JsonEncode( $MC->msg(
'ACH Tax ID Error', HCU_DISPLAY_AS_HTML) ), 915 );
289 $frequencyContinueList = Array(
290 Array(
"value" =>
"continuous",
"text" => $MC->msg(
'Transfer Continue Until', HCU_DISPLAY_AS_RAW) .
' ' .$MC->msg(
'Transfer Further Notice', HCU_DISPLAY_AS_RAW)),
291 Array(
"value" =>
"continueuntil",
"text" => $MC->msg(
'Transfer Continue Until', HCU_DISPLAY_AS_RAW))
295 $accountTypes = array( array(
"type" => ACCOUNT_TYPE_CHECKING,
"display" => $MC->msg(
"ACH Checking", HCU_DISPLAY_AS_HTML) ),
296 array(
"type" => ACCOUNT_TYPE_SAVINGS,
"display" => $MC->msg(
"ACH Savings", HCU_DISPLAY_AS_HTML) )
300 $partnerTypes = array( array(
"type" => ACH_PARTNER_TYPE_PAYEE,
"display" => $MC->msg(
"ACH Payee", HCU_DISPLAY_AS_HTML) ),
301 array(
"type" => ACH_PARTNER_TYPE_PAYOR,
"display" => $MC->msg(
"ACH Payor", HCU_DISPLAY_AS_HTML) ),
302 array(
"type" => ACH_PARTNER_TYPE_PAYROLL,
"display" => $MC->msg(
"ACH Payroll", HCU_DISPLAY_AS_HTML) ),
303 array(
"type" => ACH_PARTNER_TYPE_UNASSIGNED,
"display" => $MC->msg(
"ACH Unassigned", HCU_DISPLAY_AS_HTML) )
306 <div
class=
"col-xs-12" style=
'font-size:12px;'>
307 <div
id=
"hcuAchTables" class=
"k-content" style=
"max-width:700px;"></div>
311 if ( $ach_feature ===
"choose_single_payment" ||
312 $ach_feature ===
"choose_single_collection" ) {
315 var windowStack = [];
317 var achFrequencyIntervals = <?php echo HCU_JsonEncode( $frequencyIntervals ); ?>;
318 var achFrequencyContinue = <?php echo HCU_JsonEncode( $frequencyContinueList ); ?>;
319 var achAccountTypes = <?php echo HCU_JsonEncode( $accountTypes ); ?>;
320 var achCurrentList = [];
321 var achPartnerTypes = <?php echo HCU_JsonEncode( $partnerTypes ); ?>;
322 var achPartnerList = [];
323 var achAllAccounts = [];
324 var achAcctsList = [];
325 var achSubAccounts = [];
326 var achStateList = <?php echo HCU_JsonEncode( GetStateList() ); ?>;
327 var progressStep = 0;
330 var dsACHHelper =
null;
333 var terms = <?php echo HCU_JsonEncode($hasTermsACH && $hasTermsPopupACH); ?>;
334 var notice = <?php echo HCU_JsonEncode($hasNoticeACH && $hasNoticePopupACH); ?>;
335 var termsScheduled = <?php echo HCU_JsonEncode($hasTermsRPT && $hasTermsPopupRPT); ?>;
336 var allowScheduled = <?php echo HCU_JsonEncode( $allowScheduled ) ?>;
337 var achFeature = <?php echo HCU_JsonEncode($ach_feature); ?>;
340 var effDatePicker =
null;
341 var endDatePicker =
null;
343 var companyData = <?php echo HCU_JsonEncode($companyData); ?>;
346 function ShowStatus( statusMessage ) {
347 $.homecuValidator.settings.formStatusField =
"formStatus";
348 $.homecuValidator.settings.formInfoTitle =
"";
349 $.homecuValidator.displayMessage(statusMessage);
352 function ClearPartnerInfo() {
353 viewModel.set(
"achIndividualName",
"" );
354 viewModel.set(
"achDisplayName",
"" );
355 viewModel.set(
"achIndividualEmail",
"" );
356 viewModel.set(
"achEmailNotify",
"" );
357 viewModel.set(
"achAddress1",
"" );
358 viewModel.set(
"achAddress2",
"" );
359 viewModel.set(
"achCity",
"" );
360 viewModel.set(
"achState",
"" );
361 viewModel.set(
"achZip",
"" );
362 viewModel.set(
"achCountry",
"" );
364 viewModel.set(
"achDFIRouting",
"" );
365 viewModel.set(
"achDFIAccount",
"" );
366 viewModel.set(
"achDFIConfirm",
"" );
367 viewModel.set(
"achDFISelectedType",
"" );
369 viewModel.set(
"achUpdatePartner",
true );
370 viewModel.set(
"achPartnerId", 0 );
373 function ClearPaymentInfo() {
374 viewModel.set(
"achIndividualAddenda",
"" );
376 viewModel.set(
"achType",
"" );
377 viewModel.set(
"achMemo",
"" );
380 if ( achAcctsList.length > 1 ) {
381 viewModel.set(
"achMyAcctSelected",
"" );
384 viewModel.set(
"achSubAcctSelected", 0 );
386 viewModel.set(
"achEffDate",
"<?php echo $initialEffDate; ?>" );
387 viewModel.set(
"achAmount",
"" );
388 viewModel.set(
"achFrequency",
"OneTime");
389 viewModel.set(
"achContinue",
"continuous");
390 viewModel.set(
"achEndDate",
"");
391 viewModel.set(
"showContinue",
false);
392 viewModel.set(
"showEnd",
false);
395 effDatePicker.data(
"kendoDatePicker").min(
"<?php echo $initialEffDate; ?>");
396 effDatePicker.data(
"kendoDatePicker").value(
"<?php echo $initialEffDate; ?>");
401 function StartValidator( thisStep ) {
402 if ( thisStep === 1 ) {
403 $.homecuValidator.setup( {formValidate:
"achSingleRecipient"} );
404 }
else if ( thisStep === 2 ) {
405 $.homecuValidator.setup( {formValidate:
"achLocal"} );
406 }
else if ( thisStep === 3 ) {
407 $.homecuValidator.setup( {formValidate:
"achSingleRemote"} );
415 function ValidateThisStep( thisStep ) {
416 var otherErrors = Array();
419 if ( thisStep === 1 ) {
420 if ( viewModel.achType ===
"" ) {
421 otherErrors.push(
"<?php echo $MC->msg("ACH Type needed
", HCU_DISPLAY_AS_JS) ?>" );
424 if (viewModel.achZip !=
"") {
426 var zip = viewModel.achZip;
427 var zipReplace = zip.replace(/_/g,
"");
428 var zipSplit = zipReplace.split(
"-");
429 var zipConstruct =
"";
432 if (zipSplit[0].length < 5) {
433 otherErrors.push(
"<?php echo $MC->msg("Zip Code Invalid
", HCU_DISPLAY_AS_JS) ?>");
434 }
else if (zipSplit[1]) {
435 if (zipSplit[1].length > 0 && zipSplit[1].length < 4) {
436 otherErrors.push(
"<?php echo $MC->msg("Zip Code Invalid
", HCU_DISPLAY_AS_JS) ?>");
442 zipConstruct += zipSplit[0] +
"-" + zipSplit[1];
444 zipConstruct += zipSplit[0];
447 viewModel.set(
"achZip", zipConstruct);
449 }
else if ( thisStep === 2 ) {
451 if ( viewModel.achSubAcctSelected ===
"" ) {
452 otherErrors.push( $(
"#achSubAcctList").attr(
"validationMessage" ) );
455 var amount = viewModel.achAmount;
456 var available = viewModel.achAvailable;
457 var immdTransfer = viewModel.achFrequency ==
"OneTime";
460 if ( immdTransfer && achFeature ==
"choose_single_payment" ) {
462 if (amount > available) {
463 otherErrors.push(
"<?php echo $MC->msg("Transfer exceeds
", HCU_DISPLAY_AS_JS); ?>" );
465 }
else if ( amount > <?php echo $allowedAmount ?> ) {
466 otherErrors.push(
"<?php echo $MC->msg("ACH Amount over allowed
", HCU_DISPLAY_AS_JS); ?>" );
467 }
else if ( amount <= 0 ) {
468 otherErrors.push( $(
"#achAmount").attr(
"validationMessage" ) );
471 if ( viewModel.achEffDate ==
null || viewModel.achEffDate ==
"" ) {
472 otherErrors.push( $(
"#achEffDate").attr(
"validationMessage" ) );
475 }
else if ( thisStep === 3 ) {
476 if ( viewModel.achDFIRouting.length !== 9 || !(/^\d+$/.test(viewModel.achDFIRouting)) ) {
478 otherErrors.push( $(
"#singleRecipientRouting").attr(
"validationMessage" ) );
480 if ( viewModel.achDFIAccount.length < 1 ) {
482 otherErrors.push( $(
"#singleRecipientAccount").attr(
"validationMessage" ) );
484 if ( viewModel.achDFIAccount !== viewModel.achDFIConfirm ) {
486 otherErrors.push( $(
"#singleRecipientConfirm").attr(
"data-homecuCustomEquals-msg" ) );
488 if ( viewModel.achDFISelectedType ===
"" ) {
490 otherErrors.push( $(
"#achAccountType").attr(
"validationMessage" ) );
495 $.homecuValidator.validate();
496 var totalErrors = $.homecuValidator.homecuKendoValidator.errors();
499 for (var i = 0; i < otherErrors.length; i++) {
500 if ($.inArray(otherErrors[i], totalErrors) == -1) {
501 totalErrors.push(otherErrors[i]);
505 if (totalErrors.length > 0) {
506 $.homecuValidator.displayMessage(totalErrors, $.homecuValidator.settings.statusError);
507 $.homecuValidator.homecuValidate =
false;
509 $.homecuValidator.homecuValidate =
true;
512 return ( $.homecuValidator.homecuValidate );
515 function ShowThisStep( step ) {
518 viewModel.trigger(
"reset" );
520 $(
"#achEndDate").removeAttr(
"required");
521 }
else if ( step === 1 ) {
523 viewModel.set(
"showBack",
false );
525 $(
"#achLocal").hide();
526 $(
"#achSingleRemote").hide();
527 $(
"#achFrequency").hide();
529 $(
"#achSingleRecipient").show();
530 progressSteps.value( 1 );
531 $(
"#stepName").html(
"<?php echo $progressStep1; ?>" );
533 $(
"#nextButton").html(
"<?php echo $MC->msg("Next
", HCU_DISPLAY_AS_JS); ?>");
534 }
else if ( step === 2 ) {
536 $(
"#achSingleRecipient").hide();
537 $(
"#achSingleRemote").hide();
538 $(
"#achFrequency").hide();
540 $(
"#achLocal").show();
541 progressSteps.value( 2 );
542 $(
"#stepName").html(
"<?php echo $progressStep2; ?>" );
544 viewModel.set(
"showBack",
true );
547 if ( !allowScheduled || ( !viewModel.achUpdatePartner && (viewModel.achPartnerId == 0) ) ) {
548 viewModel.set(
"showScheduleInputs",
false );
549 viewModel.set(
"showEffectiveLabel",
true );
551 viewModel.set(
"showScheduleInputs", allowScheduled );
552 viewModel.set(
"showEffectiveLabel", !(allowScheduled) );
555 $(
"#nextButton").html(
"<?php echo $MC->msg("Next
", HCU_DISPLAY_AS_JS); ?>");
556 }
else if ( step === 3 ) {
558 $(
"#achSingleRecipient").hide();
559 $(
"#achLocal").hide();
560 $(
"#achFrequency").hide();
562 $(
"#achSingleRemote").show();
563 progressSteps.value( 3 );
564 $(
"#stepName").html(
"<?php echo $progressStep3; ?>" );
566 viewModel.set(
"showBack",
true );
568 $(
"#nextButton").html(
"<?php echo $MC->msg("Submit
", HCU_DISPLAY_AS_JS); ?>");
573 StartValidator( step );
576 function HandleNavClick( nextStep ) {
578 $.homecuValidator.displayMessage(
"", $.homecuValidator.settings.statusError );
581 if ( nextStep >= progressStep ) {
585 if ( nextStep === progressStep ) {
587 }
else if ( nextStep > progressStep ) {
589 for ( var step = 1; step <= nextStep; step++ ) {
590 if ( !ValidateThisStep( step ) ) {
592 ShowThisStep( progressStep );
598 progressStep = nextStep;
599 ShowThisStep( progressStep );
602 function GetACHPartners() {
603 var request = { action:
"get_ach_partners" };
606 dsACHHelper.read( request ).then(
function() {
607 GetACHAccounts(
"<?php echo $accountsAction ?>" );
611 function GetACHAccounts( action ) {
612 var request = { action: action };
614 dsACHHelper.read( request );
617 function SubmitACHRequest() {
620 var amount = Math.round( viewModel.achAmount * 100 );
622 var request = { action:
"<?php echo $achAction ?>",
623 display_name: viewModel.achDisplayName,
624 ach_name: viewModel.achIndividualName,
625 email: viewModel.achIndividualEmail,
626 email_notify: (viewModel.achEmailNotify ==
"checked" ? 1 : 0),
627 address1: viewModel.achAddress1,
628 address2: viewModel.achAddress2,
629 country: viewModel.achCountry,
630 city: viewModel.achCity,
631 state: viewModel.achState,
632 zip: viewModel.achZip,
633 addenda: viewModel.achIndividualAddenda,
634 dfi_routing: viewModel.achDFIRouting,
635 dfi_account: viewModel.achDFIAccount,
636 dfi_account_type: viewModel.achDFISelectedType,
637 update_partner: (viewModel.achUpdatePartner ? 1 : 0),
638 partner_id: viewModel.achPartnerId,
639 partner_type: viewModel.achPartnerType,
640 internal_acct: viewModel.achMyAcctSelected,
641 internal_sub_acct: viewModel.achSubAcctSelected,
642 eff_date: viewModel.achEffDate,
643 end_date: viewModel.achEndDate,
644 frequency: viewModel.achFrequency,
645 continue: viewModel.achContinue,
647 ach_type: viewModel.achType,
648 memo: viewModel.achMemo
651 dsACH.read( request );
654 function HandleUpdatedAccountList() {
657 for (var i = 0; i < achAllAccounts.length; i++) {
658 achSubAccounts.push({
659 name: achAllAccounts[i].account_name,
660 id: achAllAccounts[i].acctid,
661 amount: achAllAccounts[i].amount,
662 account: achAllAccounts[i].account
667 var dataSource =
new kendo.data.DataSource({
670 var dropdownlist = $(
"#achSubAcctList").data(
"kendoDropDownList");
671 dropdownlist.setDataSource(dataSource);
673 if (achSubAccounts.length == 1) {
674 dropdownlist.select(1);
675 dropdownlist.trigger(
"change");
679 function HandleUpdatedPartnerList() {
682 if ( $(
"#achPartnerFilterPayee").prop(
"checked" ) ) {
683 filterTest.push(
"e");
685 if ( $(
"#achPartnerFilterPayroll").prop(
"checked" ) ) {
686 filterTest.push(
"$");
688 if ( $(
"#achPartnerFilterPayor").prop(
"checked" ) ) {
689 filterTest.push(
"r");
691 if ( $(
"#achPartnerFilterUnassigned").prop(
"checked" ) ) {
697 for ( var i = 0; i < achPartnerList.length; i++ ) {
698 var item= achPartnerList[i];
699 var test = filterTest.indexOf( item.partner_type );
701 achCurrentList.push( {name: (item.ach_name+
"").trim() ==
"" ? item.display_name : item.ach_name, id: item.id} );
705 var dataSource =
new kendo.data.DataSource({
710 var dropdownlist = $(
"#achPartnerList").data(
"kendoDropDownList");
711 dropdownlist.setDataSource(dataSource);
712 dropdownlist.select(0);
719 function InitDataSources() {
720 dsACHHelper =
new kendo.data.DataSource({
725 url:
'hcuACH.data?cu=<?php echo $HB_ENV['cu
']; ?>',
727 contentType:
"application/x-www-form-urlencoded",
733 parse:
function(response) {
739 requestStart:
function( e ) {
742 requestEnd:
function( e ) {
748 if ( e.response && e.response.Results ) {
749 results = e.response.Results;
752 if ( results && results.homecuErrors )
753 error = results.homecuErrors;
755 if ( error && error.length > 0 ) {
758 dsACHHelper.cancelChanges();
760 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
762 if ( results && results.homecuInfo && (results.homecuInfo.length > 0) ) {
763 ShowStatus( results.homecuInfo );
767 if ( results && results.homecuData ) {
769 if ( results.homecuData.partners ) {
770 achPartnerList = results.homecuData.partners;
772 HandleUpdatedPartnerList();
776 if ( results.homecuData.accounts ) {
777 achAllAccounts = results.homecuData.accounts;
779 HandleUpdatedAccountList();
783 if ( results.homecuData.one_partner ) {
784 var partnerInfo = results.homecuData.one_partner;
786 viewModel.set(
"achPartnerType", partnerInfo.partner_type );
787 viewModel.set(
"achIndividualName", partnerInfo.ach_name );
788 viewModel.set(
"achDisplayName", partnerInfo.display_name );
789 viewModel.set(
"achIndividualEmail", partnerInfo.email );
790 viewModel.set(
"achEmailNotify", partnerInfo.email_notify ?
"checked" :
"" );
791 viewModel.set(
"achAddress1", partnerInfo.address1 );
792 viewModel.set(
"achAddress2", partnerInfo.address2 );
793 viewModel.set(
"achCity", partnerInfo.city );
794 viewModel.set(
"achState", partnerInfo.state );
795 viewModel.set(
"achZip", partnerInfo.zip);
796 viewModel.set(
"achCountry", partnerInfo.country );
798 viewModel.set(
"achDFIRouting", partnerInfo.dfi_routing );
799 viewModel.set(
"achDFIAccount", partnerInfo.dfi_account );
800 viewModel.set(
"achDFIConfirm", partnerInfo.dfi_account );
801 viewModel.set(
"achDFISelectedType", partnerInfo.dfi_account_type );
808 error =
"Error occurred on server that halted this operation.";
809 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
815 error:
function( e ) {
819 dsACH =
new kendo.data.DataSource({
824 url:
'hcuACH.data?cu=<?php echo $HB_ENV['cu
']; ?>',
826 contentType:
"application/x-www-form-urlencoded",
832 parse:
function(response) {
838 requestStart:
function( e ) {
841 requestEnd:
function( e ) {
847 if ( e.response && e.response.Results ) {
848 results = e.response.Results;
851 if ( results && results.homecuErrors )
852 error = results.homecuErrors;
854 if ( error && error.length > 0 ) {
856 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
860 if ( results && results.homecuData ) {
862 if ( results.homecuData.partners ) {
863 achPartnerList = results.homecuData.partners;
865 HandleUpdatedPartnerList();
869 if ( results.homecuData.accounts ) {
870 achAllAccounts = results.homecuData.accounts;
872 HandleUpdatedAccountList();
876 if ( results.homecuData.txn ) {
879 ShowThisStep( progressStep );
882 ShowConfirmation(results.homecuData.txn);
886 if ( results && results.homecuInfo && (results.homecuInfo.length > 0) ) {
887 $.homecuValidator.settings.formStatusField =
"confirmationStatus";
888 $.homecuValidator.settings.formInfoTitle =
"";
889 $.homecuValidator.displayMessage(results.homecuInfo, $.homecuValidator.settings.statusSuccess);
893 error =
"Error occurred on server that halted this operation.";
894 $.homecuValidator.displayMessage(error, $.homecuValidator.settings.statusError);
900 error:
function( e ) {
905 function InitDataViews() {
906 viewModel = kendo.observable({
908 showScheduleInputs:
false,
909 showEffectiveLabel:
false,
912 showRecipient:
false,
918 disableSaveButton:
false,
921 achIndividualName:
"",
923 achIndividualEmail:
"",
931 achIndividualAddenda:
"",
935 achDFISelectedType:
"",
936 achUpdatePartner:
true,
938 achPartnerType:
"<?php echo $initialPartnerType ?>",
939 achMyAcctSelected:
"",
940 achSubAcctSelected: 0,
948 achFrequency:
"OneTime",
949 achContinue:
"continuous",
950 nextClick:
function(e) {
954 $.homecuValidator.displayMessage(
"", $.homecuValidator.settings.statusError );
957 $(
"#content-wrapper").animate({ scrollTop: 0 }, { duration: 500 } );
959 if ( ValidateThisStep( progressStep ) ) {
960 if ( progressStep >= 3 ) {
965 ShowThisStep( progressStep );
969 backClick:
function( e ) {
973 $.homecuValidator.displayMessage(
"", $.homecuValidator.settings.statusError );
977 ShowThisStep( progressStep );
980 $(
"#content-wrapper").animate({ scrollTop: 0 }, { duration: 500 } );
982 partnerClick:
function( e ) {
983 HandleUpdatedPartnerList();
985 cancel:
function( e ) {
988 document.formCancel.submit();
990 changeEmailNotify:
function(e) {
991 $(e.target).prop(
"checked") ?
992 this.
set(
"achEmailNotify",
"checked") :
993 this.
set(
"achEmailNotify",
"");
998 $.homecuValidator.setup({formErrorTitle:
"<?php echo $MC->msg("Error Occurred
", HCU_DISPLAY_AS_JS) ?>"});
1001 viewModel.bind(
"save",
function(e) {
1002 viewModel.achServer.read();
1006 viewModel.bind(
"reset",
function(e) {
1012 $(
"#progressBar").kendoProgressBar({
1017 change:
function( e ) {
1018 progressSteps = $(
"#progressBar").data(
"kendoProgressBar");
1019 progressSteps.progressStatus.text(
"(" + progressSteps.value() +
" / 3)" );
1022 progressSteps = $(
"#progressBar").data(
"kendoProgressBar");
1023 progressSteps.progressStatus.text(
"(1 / 3)" );
1026 progressSteps.value( 1 );
1032 kendo.bind($(
"#ach-payment"), viewModel);
1034 $(
"#achPartnerList").kendoDropDownList({
1035 dataTextField:
"name",
1036 dataValueField:
"id",
1037 dataSource: achPartnerList,
1038 optionLabel: {id:
"", name:
"<?php echo $MC->msg("ACH New Partner Below
", HCU_DISPLAY_AS_JS) ?>"},
1039 change:
function(e) {
1041 var whichId = this.value();
1046 if ( whichId > 0 ) {
1047 var request = { action:
"ach_partner", partner_id: whichId };
1049 dsACHHelper.read( request );
1051 $(
"#partnerLabel").html(
"<?php echo $MC->msg("ACH Edit Partner
", HCU_DISPLAY_AS_JS) ?>");
1053 $(
"#partnerLabel").html(
"<?php echo $MC->msg("ACH Enter Partner
", HCU_DISPLAY_AS_JS) ?>");
1057 viewModel.set(
"achPartnerId", whichId );
1061 $(
"#achFrequencySelect").kendoDropDownList({
1062 dataTextField:
"text",
1063 dataValueField:
"value",
1064 dataSource: achFrequencyIntervals,
1065 change: checkTermsScheduled
1068 $(
"#achFrequencyContinue").kendoDropDownList({
1069 dataTextField:
"text",
1070 dataValueField:
"value",
1071 dataSource: achFrequencyContinue,
1072 change:
function(e) {
1073 var dropdown =
this;
1074 var dropdownValue = dropdown.value();
1076 dropdownValue !=
"continuous";
1079 $(
"#achEndDate").attr(
"required",
true);
1081 $(
"#achEndDate").removeAttr(
"required");
1082 $(
"#achEndDate").data(
"kendoDatePicker").value(
"");
1083 viewModel.set(
"achEndDate",
"");
1086 viewModel.set(
"showEnd", showEnd);
1090 $(
"#achAccountType").kendoDropDownList({
1091 dataTextField:
"display",
1092 dataValueField:
"type",
1093 dataSource: achAccountTypes,
1094 optionLabel: {type:
"", display:
"<?php echo $MC->msg("ACH Select Type
", HCU_DISPLAY_AS_JS) ?>"},
1097 $(
"#achPartnerFilter").kendoMultiSelect({
1098 dataTextField:
"display",
1099 dataValueField:
"type",
1100 placeholder:
"<?php echo $MC->msg("Click Here
", HCU_DISPLAY_AS_JS); ?>",
1101 dataSource: achPartnerTypes,
1102 dataBound:
function( e ) {
1103 var multiselect = $(
"#achPartnerFilter").data(
"kendoMultiSelect");
1105 multiselect.value([
"<?php echo $initialPartnerType ?>"]);
1107 change:
function( e ) {
1108 HandleUpdatedPartnerList();
1113 $(
".partner-filter-chooser").click(
function() {
1114 HandleUpdatedPartnerList();
1117 $(
"#achPartnerType").kendoDropDownList({
1118 dataTextField:
"display",
1119 dataValueField:
"type",
1120 dataSource: achPartnerTypes,
1121 valueTemplate:
"#= display #",
1122 template:
"#= display #" 1125 $(
"#achSubAcctList").kendoDropDownList({
1126 dataTextField:
"name",
1127 dataValueField:
"id",
1128 dataSource: achSubAccounts,
1129 valueTemplate:
'<span class="local-subleft">#: name #</span><span class="local-subright">#: amount #</span>',
1130 template:
'<span class="k-state-default"><span class="local-subleft local-subname">#: name #</span><span class="local-subright">#: amount #</span></span>',
1131 optionLabel: {name:
"<?php echo $MC->msg("ACH Select Account
", HCU_DISPLAY_AS_JS) ?>", id:
"", amount:
""},
1132 change:
function(e) {
1133 var dataIndex = this.selectedIndex > 0 ? this.selectedIndex-1 : 0;
1134 var dataSource = this.dataSource.data();
1135 var dataItem = dataSource[dataIndex];
1137 var selectedAccount = dataItem.account;
1138 var selectedAvailable = dataItem.amount.substring(1);
1140 viewModel.set(
"achMyAcctSelected", selectedAccount);
1141 viewModel.set(
"achAvailable", selectedAvailable);
1146 if (
"<?php echo $initialPartnerType ?>" ===
"e" ) {
1147 $(
"#achPartnerFilterPayee").prop(
"checked",
true );
1148 $(
"#achPartnerFilterPayroll").prop(
"checked",
true );
1149 $(
"#achPartnerFilterUnassigned").prop(
"checked",
true );
1150 }
else if (
"<?php echo $initialPartnerType ?>" ===
"r" ) {
1151 $(
"#achPartnerFilterPayor").prop(
"checked",
true );
1152 $(
"#achPartnerFilterUnassigned").prop(
"checked",
true );
1154 $(
"#achPartnerFilterUnassigned").prop(
"checked",
true );
1161 effDatePicker = $(
"#achEffDate");
1162 endDatePicker = $(
"#achEndDate");
1163 endDatePicker.kendoMaskedTextBox({
1167 effDatePicker.kendoMaskedTextBox({
1171 endDatePicker.kendoDatePicker({
1172 min:
new Date(<?php echo date(
'Y', $initialEffDateTimestamp) .
', ' . (date(
'n', $initialEffDateTimestamp) - 1) .
', ' . (date(
'j', $initialEffDateTimestamp) + 1); ?>),
1173 format:
"MM/dd/yyyy" 1176 effDatePicker.kendoDatePicker({
1177 min:
new Date(<?php echo date(
'Y', $initialEffDateTimestamp) .
', ' . (date(
'n', $initialEffDateTimestamp) - 1) .
', ' . (date(
'j', $initialEffDateTimestamp)); ?>),
1178 format:
"MM/dd/yyyy",
1179 change: checkTermsScheduled
1182 endDatePicker.closest(
".k-datepicker").add(endDatePicker).removeClass(
"k-textbox");
1183 effDatePicker.closest(
".k-datepicker").add(effDatePicker).removeClass(
"k-textbox");
1185 $(
"#singleState").kendoDropDownList({
1186 dataTextField:
"name",
1187 dataValueField:
"value",
1188 dataSource: achStateList,
1189 optionLabel: {value:
"", name:
"<?php echo $MC->msg("ACH Select State
", HCU_DISPLAY_AS_JS) ?>"},
1193 $(
"#singleZip").kendoMaskedTextBox({
1195 clearPromptChar:
true 1199 $(
"#singleRecipientRouting").kendoMaskedTextBox({
1201 clearPromptChar:
true 1204 $(
"#achAmount").kendoNumericTextBox({
1206 max: <?php echo $allowedAmount ?>,
1209 restrictDecimals:
true,
1214 $(
"#achAmount").focus(
function() {
1215 var input = $(
this);
1217 clearTimeout(input.data(
"selectTimeId"));
1219 var selectTimeId = setTimeout(
function() {
1223 input.data(
"selectTimeId", selectTimeId);
1224 }).blur(
function(e) {
1225 clearTimeout($(
this).data(
"selectTimeId"));
1229 $(
"#step1").click(
function(e) {
1233 $(
"#step2").click(
function(e) {
1237 $(
"#step3").click(
function(e) {
1242 $(
'#formChangeType').change(
function(){
1243 $(
'#formChangeType').submit();
1247 ShowThisStep( progressStep );
1250 $(
"#achTypeBatch").click(
function(e) {
1251 $(
"#achFeatureChoice").val(
"<?php echo $batchButton ?>" );
1252 $(
"#formChangeType").submit();
1255 homecuTooltip.bind({
1257 "<?php echo $MC->msg("ACH Notify Info Init
", HCU_DISPLAY_AS_JS); ?> " +
1258 "<?php echo $MC->msg("ACH Notify Info Single
", HCU_DISPLAY_AS_JS); ?>",
1259 companyNameTip:
"<?php echo $MC->msg("ACH Company Name Help
", HCU_DISPLAY_AS_JS) ?>" 1263 $(
"#confirmationWindow").kendoDialog({
1264 title:
"<?php echo $MC->msg('ACH Transaction Confirmation'); ?>",
1273 text:
"<?php echo $MC->msg('Close', HCU_DISPLAY_AS_JS); ?>",
1278 windowStack.push(
this);
1280 close:
function(e) {
1284 $.homecuValidator.settings.formStatusField =
"formStatus";
1285 $.homecuValidator.settings.formInfoTitle =
"";
1290 function InitScreen() {
1295 $(
"#ach-payment").show();
1298 $(document).ready(
function() {
1300 ShowNotice(
'<?php echo $termsURLACH; ?>',
"<?php echo $termsLinkDisplayACH ?>", acceptACHTerms, declineACHTerms);
1301 }
else if (notice) {
1303 ShowNotice(
'<?php echo $noticeURLACH; ?>',
"<?php echo $noticeLinkDisplayACH ?>");
1309 function acceptACHTerms() {
1313 ShowNotice(
'<?php echo $noticeURLACH; ?>',
"<?php echo $noticeLinkDisplayACH ?>");
1317 function declineACHTerms() {
1321 var urlInit = window.location.href.substring(0, window.location.href.indexOf(
"hcu"));
1322 var urlCu =
"<?php echo $Cu ?>";
1323 var urlPage =
"hcuAccounts.prg";
1324 var urlRedirect = urlInit + urlPage +
"?cu=" + urlCu;
1326 window.location.replace(urlRedirect);
1331 function checkTermsScheduled(e) {
1332 if (termsScheduled) {
1333 ShowNotice(
"<?php echo $termsURLRPT; ?>",
"<?php echo $termsLinkDisplayRPT; ?>",
1336 termsScheduled =
false;
1339 if (e.sender.element[0].id ==
"achFrequencySelect") {
1340 selectRepeatFreq(e);
1349 $(
"#achFrequencySelect").data(
"kendoDropDownList").value(
"OneTime");
1352 $(
"#achEffDate").data(
"kendoDatePicker").value(
"<?php echo $initialEffDate; ?>");
1356 if (e.sender.element[0].id ==
"achFrequencySelect") {
1357 selectRepeatFreq(e);
1362 function selectRepeatFreq(e) {
1363 var dropdown = e.sender;
1364 var dropdownValue = dropdown.value();
1365 var dropdownContinue = $(
"#achFrequencyContinue").data(
"kendoDropDownList");
1366 var dropdownContinueValue = dropdownContinue.value();
1367 var pickerEnd = endDatePicker.data(
"kendoDatePicker");
1368 var pickerEff = effDatePicker.data(
"kendoDatePicker");
1371 dropdownValue !=
"OneTime";
1373 dropdownValue !=
"OneTime" &&
1374 dropdownContinueValue !=
"continuous";
1377 $(
"#achEndDate").attr(
"required",
true);
1379 $(
"#achEndDate").removeAttr(
"required");
1380 $(
"#achEndDate").data(
"kendoDatePicker").value(
"");
1383 viewModel.set(
"showContinue", showContinue);
1384 viewModel.set(
"showEnd", showEnd);
1387 function ShowConfirmation(txn) {
1388 var confirmationTemplate = kendo.template($(
"#confirmationTemplate").html());
1389 var confirmationDisplay = confirmationTemplate(txn);
1391 $(
"#confirmationWindow").data(
"kendoDialog").content(confirmationDisplay);
1392 $(
"#confirmationWindow").data(
"kendoDialog").open();
1396 $(document).on(
"click",
".k-overlay",
function (e) {
1397 if(windowStack.length > 0) {
1399 if (windowStack.length > 0) {
1400 var win = windowStack[windowStack.length-1];
1408 <div
id=
"disclosureWindow" name=
"disclosureWindow"></div>
1409 <style type=
"text/css">
1413 .local-subleft { float:left; }
1414 .local-subname { font-weight: 500; }
1415 .local-subright { float:right; }
1418 border-top: 2px solid rgba(0,0,0,.37);
1434 .ach-
switch-button {
1435 margin-bottom: 15px;
1444 .local-text-offset {
1454 .local-transfer-msg {
1459 @media (min-width: 768px) {
1463 @media (min-width: 992px) {
1466 <div
id=
"confirmationWindow"></div>
1467 <div
class=
"k-content container-fluid" id=
"ach-payment" style=
"display: none;">
1468 <div
class=
'ach-title'><?php echo $pageTitle ?></div>
1469 <form method=
"post" id=
"formChangeType" name=
"formChangeType" action=
'<?php echo $HB_ENV["loginpath"]."/{$HB_ENV['currentscript
']}?".$HB_ENV["cuquery"] ?>'>
1470 <input type=
'hidden' id=
"achFeatureChoice" name=
'ach_feature' value=
'' />
1472 <div
class=
"col-xs-12">
1474 <div
class=
"col-xs-4 ach-switch-button">
1475 <div
class=
"btn-group" role=
"group" aria-label=
"...">
1476 <button type=
"button" id=
"achTypeSingle" class=
"btn btn-primary"><?php echo $MC->msg(
"ACH Single", HCU_DISPLAY_AS_HTML); ?></button>
1477 <button type=
"button" id=
"achTypeBatch" class=
"btn btn-default"><?php echo $MC->msg(
"ACH Batch", HCU_DISPLAY_AS_HTML); ?></button>
1481 <div
class=
"col-xs-8 text-right">
1482 <label><?php echo $MC->msg(
"ACH Company Name Label", HCU_DISPLAY_AS_HTML); ?>: <span
class=
"fa fa-question-circle-o" id=
"companyNameTip"></span></label><br>
1483 <span> <?php echo $companyData[
'group_name']; ?></span>
1488 <div
class=
"col-xs-12">
1489 <div
id=
"stepName"><?php echo $progressStep1; ?></div>
1493 <div
class=
"col-xs-12">
1494 <div
id=
"progressBar" class=
"hcu-all-100"></div>
1498 <div
class=
"col-xs-12"> </div>
1502 <div
class=
"tabSingleRecipient tabHide" id=
"achSingleRecipient">
1503 <div
class=
"tabContents">
1504 <div
class=
"well well-sm">
1505 <div
class=
"form-horizontal">
1506 <div
class=
"form-group">
1507 <label
class=
"col-sm-3 col-xs-12 control-label"><?php echo $MC->msg(
"ACH Type", HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1508 <div
class=
"col-sm-9 col-xs-12">
1509 <label
class=
"radio-inline">
1511 name=
'ach_entry_type' 1513 data-bind=
"checked: achType" 1514 required> <?php echo $MC->msg(
"ACH PPD", HCU_DISPLAY_AS_HTML); ?>
1516 <label
class=
"radio-inline">
1518 name=
'ach_entry_type' 1520 data-bind=
"checked: achType"> <?php echo $MC->msg(
"ACH CCD", HCU_DISPLAY_AS_HTML); ?>
1524 <div data-bind=
"visible: achType">
1525 <div
class=
"hcu-filter-group">
1527 <div
class=
"col-xs-12 col-sm-12 h4"><?php echo $MC->msg(
"ACH Choose Partner", HCU_DISPLAY_AS_HTML); ?></div>
1529 <div
class=
"form-group">
1530 <div
class=
"col-sm-3 hidden-xs"> </div>
1531 <div
class=
"col-sm-6 col-xs-12"><div
id=
"achPartnerList" class=
"hcu-all-100"></div></div>
1533 <div
class=
"form-group">
1534 <div
class=
"col-sm-3 hidden-xs"> </div>
1535 <div
class=
"col-sm-2 col-sm-offset-0 col-xs-10 col-xs-offset-1">
1536 <label
class=
"checkbox-inline">
1537 <input type=
"checkbox" id=
"achPartnerFilterPayee" class=
"partner-filter-chooser"> <?php echo $MC->msg(
"ACH Payee", HCU_DISPLAY_AS_HTML); ?>
1540 <div
class=
"col-sm-2 col-sm-offset-0 col-xs-10 col-xs-offset-1">
1541 <label
class=
"checkbox-inline">
1542 <input type=
"checkbox" id=
"achPartnerFilterPayroll" class=
"partner-filter-chooser"> <?php echo $MC->msg(
"ACH Payroll", HCU_DISPLAY_AS_HTML); ?>
1545 <div
class=
"col-sm-2 col-sm-offset-0 col-xs-10 col-xs-offset-1">
1546 <label
class=
"checkbox-inline">
1547 <input type=
"checkbox" id=
"achPartnerFilterPayor" class=
"partner-filter-chooser"> <?php echo $MC->msg(
"ACH Payor", HCU_DISPLAY_AS_HTML); ?>
1550 <div
class=
"col-sm-2 col-sm-offset-0 col-xs-10 col-xs-offset-1">
1551 <label
class=
"checkbox-inline">
1552 <input type=
"checkbox" id=
"achPartnerFilterUnassigned" class=
"partner-filter-chooser"> <?php echo $MC->msg(
"ACH Unassigned", HCU_DISPLAY_AS_HTML); ?>
1558 <div
class=
"col-xs-12"> </div>
1560 <div
class=
"form-group">
1561 <div
class=
"col-xs-12 h4"><span
id=
'partnerLabel'><?php echo $MC->msg(
"ACH Partner Information", HCU_DISPLAY_AS_HTML); ?></span></div>
1563 <div
class=
"form-group">
1564 <div
class=
"col-sm-3 col-xs-12 control-label"><label
for=
"achPartnerType"><?php echo $MC->msg(
"ACH Partner Type", HCU_DISPLAY_AS_HTML); ?></label></div>
1565 <div
class=
"col-sm-6 col-xs-12"><div
id=
"achPartnerType" class=
"hcu-all-100" data-bind=
"value: achPartnerType" ></div></div>
1567 <div
class=
"form-group">
1568 <label
for=
"singleDisplayName" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Display Name", HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1569 <div
class=
"col-xs-12 col-sm-6">
1571 id=
"singleDisplayName" 1572 name=
"singleDisplayName" 1573 class=
"k-textbox hcu-all-100" 1575 data-bind=
"value: achDisplayName" 1576 validationMessage=
"<?php echo $MC->msg("ACH Unique display name required
", HCU_DISPLAY_AS_HTML) ?>" 1580 <div
class=
"form-group">
1581 <label
for=
"singleRecipientName" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"Name", HCU_DISPLAY_AS_HTML); ?></label>
1582 <div
class=
"col-xs-12 col-sm-6">
1583 <input type=
"text" id=
"singleRecipientName" class=
"k-textbox hcu-all-100" maxlength=
"100" data-bind=
"value: achIndividualName" />
1586 <div
class=
"form-group">
1587 <label
for=
"singleRecipientEmail" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH E-Mail", HCU_DISPLAY_AS_HTML); ?></label>
1588 <div
class=
"col-xs-12 col-sm-6">
1589 <input type=
"email" id=
"singleRecipientEmail" class=
"k-textbox hcu-all-100" maxlength=
"100" homecu-match=
"email" data-bind=
"value: achIndividualEmail" />
1591 <div
class=
"col-xs-12 col-sm-2">
1592 <div
class=
"checkbox"><label><input type=
"checkbox" data-bind=
"checked: achEmailNotify, events: {change: changeEmailNotify}" > <?php echo $MC->msg(
"Notify", HCU_DISPLAY_AS_HTML); ?> </label><span
class=
"fa fa-question-circle-o" id=
"achNotifyTip"></span></div>
1595 <div
class=
"form-group">
1596 <div
class=
"col-xs-12 h4"><?php echo $MC->msg(
"ACH Partner Address", HCU_DISPLAY_AS_HTML); ?></div>
1598 <div
class=
"form-group">
1599 <label
for=
"singleAddress1" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Address", HCU_DISPLAY_AS_HTML) .
" 1"; ?></label>
1600 <div
class=
"col-xs-12 col-sm-6">
1601 <input type=
"text" id=
"singleAddress1" class=
"k-textbox hcu-all-100" maxlength=
"100" data-bind=
"value: achAddress1" />
1604 <div
class=
"form-group">
1605 <label
for=
"singleAddress2" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Address", HCU_DISPLAY_AS_HTML) .
" 2"; ?></label>
1606 <div
class=
"col-xs-12 col-sm-6">
1607 <input type=
"text" id=
"singleAddress2" class=
"k-textbox hcu-all-100" maxlength=
"100" data-bind=
"value: achAddress2" />
1610 <div
class=
"form-group">
1611 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH CityStateZip", HCU_DISPLAY_AS_HTML); ?></label>
1612 <div
class=
"col-xs-12 col-sm-3">
1613 <input type=
"text" id=
"singleCity" class=
"k-textbox hcu-all-100" maxlength=
"30" data-bind=
"value: achCity" />
1615 <div
class=
"col-xs-12 col-sm-3">
1616 <input type=
"text" id=
"singleState" class=
"hcu-all-100" maxlength=
"20" data-bind=
"value: achState" />
1618 <div
class=
"col-xs-12 col-sm-3">
1619 <input type=
"text" id=
"singleZip" class=
"hcu-all-100" data-bind=
"value: achZip" />
1622 <div
class=
"form-group">
1623 <label
for=
"singleCountry" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Country", HCU_DISPLAY_AS_HTML); ?></label>
1624 <div
class=
"col-xs-12 col-sm-6">
1625 <input type=
"text" id=
"singleCountry" class=
"k-textbox hcu-all-100" maxlength=
"100" data-bind=
"value: achCountry" />
1628 <div
class=
"form-group">
1629 <div
class=
"hidden-xs col-sm-3"> </div>
1630 <div
class=
"col-xs-12 col-sm-6"><div
class=
"checkbox"><label><input type=
"checkbox" data-bind=
"checked: achUpdatePartner"> <?php echo $MC->msg(
"ACH Update Partner List", HCU_DISPLAY_AS_HTML); ?></label></div></div>
1633 <div
class=
"form-group">
1634 <div
class=
"hidden-xs col-sm-3"> </div>
1635 <div
class=
"col-xs-12 col-sm-6"><span
class=
"hcu-required-field"><sup>*</sup></span><?php echo $MC->msg(
"ACH Required", HCU_DISPLAY_AS_HTML); ?></div>
1643 <div
class=
"tabPayment tabHide" id=
"achLocal">
1644 <div
class=
"tabContents">
1645 <div
class=
"form-horizontal">
1646 <div
class=
"well well-sm">
1647 <div
class=
"form-group">
1648 <div
class=
"col-xs-12 h4"><?php echo $termActivity ?></div>
1650 <div
class=
"form-group">
1651 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $accountTypeWords ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1652 <div
class=
"col-xs-12 col-sm-9 col-md-6"><input
id=
"achSubAcctList" 1653 name=
"achSubAcctList" 1655 data-bind=
"value: achSubAcctSelected" 1656 validationMessage=
"<?php echo $MC->msg("Please select an account
", HCU_DISPLAY_AS_HTML) ?>" 1657 required=
"required" /></div>
1659 <div
class=
"form-group">
1660 <label
for=
"achAmount" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"Amount", HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1661 <div
class=
"col-xs-12 col-sm-4"><input
id=
"achAmount" 1665 data-bind=
"value: achAmount" 1666 validationMessage=
"<?php echo $MC->msg("ACH Amount needed
", HCU_DISPLAY_AS_HTML) ?>" 1667 /><span
class=
"k-invalid-msg" data-
for=
"achAmount"></span></div>
1669 <div
class=
"form-group">
1670 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Memo", HCU_DISPLAY_AS_HTML); ?></label>
1671 <div
class=
"col-xs-12 col-sm-9 col-md-6"><input type=
"text" 1672 class=
"k-textbox hcu-all-100" 1674 placeholder=
"<?php echo $MC->msg("ACH memo reminder
", HCU_DISPLAY_AS_HTML); ?>" 1675 data-bind=
"value: achMemo" /></div>
1677 <div
class=
"form-group" data-bind=
"visible: showEffectiveLabel">
1678 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'ACH Effective Date', HCU_DISPLAY_AS_HTML) ?></label>
1679 <div
class=
"col-xs-12 col-sm-2 local-text-offset">
1680 <span data-bind=
"text: achEffDate"></span>
1682 <div
class=
"col-xs-12 col-sm-7 hcu-secondary">
1683 <span
class=
"hcu-secondary-alt-text"><?php echo $achCutoffMessageString; ?></span>
1686 <div
class=
"form-group" data-bind=
"visible: showScheduleInputs">
1687 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'ACH Effective Date', HCU_DISPLAY_AS_HTML) ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1688 <div
class=
"col-xs-12 col-sm-4"><input
id=
"achEffDate" 1691 data-bind=
"value: achEffDate" 1692 data-min=
"achEffMin" 1694 homecu-dategtvalue=
"<?php echo $initialEffDate; ?>" 1695 homecu-dategttype=
"string" 1696 validationMessage=
"<?php echo $MC->msg("ACH Date in past
", HCU_DISPLAY_AS_HTML) ?>" 1697 data-required-msg=
"<?php echo $MC->msg("ACH Enter Effective Date
", HCU_DISPLAY_AS_HTML) ?>" 1699 <div
class=
"col-xs-12 col-sm-5 hcu-secondary">
1700 <span
class=
"hcu-secondary-alt-text"><?php echo $achCutoffMessageString; ?></span>
1703 <div
class=
"form-group" data-bind=
"visible: showScheduleInputs">
1704 <label
for=
"singleFrequencySelect" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'Repeat', HCU_DISPLAY_AS_HTML); ?></label>
1705 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achFrequencySelect" 1708 data-bind=
"value: achFrequency" /></div>
1710 <div
class=
"form-group" data-bind=
"visible: showContinue">
1711 <label
for=
"singleFrequencyContinue" class=
"col-xs-12 col-sm-3 control-label"></label>
1712 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achFrequencyContinue" 1715 data-bind=
"value: achContinue" /></div>
1717 <div
class=
"form-group" data-bind=
"visible: showEnd">
1718 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"End Date", HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1719 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achEndDate" 1721 class=
"hcu-xs-100-only" 1722 placeholder=
"e.g. MM/DD/YYYY" 1723 data-bind=
"value: achEndDate" 1725 homecu-dategtvalue=
"achEffDate" 1726 homecu-dategttype=
"field" 1727 validationMessage=
"<?php echo $MC->msg('Continue Until must be entered', HCU_DISPLAY_AS_HTML); ?>" 1728 data-homecuCustomMatch-msg=
"<?php echo $MC->msg('Transfer Continue Until', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('is not a valid date', HCU_DISPLAY_AS_HTML); ?>" 1729 data-homecuCustomDateGTValue-msg=
"<?php echo $MC->msg('Stop date after transfer', HCU_DISPLAY_AS_HTML); ?>"/></div>
1731 <div
class=
"form-group">
1732 <div
class=
"hidden-xs col-sm-3"> </div>
1733 <div
class=
"col-xs-12 col-sm-6"><span
class=
"hcu-required-field"><sup>*</sup></span><?php echo $MC->msg(
"ACH Required", HCU_DISPLAY_AS_HTML); ?></div>
1741 <div
class=
"tabPayment tabHide" id=
"achSingleRemote">
1742 <div
class=
"tabContents">
1743 <div
class=
"well well-sm form-horizontal">
1744 <div
class=
"form-group">
1745 <div
class=
"col-xs-12 h4"> <?php echo $MC->msg(
"ACH Remote Account", HCU_DISPLAY_AS_HTML); ?></div>
1747 <div
class=
"form-group">
1748 <label
for=
"singleRecipientRouting" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
"ACH Routing Number", HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1749 <div
class=
"col-xs-12 col-sm-6"><input
id=
"singleRecipientRouting" 1751 data-bind=
"value: achDFIRouting" 1754 validationMessage=
"<?php echo $MC->msg("ACH Routing number 9 digits
", HCU_DISPLAY_AS_HTML); ?>" 1757 <div
class=
"form-group">
1758 <label
for=
"singleRecipientAccount" class=
"col-xs-12 col-sm-3 control-label"><?php echo $dfiAccountWords ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1759 <div
class=
"col-xs-12 col-sm-6"><input type=
"text" 1760 id=
"singleRecipientAccount" 1761 class=
"k-textbox hcu-all-100 account-match" 1763 data-bind=
"value: achDFIAccount" 1764 validationMessage=
"<?php echo $MC->msg('ACH Need remote account', HCU_DISPLAY_AS_HTML); ?>" 1767 <div
class=
"form-group">
1768 <label
for=
"singleRecipientAccountConfirm" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'ACH Confirm Account', HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1769 <div
class=
"col-xs-12 col-sm-6"><input type=
"text" 1770 id=
"singleRecipientConfirm" 1771 class=
"k-textbox hcu-all-100 account-match" 1773 homecu-equals=
"account-match" 1774 data-homecuCustomEquals-msg=
"<?php echo $MC->msg('ACH Accounts no match', HCU_DISPLAY_AS_HTML); ?>" 1775 data-bind=
"value: achDFIConfirm" 1778 <div
class=
"form-group">
1779 <label
for=
"singleRecipientAccountType" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'Account Type', HCU_DISPLAY_AS_HTML); ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1780 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achAccountType" 1783 data-bind=
"value: achDFISelectedType" 1784 validationMessage=
"<?php echo $MC->msg('ACH Need remote account type', HCU_DISPLAY_AS_HTML) ?>" 1787 <div
class=
"form-group">
1788 <div
class=
"col-xs-12"> </div>
1790 <div
class=
"form-group">
1791 <label
for=
"singleRecipientAddenda" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'ACH Addenda', HCU_DISPLAY_AS_HTML) ?></label>
1792 <div
class=
"col-xs-12 col-sm-6">
1793 <input type=
"text" id=
"singleRecipientAddenda" class=
"k-textbox hcu-all-100" maxlength=
"100" placeholder=
"<?php echo $MC->msg('ACH Optional pmt msg', HCU_DISPLAY_AS_HTML) ?>" data-bind=
"value: achIndividualAddenda" />
1796 <div
class=
"form-group">
1797 <div
class=
"hidden-xs col-sm-3"> </div>
1798 <div
class=
"col-xs-12 col-sm-6"><span
class=
"hcu-required-field"><sup>*</sup></span><?php echo $MC->msg(
'ACH Required', HCU_DISPLAY_AS_HTML) ?></div>
1805 <div
class=
"tabPayment tabHide" id=
"achFrequency">
1806 <div
class=
"tabContents">
1807 <div
class=
"well well-sm form-horizontal">
1808 <div
class=
"form-group">
1809 <div
class=
"col-xs-12 h4"> <?php echo $MC->msg(
"ACH Frequency", HCU_DISPLAY_AS_HTML); ?></div>
1811 <div
class=
"form-group">
1812 <label
class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'ACH Effective Date', HCU_DISPLAY_AS_HTML) ?><span
class=
"hcu-required-field"><sup>*</sup></span></label>
1813 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achEffDate" 1815 class=
"hcu-xs-100-only" 1816 data-bind=
"value: achEffDate" 1818 homecu-dategtvalue=
"<?php echo date("m/d/y
") ?>" 1819 homecu-dategttype=
"string" 1820 validationMessage=
"<?php echo $MC->msg("ACH Date in past
", HCU_DISPLAY_AS_HTML) ?>" 1821 required=
"required" /></div>
1823 <div
class=
"form-group">
1824 <label
for=
"singleFrequencySelect" class=
"col-xs-12 col-sm-3 control-label"><?php echo $MC->msg(
'Repeat', HCU_DISPLAY_AS_HTML); ?></label>
1825 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achFrequencySelect" 1828 data-bind=
"value: achFrequency" /></div>
1830 <div
class=
"form-group" data-bind=
"visible: showContinue">
1831 <label
for=
"singleFrequencyContinue" class=
"col-xs-12 col-sm-3 control-label"></label>
1832 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achFrequencyContinue" 1835 data-bind=
"value: achContinue" /></div>
1837 <div
class=
"form-group" data-bind=
"visible: showEnd">
1838 <label
class=
"col-xs-12 col-sm-3 control-label">End Date<span
class=
"hcu-required-field"><sup>*</sup></span></label>
1839 <div
class=
"col-xs-12 col-sm-5"><input
id=
"achEndDate" 1841 class=
"hcu-xs-100-only" 1842 placeholder=
"e.g. MM/DD/YYYY" 1843 data-bind=
"value: achEndDate" 1845 homecu-dategtvalue=
"achEffDate" 1846 homecu-dategttype=
"field" 1847 data-required-msg=
"<?php echo $MC->msg('Continue Until must be entered', HCU_DISPLAY_AS_HTML); ?>" 1848 data-homecuCustomMatch-msg=
"<?php echo $MC->msg('Transfer Continue Until', HCU_DISPLAY_AS_HTML) . ' ' . $MC->msg('is not a valid date', HCU_DISPLAY_AS_HTML); ?>" 1849 data-homecuCustomDateGTValue-msg=
"<?php echo $MC->msg('Stop date after transfer', HCU_DISPLAY_AS_HTML); ?>"/></div>
1856 <div
class=
" tabFooter hcu-template">
1857 <div
class=
"hcu-edit-buttons k-state-default">
1858 <span
class=
"hcu-icon-delete">
1859 <a
id=
"backButton" class=
"k-link" data-bind=
"visible: showBack, events:{ click: backClick }"><?php echo $MC->msg(
'Back', HCU_DISPLAY_AS_HTML) ?></a>
1861 <a
class=
"k-button k-primary" id=
"nextButton" data-bind=
"disabled: disableSaveButton, events:{ click: nextClick }"><?php echo $MC->msg(
'Next', HCU_DISPLAY_AS_HTML) ?></a>
1866 <script
id=
"confirmationTemplate" type=
"text/x-kendo-tmpl">
1867 <div
id=
"confirmationStatus"></div>
1868 <div
id=
"responseDiv">
1869 <div
class=
"local-transfer-msg">
1870 <?php echo $MC->msg(
'ACH Single Posted', HCU_DISPLAY_AS_JS); ?>
1875 # for (i=0; i < data.length; i++ ) { # 1877 <div
class=
"col-xs-6 text-right">
1878 <span
class=
"response-label">#= data[i][
'label'] #:</span>
1880 <div
class=
"col-xs-6">
1881 <span
class=
"response-field">#= data[i][
'caption'] #</span>
1893 throw new Exception( HCU_JsonEncode( $MC->msg(
'Feature Unavailable', HCU_DISPLAY_AS_HTML) ), 915 );
1895 }
catch (Exception $ex) {
1898 $serviceErrorMsg = HCU_JsonDecode($ex->getMessage());
1900 $serviceErrorCode = $ex->getCode();
1902 require_once(dirname(__FILE__) .
'/../includes/hcuErrorPage.i');
1910 require_once(dirname(__FILE__) .
'/../includes/hcuPostContent.i');