12 function GetWorkflowOptions() {
15 array(
"text" =>
"Create Job",
"value" =>
"create"),
16 array(
"text" =>
"Associate Existing Job...",
"value" =>
"associate"),
17 array(
"text" =>
"Bill Without Job",
"value" =>
"without")
26 function GetMonthOptions() {
28 array(
"value" => 0,
"text" =>
"January"),
29 array(
"value" => 1,
"text" =>
"February"),
30 array(
"value" => 2,
"text" =>
"March"),
31 array(
"value" => 3,
"text" =>
"April"),
32 array(
"value" => 4,
"text" =>
"May"),
33 array(
"value" => 5,
"text" =>
"June"),
34 array(
"value" => 6,
"text" =>
"July"),
35 array(
"value" => 7,
"text" =>
"August"),
36 array(
"value" => 8,
"text" =>
"September"),
37 array(
"value" => 9,
"text" =>
"October"),
38 array(
"value" => 10,
"text" =>
"November"),
39 array(
"value" => 11,
"text" =>
"December")
47 function GetFrequencyOptions() {
49 array(
"value" => 0,
"text" =>
"Monthly"),
50 array(
"value" => 1,
"text" =>
"Semiyearly"),
51 array(
"value" => 2,
"text" =>
"Yearly")
61 function GetBillingItems() {
62 return array(
"Android" =>
"Android App Monthly Fee",
63 "AndroidSetup" =>
"Android App Setup Fee",
64 "CkImaging" =>
"Check Imaging Monthly Fee",
65 "CkSetup" =>
"Check Imaging Setup Fee",
66 "E2stmnt" =>
"E-Statements Tier Two",
67 "E3stmnt" =>
"E-Statements Tier Three",
68 "Email" =>
"Email Account",
69 "Estmnt" =>
"E-Statements Tier One",
70 "HBBatch" =>
"Home Banking Batch Monthly Fee",
71 "HBBatchSetup" =>
"Home Banking Batch Setup Fee",
72 "HBLive" =>
"Home Banking Live Monthly Fee",
73 "HBLiveSetup" =>
"Home Banking Live Setup Fee",
74 "HBUpgrade" =>
"Home Banking Desktop Upgrade",
75 "iPhone" =>
"iPhone App Monthly Fee",
76 "iPhoneSetup" =>
"iPhone App Setup Fee",
77 "IVR" =>
"IVR Monthly Fee",
78 "IVRSetup" =>
"IVR Setup",
79 "IVRUsage" =>
"IVR Monthly Usage - Per Minute",
80 "MWeb" =>
"Mobile Web Banking Monthly Fee",
81 "MWebSetup" =>
"Mobile Web Banking Setup Fee",
82 "PEmail" =>
"Premium Email Account",
83 "RDC" =>
"RDC Base Monthly Fee",
84 "RDCSetup" =>
"RDC Setup Fee",
85 "Secure" =>
"Secure Forms Monthly Hosting",
86 "SecureSetup" =>
"Secure Forms Setup Fee",
87 "SSL" =>
"SSL Certificate Monthly Hosting",
88 "SSLSetup" =>
"SSL Certificate Setup",
89 "SunsetWEB" =>
"HB Sunset Monthly Service Fee",
90 "TXT" =>
"TXT Banking Monthly Fee",
91 "TXTSetup" =>
"TXT Banking Setup Fee",
92 "WEB" =>
"Home Banking Monthly Service Fee",
93 "WebSetup" =>
"Website Development Setup",
94 "Timetrack" =>
"HTML/Support",
95 "EstmntSetup" =>
"E-Statement Setup",
96 "BillPaySetup" =>
"Bill-Pay Setup",
97 "Loan" =>
"Member Loan Approval",
98 "LoanSetup" =>
"Member Loan Approval Setup",
99 "SSLCert" =>
"SSL Certificate Purchase",
100 "Gold" =>
"Gold Monthly",
101 "GoldSetup" =>
"Gold Setup",
102 "Silver" =>
"Silver Monthly",
103 "SilverSetup" =>
"Silver Setup",
104 "Platinum" =>
"Platinum Monthly",
105 "PlatinumSetup" =>
"Platinum Setup",
106 "Intuit" =>
"Intuit Monthly",
107 "IntuitSetup" =>
"Intuit Setup",
108 "BillPay" =>
"Bill-Pay Monthly" 116 function GetTimetrackBillingItems() {
117 return array(
"cerise" =>
"HTML/Support",
118 "elaine" =>
"HTML/Support",
119 "gary" =>
"Gary Peters Programming Services",
120 "jayme" =>
"HTML/Graphics Design",
121 "joe" =>
"Joe Pearson Consulting Services",
122 "kim" =>
"Kim Langdon Programming Services",
123 "mark" =>
"Mark Stevens Programming Services",
124 "miki" =>
"Miki Hall Programming Services",
125 "test" =>
"TEST HTML/Support",
126 "tyler" =>
"HTML/Support",
127 "buddy" =>
"HTML/Support",
128 "nick" =>
"HTML/Support",
129 "lisa" =>
"HTML/Support",
130 "matt" =>
"HTML/Support");
146 function GetSetupRecurring() {
147 return array (
"Android" =>
"recurring",
148 "AndroidSetup" =>
"setup",
149 "CkImaging" =>
"recurring",
150 "CkSetup" =>
"setup",
151 "E2stmnt" =>
"recurring",
152 "E3stmnt" =>
"recurring",
153 "Email" =>
"recurring",
154 "Estmnt" =>
"recurring",
155 "HBBatch" =>
"recurring",
156 "HBBatchSetup" =>
"setup",
157 "HBLive" =>
"recurring",
158 "HBLiveSetup" =>
"setup",
159 "HBUpgrade" =>
"recurring",
160 "iPhone" =>
"recurring",
161 "iPhoneSetup" =>
"setup",
162 "IVR" =>
"recurring",
163 "IVRSetup" =>
"setup",
164 "IVRUsage" =>
"recurring",
165 "MWeb" =>
"recurring",
166 "MWebSetup" =>
"setup",
167 "PEmail" =>
"recurring",
168 "RDC" =>
"recurring",
169 "RDCSetup" =>
"setup",
170 "Secure" =>
"recurring",
171 "SecureSetup" =>
"setup",
172 "SSL" =>
"recurring",
173 "SSLSetup" =>
"setup",
174 "SunsetWEB" =>
"recurring",
175 "TXT" =>
"recurring",
176 "TXTSetup" =>
"setup",
177 "WEB" =>
"recurring",
178 "WebSetup" =>
"setup",
179 "Timetrack" =>
"recurring",
180 "HBUpgrade" =>
"setup",
181 "EstmntSetup" =>
"setup",
182 "BillPaySetup" =>
"setup",
183 "LoanSetup" =>
"setup",
184 "Loan" =>
"recurring",
185 "SSLCert" =>
"triggered",
186 "TestSetup" =>
"setup",
187 "Test" =>
"recurring",
188 "TestCert" =>
"triggered",
189 "Gold" =>
"recurring",
190 "Platinum" =>
"recurring",
191 "Silver" =>
"recurring",
192 "GoldSetup" =>
"setup",
193 "PlatinumSetup" =>
"setup",
194 "SilverSetup" =>
"setup",
195 "Intuit" =>
"recurring",
196 "IntuitSetup" =>
"setup",
197 "BillPay" =>
"recurring" 205 function GetFullLabelTypes() {
206 return array (
"regular",
"range",
"left",
"left and right",
"none",
"no qty1",
"no qty2");
213 function GetQuantityLabelTypeVariance() {
214 return array (
"SunsetWEB" => array(
"37" =>
"no qty2",
"67" =>
"left and right",
"69" =>
"left and right"),
215 "Estmnt" => array(
"107" =>
"none"),
216 "IVRUsage" => array(
"108" =>
"no qty2",
"109" =>
"no qty2"),
217 "SSL" => array(
"123" =>
"none",
"128" =>
"no qty2"),
218 "Secure" => array(
"129" =>
"no qty2"),
219 "RDC" => array(
"124" =>
"left and right")
227 function GetQuantityLabelType() {
228 return array (
"Android" =>
"left and right",
229 "E2stmnt" =>
"range",
230 "E3stmnt" =>
"range",
233 "HBLive" =>
"left and right",
234 "iPhone" =>
"left and right",
236 "Timetrack" =>
"none",
238 "IVRUsage" =>
"none",
239 "HBBatch" =>
"left and right",
240 "MWeb" =>
"left and right",
241 "CkImaging" =>
"none",
247 "Loan" =>
"left and right",
250 "Platinum" =>
"none",
260 function GetQuantityLabelsVariance() {
261 return array (
"SunsetWEB" => array(
"37" => array(
"If less than:",
"Members")),
262 "IVRUsage" => array(
"108" => array(
"Up to:",
"Minutes"),
"109" => array(
"After:",
"Minutes")),
263 "SSL" => array(
"128" => array(
"",
"Members")),
264 "Secure" => array(
"129" => array(
"",
"Members")));
271 function GetQuantityLabels() {
272 return array (
"Android" => array(
"For each",
"Members",
"Over",
""),
273 "RDC" => array(
"For each",
"Members",
"Over",
""),
274 "E2stmnt" => array(
"Estatements:"),
275 "E3stmnt" => array(
"Estatements:"),
276 "Estmnt" => array(
"Estatements:"),
277 "HBBatch" => array(
"For each",
"Members",
"Over",
""),
278 "HBLive" => array(
"For each",
"Members",
"Over",
""),
279 "iPhone" => array(
"For each",
"Members",
"Over",
""),
280 "MWeb" => array(
"For each",
"Members",
"Over",
""),
281 "Loan" => array(
"For each",
"Members",
"Over",
""),
282 "SSL" => array(
"Assets:"),
283 "SunsetWEB" => array(
"For each",
"Members",
"Over",
"")
291 function GetFixedVariableLabelTypeVariance() {
292 return array(
"Email" => array(
"11" =>
"none",
"84" =>
"no variable"),
293 "SunsetWEB" => array(
"37" =>
"no fixed"),
294 "Estmnt" => array(
"107" =>
"no variable"),
295 "IVRUsage" => array(
"109" =>
"no fixed"),
296 "CkImaging" => array(
"7" =>
"no variable",
"125" =>
"no fixed"),
297 "RDC" => array(
"47" =>
"no variable",
"124" =>
"regular"),
298 "Secure" => array(
"63" =>
"no variable",
"127" =>
"no fixed",
"129" =>
"regular"),
299 "WEB" => array(
"51" =>
"no variable",
"126" =>
"no fixed"),
300 "SSL" => array(
"123" =>
"no fixed",
"128" =>
"regular"),
301 "Gold" => array(
"113" =>
"no fixed",
"120" =>
"no variable"),
302 "Platinum" => array(
"117" =>
"no fixed",
"121" =>
"no variable"),
303 "Silver" => array(
"115" =>
"no fixed",
"122" =>
"no variable"),
304 "BillPay" => array(
"135" =>
"no variable",
"136" =>
"no variable"));
311 function GetFixedVariableLabelType() {
312 return array(
"Timetrack" =>
"left",
314 "SSL" =>
"no variable",
315 "Estmnt" =>
"no fixed",
316 "E2stmnt" =>
"no fixed",
317 "E3stmnt" =>
"no fixed",
318 "IVR" =>
"no variable",
319 "TXT" =>
"no variable",
320 "IVRUsage" =>
"left",
321 "Intuit" =>
"no variable",
322 "BillPay" =>
"no fixed",
331 function GetFixedVariableLabelsVariance() {
332 return array(
"IVRUsage" => array(
"21" => array(
"Base:",
"Per Call:"),
"109" => array(
"Per Minute:")),
333 "Estmnt" => array(
"3" => array(
"Per Statement:"),
"83" => array(
"Per Statement:"),
"82" => array(
"Per Statement:")),
334 "CkImaging" => array(
"125" => array(
"If less than or equal to:",
"If greater than:")),
335 "Secure" => array(
"127" => array(
"Per Member:"),
"129" => array(
"If less than or equal to:",
"If greater than:")),
336 "SSL" => array(
"123" => array(
"Per Member:")),
337 "Gold" => array(
"113" => array(
"Per Member:")),
338 "Silver" => array(
"115" => array(
"Per Member:")),
339 "Platinum" => array(
"117" => array(
"Per Member:")),
340 "SSL" => array(
"128" => array(
"If less than or equal to:",
"If greater than:")),
341 "BillPay" => array(
"137" => array(
"Per Transaction Fee:"),
"138" => array(
"Per stop and reissue fee:"),
"139" => array(
"Per letter mailed express mail:"),
342 "140" => array(
"Per NSF fee:"),
"141" => array(
"Per proof of payment:"))
350 function GetFixedVariableLabels() {
351 return array(
"Timetrack" => array(
"Bill Rate:",
"Rush Rate:"),
352 "E2stmnt" => array(
"Per Statement:"),
353 "E3stmnt" => array(
"Per Statement:"),
354 "IVRUsage" => array(
"Base:",
"Per Minute:"),
355 "RDC" => array(
"Fixed:",
"Variable:")
364 function GetAutomaticProductAddConfigOptions() {
365 return array(
"HBLive" => array(
"HBLive1" =>
"Regular",
"HBLive2" =>
"With Sunset"),
366 "HBBatch" => array(
"HBBatch1" =>
"Regular",
"HBBatch2" =>
"With Sunset"),
367 "IVR VOIP" => array(
"IVR VOIP1" =>
"Per Minute",
"IVR VOIP2" =>
"Per Call",
"IVR VOIP3" =>
"Tiered Minutes"),
368 "ESP" => array(
"ESP1" =>
"Tiered",
"ESP2" =>
"Fixed per count",
"ESP4" =>
"Fixed Rate",
"ESP3" =>
"Free"),
369 "Gold" => array(
"Gold1" =>
"Regular Pricing",
"Gold2" =>
"Small Credit Unions"),
370 "Platinum" => array(
"Platinum1" =>
"Regular Pricing",
"Platinum2" =>
"Small Credit Unions"),
371 "Silver" => array(
"Silver1" =>
"Regular Pricing",
"Silver2" =>
"Small Credit Unions"),
372 "WEBS" => array(
"WEBS1" =>
"Fixed Rate",
"WEBS2" =>
"Based on membership"),
373 "SSL" => array(
"SSL1" =>
"Per Member",
"SSL2" =>
"Flat on membership size"),
374 "SecForm" => array(
"SecForm1" =>
"Per Member",
"SecForm2" =>
"Flat on membership size"),
375 "BP" => array(
"BP1" =>
"Setup only",
"BP2" =>
"iPay"),
376 "RDC" => array(
"RDC1" =>
"Flat Fee",
"RDC2" =>
"Based on membership"));
383 function GetUseDNID() {
384 return array(
"IVRUsage" =>
true);
391 function GetUseDNIDProduct() {
392 return array(
"IVR VOIP" =>
true);
400 function GetSaveDigits() {
401 return array(
"IVRUsage" => 3,
"Gold" => 3,
"Platinum" => 3,
"Silver" => 3);
408 function GetAutomaticProductAdds() {
409 $returnArray = array (
"ESP1" => array(array(
"billingId" =>
"EstmntSetup",
"salesItemId" => 101),
410 array(
"billingId" =>
"Estmnt",
"salesItemId" => 3),
411 array(
"billingId" =>
"E2stmnt",
"salesItemId" => 5),
412 array(
"billingId" =>
"E3stmnt",
"salesItemId" => 23)),
413 "ESP2" => array(array(
"billingId" =>
"EstmntSetup",
"salesItemId" => 101),
414 array(
"billingId" =>
"Estmnt",
"salesItemId" => 82)),
415 "ESP3" => array(array(
"billingId" =>
"EstmntSetup",
"salesItemId" => 101),
416 array(
"billingId" =>
"Estmnt",
"salesItemId" => 83)),
417 "ESP4" => array(array(
"billingId" =>
"EstmntSetup",
"salesItemId" => 101),
418 array(
"billingId" =>
"Estmnt",
"salesItemId" => 107)),
419 "HBBatch1" => array(array(
"billingId" =>
"HBBatchSetup",
"salesItemId" => 31),
420 array(
"billingId" =>
"HBBatch",
"salesItemId" => 2)),
421 "HBLive1" => array(array(
"billingId" =>
"HBLiveSetup",
"salesItemId" => 35),
422 array(
"billingId" =>
"HBLive",
"salesItemId" => 33)),
423 "HBBatch2" => array(array(
"billingId" =>
"HBBatchSetup",
"salesItemId" => 31),
424 array(
"billingId" =>
"SunsetWEB",
"salesItemId" => 37),
425 array(
"billingId" =>
"SunsetWEB",
"salesItemId" => 67)),
426 "HBLive2" => array(array(
"billingId" =>
"HBLiveSetup",
"salesItemId" => 35),
427 array(
"billingId" =>
"SunsetWEB",
"salesItemId" => 69)),
428 "UpgradeBL" => array(array(
"billingId" =>
"HBUpgrade",
"salesItemId" => 91)),
429 "IMG" => array(array(
"billingId" =>
"CkSetup",
"salesItemId" => 41),
430 array(
"billingId" =>
"CkImaging",
"salesItemId" => 7)),
431 "IVR" => array(array(
"billingId" =>
"IVRSetup",
"salesItemId" => 39),
432 array(
"billingId" =>
"IVR",
"salesItemId" => 17)),
433 "MBLADA" => array(array(
"billingId" =>
"AndroidSetup",
"salesItemId" => 1),
434 array(
"billingId" =>
"Android",
"salesItemId" => 4)),
435 "MBLAPP" => array(array(
"billingId" =>
"iPhoneSetup",
"salesItemId" => 15),
436 array(
"billingId" =>
"iPhone",
"salesItemId" => 13)),
437 "MBLTXT" => array(array(
"billingId" =>
"TXTSetup",
"salesItemId" => 29),
438 array(
"billingId" =>
"TXT",
"salesItemId" => 27)),
439 "MBLWEB" => array(array(
"billingId" =>
"MWebSetup",
"salesItemId" => 45),
440 array(
"billingId" =>
"MWeb",
"salesItemId" => 43)),
441 "RDC1" => array(array(
"billingId" =>
"RDCSetup",
"salesItemId" => 49),
442 array(
"billingId" =>
"RDC",
"salesItemId" => 47)),
443 "RDC2" => array(array(
"billingId" =>
"RDCSetup",
"salesItemId" => 49),
444 array(
"billingId" =>
"RDC",
"salesItemId" => 124)),
445 "SSL1" => array(array(
"billingId" =>
"SSLSetup",
"salesItemId" => 59),
446 array(
"billingId" =>
"SSL",
"salesItemId" => 123),
447 array(
"billingId" =>
"SSL",
"salesItemId" => 106)),
448 "SSL2" => array(array(
"billingId" =>
"SSLSetup",
"salesItemId" => 59),
449 array(
"billingId" =>
"SSL",
"salesItemId" => 128),
450 array(
"billingId" =>
"SSL",
"salesItemId" => 106)),
451 "SecForm1" => array(array(
"billingId" =>
"SecureSetup",
"salesItemId" => 61),
452 array(
"billingId" =>
"Secure",
"salesItemId" => 127)),
453 "SecForm2" => array(array(
"billingId" =>
"SecureSetup",
"salesItemId" => 61),
454 array(
"billingId" =>
"Secure",
"salesItemId" => 129)),
455 "WEBS1" => array(array(
"billingId" =>
"WebSetup",
"salesItemId" => 53),
456 array(
"billingId" =>
"WEB",
"salesItemId" => 51)),
457 "WEBS2" => array(array(
"billingId" =>
"WebSetup",
"salesItemId" => 53),
458 array(
"billingId" =>
"WEB",
"salesItemId" => 126)),
459 "IVR VOIP1" => array(array(
"billingId" =>
"IVRSetup",
"salesItemId" => 70),
460 array(
"billingId" =>
"IVRUsage",
"salesItemId" => 19)),
461 "IVR VOIP2" => array(array(
"billingId" =>
"IVRSetup",
"salesItemId" => 70),
462 array(
"billingId" =>
"IVRUsage",
"salesItemId" => 21)),
463 "IVR VOIP3" => array(array(
"billingId" =>
"IVRSetup",
"salesItemId" => 70),
464 array(
"billingId" =>
"IVRUsage",
"salesItemId" => 108),
465 array(
"billingId" =>
"IVRUsage",
"salesItemId" => 109)),
466 "Email" => array(array(
"billingId" =>
"Email",
"salesItemId" => 11),
467 array(
"billingId" =>
"PEmail",
"salesItemId" => 55)),
468 "BP1" => array(array(
"billingId" =>
"BillPaySetup",
"salesItemId" => 99)),
469 "BP2" => array(array(
"billingId" =>
"BillPaySetup",
"salesItemId" => 134),
470 array(
"billingId" =>
"BillPay",
"salesItemId" => 135),
471 array(
"billingId" =>
"BillPay",
"salesItemId" => 136),
472 array(
"billingId" =>
"BillPay",
"salesItemId" => 137),
473 array(
"billingId" =>
"BillPay",
"salesItemId" => 138),
474 array(
"billingId" =>
"BillPay",
"salesItemId" => 139),
475 array(
"billingId" =>
"BillPay",
"salesItemId" => 140),
476 array(
"billingId" =>
"BillPay",
"salesItemId" => 141)),
477 "MBLLNAPP" => array(array(
"billingId" =>
"LoanSetup",
"salesItemId" => 105),
478 array(
"billingId" =>
"Loan",
"salesItemId" => 104)),
479 "Gold1" => array(array(
"billingId" =>
"GoldSetup",
"salesItemId" => 114),
480 array(
"billingId" =>
"Gold",
"salesItemId" => 113)),
481 "Silver1" => array(array(
"billingId" =>
"SilverSetup",
"salesItemId" => 116),
482 array(
"billingId" =>
"Silver",
"salesItemId" => 115)),
483 "Platinum1" => array(array(
"billingId" =>
"PlatinumSetup",
"salesItemId" => 118),
484 array(
"billingId" =>
"Platinum",
"salesItemId" => 117)),
485 "Gold2" => array(array(
"billingId" =>
"GoldSetup",
"salesItemId" => 114),
486 array(
"billingId" =>
"Gold",
"salesItemId" => 120)),
487 "Silver2" => array(array(
"billingId" =>
"SilverSetup",
"salesItemId" => 116),
488 array(
"billingId" =>
"Silver",
"salesItemId" => 122)),
489 "Platinum2" => array(array(
"billingId" =>
"PlatinumSetup",
"salesItemId" => 118),
490 array(
"billingId" =>
"Platinum",
"salesItemId" => 121)),
491 "Intuit" => array(array(
"billingId" =>
"IntuitSetup",
"salesItemId" => 132),
492 array(
"billingId" =>
"Intuit",
"salesItemId" => 133))
502 function GetNeedsOverlapCheck() {
503 return array(
"check" => array(
"ESP"),
"not" => array(123, 107, 82, 83));
510 function GetCountLabelVariance() {
511 return array(
"SunsetWEB" => array(
"67" =>
"Members",
"37" =>
"Members",
"69" =>
"Fee(s)"),
512 "Estmnt" => array(
"83" =>
"Fee(s)",
"82" =>
"E-Statements",
"3" =>
"E-Statements",
"107" =>
"Fee(s)"),
513 "IVRUsage" => array(
"21" =>
"Calls"),
514 "Email" => array(
"11" =>
"Accounts",
"84" =>
"Credit"),
515 "CkImaging" => array(
"125" =>
"Fee (s)"),
516 "RDC" => array(
"124" =>
"Fee (s)"),
517 "Secure" => array(
"127" =>
"Members",
"129" =>
"Flat Fee"),
518 "WEB" => array(
"126" =>
"Members"),
519 "SSL" => array(
"123" =>
"Members",
"128" =>
"Flat Fee"),
520 "Gold" => array(
"120" =>
"Flat Fee",
"113" =>
"Members"),
521 "Silver" => array(
"122" =>
"Flat Fee",
"115" =>
"Members"),
522 "Platinum" => array(
"121" =>
"Flat Fee",
"117" =>
"Members"),
523 "SecForm" => array(
"129" =>
"Flat Fee"),
524 "BillPay" => array(
"135" =>
"Flat Fee",
"136" =>
"Flat Fee (annual)",
"137" =>
"Transactions",
525 "138" =>
"Stop and reissues",
"139" =>
"Express mail",
"140" =>
"NSFs",
526 "141" =>
"Proof of payments")
536 function GetCountLabels() {
537 return array(
"Android" =>
"Fee(s)",
538 "AndroidSetup" =>
"Setup",
539 "CkImaging" =>
"Flat Fee",
540 "CkSetup" =>
"Setup",
541 "E2stmnt" =>
"E-Statements",
542 "E3stmnt" =>
"E-Statements",
543 "HBBatch" =>
"Fee(s)",
544 "HBBatchSetup" =>
"Setup",
545 "HBLive" =>
"Fee(s)",
546 "HBLiveSetup" =>
"Setup",
547 "HBUpgrade" =>
"Fee(s)",
548 "iPhone" =>
"Fee(s)",
549 "iPhoneSetup" =>
"Setup",
551 "IVRSetup" =>
"Setup",
553 "MWebSetup" =>
"Setup",
554 "PEmail" =>
"Accounts",
556 "RDCSetup" =>
"Setup",
557 "Secure" =>
"Flat Fee",
558 "SecureSetup" =>
"Setup",
559 "SSL" =>
"Conditional Fee(s)",
560 "SSLSetup" =>
"Setup",
562 "TXTSetup" =>
"Setup",
564 "WebSetup" =>
"Setup",
565 "BillPaySetup" =>
"Setup",
566 "EstmntSetup" =>
"Setup",
567 "LoanSetup" =>
"Setup",
570 "IVRUsage" =>
"Minutes",
571 "GoldSetup" =>
"Setup",
572 "SilverSetup" =>
"Setup",
573 "PlatinumSetup" =>
"Setup",
574 "IntuitSetup" =>
"Setup",
575 "Intuit" =>
"Flat Fee" 594 function GetTextDescription($salesItemId, $billingId, $fixed, $variable, $qty1, $qty2, $aDNID) {
595 $formattedQty1 = number_format($qty1);
596 $formattedQty2 = number_format($qty2);
598 $saveDigits = GetSaveDigits();
599 $digits = HCU_array_key_value($billingId, $saveDigits);
600 $digits = $digits ===
false ? 2 : intval($digits);
602 $formattedFixed = $fixed < 0 ?
"$(" . number_format(abs($fixed), $digits) .
")" :
"$" . number_format($fixed, $digits);
603 $formattedVariable = $variable < 0 ?
"$(" . number_format(abs($variable), $digits) .
")" :
"$" . number_format($variable, $digits);
605 $flatSunsetRate = $fixed == 0 ?
"" :
"a flat fee of $formattedFixed per month then";
606 $flatRate = $fixed == 0 ?
"" :
"$formattedFixed per mo. plus";
607 $over = $qty2 == 0 ?
"" :
" over $formattedQty2";
608 $variableSunsetText =
"$formattedQty1 to $formattedQty2 total membership $flatRate $formattedVariable per mo. " 609 .
"for each $formattedQty1 members (or portion thereof)${over}.";
610 $variableText =
"$flatRate $formattedVariable per mo. for each $formattedQty1 members (or portion thereof)${over}.";
611 $fixedText =
"Fixed fee of $formattedFixed.";
613 switch ($billingId) {
614 case "E2stmnt":
return "E-Statements $formattedVariable each $formattedQty1 to $formattedQty2 members.";
615 case "E3stmnt":
return "E-Statements $formattedVariable after $formattedQty1 members.";
617 if ($salesItemId == 3) {
618 return "E-Statements $formattedVariable per the first $formattedQty2 members.";
619 }
else if ($salesItemId == 82) {
620 return "$formattedVariable per E-Statement.";
621 }
else if ($salesItemId == 83) {
622 return "Free E-Statements.";
623 }
else if ($salesItemId == 107) {
624 return "Monthly fee of $formattedFixed";
629 if ($salesItemId == 37) {
630 return "Fewer than $formattedQty1 total membership $formattedVariable per member per month.";
631 }
else if ($salesItemId == 67) {
632 return $variableSunsetText;
633 }
else if ($salesItemId == 69) {
634 return $variableText;
656 case "PlatinumSetup":
666 return '$1 per email account.';
668 return '$1-$3 bump per premium email account (based on premium type).';
670 if ($salesItemId == 123) {
671 return "$formattedVariable per member.";
672 }
else if ($salesItemId == 128) {
673 return "$formattedFixed is less than or equal to $formattedQty1 members. $formattedVariable if more members than $formattedQty1.";
676 $text =
"Monthly fee of $formattedFixed";
678 $text = $qty2 == -1 ?
"$text." :
"$text where number of assets is less than $formattedQty2.";
680 $text = $qty2 == -1 ?
"$text where number of assets is more than $formattedQty1." 681 :
"$text where number of assets is between $formattedQty1 and $formattedQty2.";
686 if ($salesItemId == 129) {
687 return "$formattedFixed is less than or equal to $formattedQty1 members. $formattedVariable if more members than $formattedQty1.";
688 }
else if ($salesItemId == 127) {
689 return "$formattedVariable per member.";
694 return $salesItemId >= 123 ? $variableText : $fixedText;
698 if ($salesItemId >= 123) {
699 return "$formattedVariable per member.";
704 return "HTML Support. $formattedFixed per billable hours. $formattedVariable per rush hours.";
711 return $variableText;
713 $textDNID = $aDNID !=
"" ?
"for number $aDNID." :
"for all numbers.";
714 $text =
"$flatSunsetRate $formattedVariable";
715 if ($salesItemId == 19) {
716 return "$text per minute $textDNID";
717 }
else if ($salesItemId == 21) {
718 return "$text per call $textDNID";
719 }
else if ($salesItemId == 108) {
720 return "$text per minute up to $formattedQty1 minutes $textDNID";
721 }
else if ($salesItemId == 109) {
722 return "$formattedVariable per minute after $formattedQty1 minutes $textDNID";
727 return "$formattedFixed when completed in workflow.";
731 if ($salesItemId >= 120) {
734 return "$formattedVariable per member.";
737 if (in_array($salesItemId, array(134, 135, 136))) {
739 }
else if ($salesItemId == 137) {
740 return "$formattedVariable per transaction fee";
741 }
else if ($salesItemId == 138) {
742 return "$formattedVariable per stop and reissue fee";
743 }
else if ($salesItemId == 139) {
744 return "$formattedVariable per letter mailed express mail";
745 }
else if ($salesItemId == 140) {
746 return "$formattedVariable per NSF fee";
747 }
else if ($salesItemId == 141) {
748 return "$formattedVariable per standard proof of payment";
769 function GetInitialRecurringCosts($salesItemId, $billingId, $fixed, $variable, $qty1, $qty2) {
770 $formattedQty1 = number_format($qty1);
771 $formattedQty2 = number_format($qty2);
773 $saveDigits = GetSaveDigits();
774 $digits = HCU_array_key_value($billingId, $saveDigits);
775 $digits = $digits ===
false ? 2 : intval($digits);
777 $formattedFixed = $fixed < 0 ?
"$(" . number_format(abs($fixed), $digits) .
")" :
"$" . number_format($fixed, $digits);
778 $formattedVariable = $variable < 0 ?
"$(" . number_format(abs($variable), $digits) .
")" :
"$" . number_format($variable, $digits);
780 switch ($billingId) {
782 if ($salesItemId == 3) {
783 return array(
"",
"(Variable)");
784 }
else if ($salesItemId == 82) {
785 return array(
"",
"$formattedVariable per mo. per E-Statement");
786 }
else if ($salesItemId == 83) {
787 return array(
"",
"Free");
804 return array($formattedFixed,
"");
812 return array(
"",
"$formattedFixed per mo.");
820 return array(
"",
"(Variable)");
826 return array(
"",
"$formattedVariable per member per mo.");
828 return array(
"",
"");
836 function GetBillingStatuses() {
837 return array(
"Ready to Bill Half",
"Pending",
"Active",
"Completed");
844 function GetSetupBillingOptions() {
845 return array(array(
"text" =>
"Bill Full",
"value" =>
"full"),
846 array(
"text" =>
"Bill Full Upfront",
"value" =>
"upfront"),
847 array(
"text" =>
"Check Received",
"value" =>
"partial"),
848 array(
"text" =>
"Bill Half",
"value" =>
"future"),
849 array(
"text" =>
"No Setup Record",
"value" =>
"nosetup"));
867 function GetBillingStatusLabel ($billingStatus, $startDate, $endDate, $setupLabel, $gridType =
"") {
870 $billingStatusGroup = -1;
871 if ($setupLabel ==
"triggered" && $billingStatus == 1) {
872 $billingStatusGroup = 1;
873 $statusLabel =
"Not triggered";
875 $billingStatusLabels = GetBillingStatuses();
876 $statusLabel = HCU_array_key_value($billingStatus, $billingStatusLabels);
878 if ($billingStatus == 2 || $billingStatus == 3) {
879 $startDateTime =
new DateTime($startDate);
880 $formattedStartDate = $startDateTime->format(
"m/Y");
881 $now =
new DateTime();
882 $nextMonth =
new DateTime();
883 $m = $now->format(
"m");
884 $Y = $now->format(
"Y");
885 $now->setDate($Y, $m, 1);
886 $nextMonth->setDate($Y, $m + 1, 1);
887 $beforeStartDate = $now < $startDateTime;
888 $startingThisMonth = $now->format(
"m/Y") == $startDateTime->format(
"m/Y");
890 if ($endDate !=
"") {
891 $endDateTime =
new DateTime($endDate);
892 $afterEndDate = $now > $endDateTime;
893 $endingThisMonth = $now->format(
"m/Y") == $endDateTime->format(
"m/Y");
894 $endingNextMonth = $nextMonth->format(
"m/Y") == $endDateTime->format(
"m/Y");
896 $afterEndDate =
false;
897 $endingThisMonth =
false;
898 $endingNextMonth =
false;
901 if ($gridType ==
"completed" && !$afterEndDate) {
902 $statusLabel =
"Reactivated";
903 }
else if ($setupLabel ==
"triggered") {
904 $billingStatusGroup = 0;
905 $statusLabel =
"Triggered $formattedStartDate";
906 }
else if ($beforeStartDate || $startingThisMonth || $gridType ==
"pending") {
907 if ($setupLabel ==
"recurring") {
908 $statusLabel =
"Starting $formattedStartDate";
910 $statusLabel =
"On $formattedStartDate";
913 $billingStatusGroup = 1;
914 }
else if ($endingThisMonth) {
915 $statusLabel =
"Ending this month";
916 $billingStatusGroup = 0;
917 }
else if ($endingNextMonth) {
918 $statusLabel =
"Ending next month";
919 $billingStatusGroup = 0;
920 }
else if ($afterEndDate) {
921 $statusLabel =
"Completed";
922 $billingStatusGroup = 2;
924 $statusLabel =
"Active";
925 $billingStatusGroup = 0;
928 $billingStatusGroup = 1;
929 if ($billingStatus == 0) {
930 $statusLabel =
"Pending Workflow, Billing Half";
931 }
else if ($billingStatus == 1) {
932 switch($setupLabel) {
934 $statusLabel =
"Pending Workflow";
937 $statusLabel =
"Pending";
940 }
else if ($billingStatus == 4 || $billingStatus == 5) {
941 $statusLabel =
"No Workflow";
943 $statusLabel =
"Unknown Status";
948 $returnArray = array(
"status" =>
"000",
"error" =>
"",
"data" => array(
"statusLabel" => $statusLabel,
"billingStatusGroup" => $billingStatusGroup));
949 }
catch (exception $e) {
950 $returnArray = array(
"status" => $e->getCode(),
"error" => $e->getMessage());
968 function GetHalfBillingStatus($setup, $billHalf, $partiallyBilledDate, $startDate) {
972 $statusLabel =
"N/A";
973 }
else if ($billHalf ==
"Y") {
974 if ($partiallyBilledDate ==
null || $partiallyBilledDate ==
"") {
975 throw new exception (
"Partially Billed Date is required.", 1);
977 $dateTime =
new DateTime($partiallyBilledDate);
978 $dateFormat = $dateTime->format(
"m/Y");
979 $statusLabel = $dateFormat;
980 }
else if ($partiallyBilledDate !=
null && $partiallyBilledDate !=
"") {
981 $dateTime =
new DateTime($startDate);
982 $dateFormat = $dateTime->format(
"m/Y");
983 $statusLabel =
"Credited";
985 $statusLabel =
"N/A";
988 $returnArray = array(
"status" =>
"000",
"error" =>
"",
"data" => array(
"statusLabel" => $statusLabel));
989 }
catch (exception $e) {
990 $returnArray = array(
"status" => $e->getCode(),
"error" => $e->getMessage());
1005 function GetFrequencyLabel($billsOnInt, $setup) {
1006 $frequencyLabel =
"";
1008 if ($setup ==
"triggered") {
1009 $frequencyLabel =
"Triggered";
1010 }
else if ($setup !=
"setup") {
1011 $billsOnInt &= 4095;
1012 if ($billsOnInt == 4095) {
1013 $frequencyLabel =
"Monthly";
1015 $months = array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December");
1017 $usedMonths = array();
1019 for($i = 0, $count = count($months); $i != $count; $i++) {
1020 if (($billsOnInt & $digit) != 0) {
1021 $usedMonths[] = $months[$i];
1023 $billsOnInt &= ~$digit;
1025 if ($billsOnInt == 0) {
1030 $count = count($usedMonths);
1031 if ($count == 0 || $count == 12) {
1032 $frequencyLabel =
"Monthly";
1033 }
else if ($count <= 2) {
1034 $frequencyLabel =
"Bills on " . implode($usedMonths,
" and ") .
".";
1035 $billsOnKendo = implode($usedIs,
",");
1037 $usedMonths [$count - 1] =
"and " . $usedMonths [$count - 1];
1038 $frequencyLabel =
"Bills on " . implode($usedMonths,
", ") .
".";
1039 $billsOnKendo = implode($usedIs,
",");
1044 return array(
"data" => array(
"frequencyLabel" => $frequencyLabel,
"billsOnKendo" => $billsOnKendo));
1058 function GetFrequencyBillsOn($billsOn) {
1063 if ($billsOn !=
"") {
1064 $billsOnDecoded = HCU_JsonDecode($billsOn);
1065 $number = count($billsOnDecoded);
1080 foreach($billsOnDecoded as $num) {
1081 if (!is_numeric($num)) {
1082 throw new exception(
"Bills on array needs to be all integers.", 1);
1084 if (intval($num) < 0 || intval($num) > 11) {
1085 throw new exception(
"Bills on array needs to correspond to the months.", 2);
1089 $billsOnInt |= $digit;
1096 $returnArray = array(
"status" =>
"000",
"error" =>
"",
"data" => array(
"frequency" => $frequency,
"billsOnInt" => $billsOnInt));
1097 }
catch (exception $e) {
1098 $returnArray = array(
"status" => $e->getCode(),
"error" => $e->getMessage());
1100 return $returnArray;