18 protected $cu =
'SCRUBSCU';
41 for ($i = 0; $i < $count; $i++) {
42 if (isset($map[$i][
'detailid'])) {
43 unset($map[$i][
'detailid']);
46 $map[$i][
'loanid'] = $loan_id;
50 'lnappschemadetail' => $map
65 'lnappschemamaster' => [
68 'loantitle' =>
"{$row['b_fname']} {$row['b_lname']} {$row['loan_purpose']} Loan",
69 'loandisclosure_fragment' =>
'',
70 'lastmodified' => $dt->format(
'Y-m-d')
85 $qids = [rand(50, 65)];
87 while (count($qids) < 3) {
91 foreach ($qids as $id) {
95 'user_answer' => $test_credentials
99 return [
'lnappuser_questselect' => $insert];
111 if (! in_array($id, $arr)) {
112 array_push($arr, $id);
129 'email' => $row[
'b_email'],
130 'pwd' => password_hash($test_credentials, PASSWORD_DEFAULT),
133 'confidenceword' => $test_credentials,
134 'failedloginattempts' => 0,
135 'challenge_quest_id' => -1,
136 'userlogintype' =>
null,
137 'banking_user_id' => 0,
138 'session_account' => null
154 $dt =
new DateTime();
155 $date = $dt->format(
'Y-m-d');
159 'lnappuserresponse' => [
161 'userid' => $user_id,
162 'loanid' => $loan_id,
164 'respcomments' =>
'',
165 'respcoreloanappid' => -1,
166 'respstarton' => $date,
167 'respsubmiton' =>
null,
168 'respmodifiedon' => $date,
169 'respfname' => $row[
'b_fname'],
170 'resplname' => $row[
'b_lname'],
171 'respmname' => $row[
'b_mname'],
172 'respssn' => $row[
'b_ssn'],
173 'respdob' => $row[
'b_dob'],
177 'respstatusdesc' =>
null,
178 'respamt' => $row[
'loan_amount'],
179 'resplastinquire' => null
202 return json_encode($mapped);
223 foreach ($row as $key => $value) {
224 if (array_key_exists($key, $json_map)) {
225 $data[$json_map[$key]] = $value;
242 foreach ($row as $field => $value) {
252 $map[$field] =
'formfield_' . $id;
267 foreach ($tpl as $arr) {
271 if (empty($field_attr)) {
276 return $arr[
'detailid'];
291 if (empty($field_arr)) {
296 array_key_exists(
'fieldattr', $field_arr) &&
297 ! empty($field_arr[
'fieldattr'])
302 return json_decode($field_arr[
'fieldattr'], 1);
315 $local = (array_key_exists(
'responsetablefield', $field_attr))? $field_attr[
'responsetablefield'] :
null;
316 $core = (array_key_exists(
'fieldcorename', $field_attr))? $field_attr[
'fieldcorename'] :
null;
318 if (! ($local || $core)) {
323 'product' => [
'local' =>
null,
'core' =>
'productname'],
324 'loan_purpose' => [
'local' =>
null,
'core' =>
'lnpurpose'],
325 'loan_type' => [
'local' =>
null,
'core' =>
'loantype'],
327 'app_started' => [
'local' =>
null,
'core' =>
null],
328 'loan_amount' => [
'local' =>
'respamt',
'core' =>
'amtreqd'],
329 'individual_joint' => [
'local' =>
null,
'core' =>
'indvjoint'],
330 'disab_ins' => [
'local' =>
null,
'core' =>
'appcdioption'],
331 'credit_ins' => [
'local' =>
null,
'core' =>
'appclioption'],
332 'b_fname' => [
'local' =>
'respfname',
'core' =>
'dms_appfname'],
333 'b_mname' => [
'local' =>
'respmname',
'core' =>
'dms_appmname'],
334 'b_lname' => [
'local' =>
'resplname',
'core' =>
'dms_applname'],
335 'b_ssn' => [
'local' =>
'respssn',
'core' =>
'dms_apptin'],
336 'b_account' => [
'local' =>
'respmember',
'core' =>
'dms_accountnumber'],
337 'b_dob' => [
'local' =>
'respdob',
'core' =>
'appbirthdate'],
338 'b_email' => [
'local' =>
null,
'core' =>
'appemail'],
339 'b_home_ph' => [
'local' =>
null,
'core' =>
'apphomephone'],
340 'b_work' => [
'local' =>
null,
'core' =>
'appworkphone'],
341 'b_cell' => [
'local' =>
null,
'core' =>
'appcellphone'],
342 'b_years_residence' => [
'local' =>
null,
'core' =>
'appyearsataddress'],
343 'b_address' => [
'local' =>
null,
'core' =>
'appaddr'],
344 'b_city' => [
'local' =>
null,
'core' =>
'dms_appcity'],
345 'b_state' => [
'local' =>
null,
'core' =>
'dms_appst'],
346 'b_zip' => [
'local' =>
null,
'core' =>
'dms_appzip'],
347 'b_employer' => [
'local' =>
null,
'core' =>
'appemployer'],
348 'b_monthly_income' => [
'local' =>
null,
'core' =>
'appmonthincome'],
349 'b_emp_status' => [
'local' =>
null,
'core' =>
'appemploystatus'],
350 'b_job_title' => [
'local' =>
null,
'core' =>
'appjobtitle'],
351 'b_emp_started_on' => [
'local' =>
null,
'core' =>
'appjobstartdate'],
352 'b_income_other' => [
'local' =>
null,
'core' =>
'appotherincome'],
353 'b_inc_other_src' => [
'local' =>
null,
'core' =>
'appotherincomesource'],
354 'b_own_rent' => [
'local' =>
null,
'core' =>
'apphousingtype'],
355 'b_monthly_housing' => [
'local' =>
null,
'core' =>
'apphousingpmt'],
357 'b_ref_fname' => [
'local' =>
null,
'core' =>
'dms_appreffname'],
358 'b_ref_lname' => [
'local' =>
null,
'core' =>
'dms_appreflname'],
359 'b_ref_addr' => [
'local' =>
null,
'core' =>
'apprefaddr'],
361 'b_ref_city' => [
'local' =>
null,
'core' =>
'dms_appref1city'],
362 'b_ref_state' => [
'local' =>
null,
'core' =>
'dms_appref1st'],
363 'b_ref_zip' => [
'local' =>
null,
'core' =>
'dms_appref1zip'],
364 'b_ref_phone' => [
'local' =>
null,
'core' =>
'apprefphone'],
365 'b_ref_relation' => [
'local' =>
null,
'core' =>
'appreftype'],
366 'c_fname' => [
'local' =>
null,
'core' =>
'dms_coappfname'],
367 'c_mname' => [
'local' =>
null,
'core' =>
'dms_coappmname'],
368 'c_lname' => [
'local' =>
null,
'core' =>
'dms_coapplname'],
369 'c_ssn' => [
'local' =>
null,
'core' =>
'coapptin'],
371 'c_account' => [
'local' =>
null,
'core' =>
null],
372 'c_dob' => [
'local' =>
null,
'core' =>
'coappbirthdate'],
373 'c_email' => [
'local' =>
null,
'core' =>
'coappemail'],
374 'c_home_ph' => [
'local' =>
null,
'core' =>
'coapphomephone'],
375 'c_work' => [
'local' =>
null,
'core' =>
'coappworkphone'],
376 'c_cell' => [
'local' =>
null,
'core' =>
'coappcellphone'],
377 'c_years_residence' => [
'local' =>
null,
'core' =>
'coappyearsataddress'],
378 'c_address' => [
'local' =>
null,
'core' =>
'coappaddr'],
379 'c_city' => [
'local' =>
null,
'core' =>
'dms_coappaddrcity'],
380 'c_state' => [
'local' =>
null,
'core' =>
'dms_coappaddrst'],
381 'c_zip' => [
'local' =>
null,
'core' =>
'dms_coappaddrzip'],
382 'c_employer' => [
'local' =>
null,
'core' =>
'coappemployer'],
383 'c_monthly_income' => [
'local' =>
null,
'core' =>
'coappmonthincome'],
385 'c_emp_status' => [
'local' =>
null,
'core' =>
null],
386 'c_job_title' => [
'local' =>
null,
'core' =>
'coappjobtitle'],
387 'c_emp_started_on' => [
'local' =>
null,
'core' =>
'coappjobstartdate'],
388 'c_income_other' => [
'local' =>
null,
'core' =>
'coappotherincome'],
389 'c_inc_other_src' => [
'local' =>
null,
'core' =>
'coappotherincomesource'],
390 'c_own_rent' => [
'local' =>
null,
'core' =>
'coapphousingtype'],
392 'c_monthly_housing' => [
'local' =>
null,
'core' =>
'coapphousingpmt'],
394 'c_ref_fname' => [
'local' =>
null,
'core' =>
'dms_coappreffname'],
395 'c_ref_lname' => [
'local' =>
null,
'core' =>
'dms_coappreflname'],
396 'c_ref_addr' => [
'local' =>
null,
'core' =>
'coapprefaddr'],
397 'c_ref_city' => [
'local' =>
null,
'core' =>
'dms_coappref1city'],
398 'c_ref_state' => [
'local' =>
null,
'core' =>
'dms_coappref1st'],
399 'c_ref_zip' => [
'local' =>
null,
'core' =>
'dms_coappref1zip'],
400 'c_ref_phone' => [
'local' =>
null,
'core' =>
'coapprefphone'],
401 'c_ref_relation' => [
'local' =>
null,
'core' =>
'coappreftype']
406 if (array_key_exists($field, $arr)) {
408 if (! is_null($local) && ($map[
'local'] == $local)) {
411 if (! is_null($core) && ($map[
'core'] == $core)) {
mapRandomQuestionResponses($user_id, $test_credentials)
MapUserData($row, $test_credentials)
FindFieldIdentifier($field, $field_attr)
CreateJsonMap($row=[], $tpl=[])
CreateJsonApp($row, $data)
DecodeFieldAttr($field_arr=[])
MapUserLoan($user_id, $loan_id, $row, $data)
CreateDetailTemplateMap($loan_id, $map)
MapCsvToJsonArray($row, $json_map)
FindFieldId($field, $tpl)