78 lines
3.6 KiB
PHP
78 lines
3.6 KiB
PHP
<?php
|
|
|
|
class Neighbourreferencecheckform
|
|
{
|
|
public static function getNeighbourhoodDetails($values,$pdMasterValue){
|
|
$applicantName=$pdMasterValue['main_applicant'];
|
|
$values = array_map(function($tag) use ($applicantName) {
|
|
$makeSentense='Neighbour ';
|
|
$makeSentense.= $tag['neighbourhood_name'];
|
|
$makeSentense.=" was met and he/she confirmed that he/she ";
|
|
if(strtoupper($tag['do_know'])=='YES'){
|
|
|
|
$makeSentense.="knows ".$applicantName.' since ';
|
|
$makeSentense.= ($tag['how_long_do_know_in_year'] == 1) ? $tag['how_long_do_know_in_year']." year" : (($tag['how_long_do_know_in_year'] > 1) ? $tag['how_long_do_know_in_year']." years" : "");
|
|
$makeSentense.=' and he/she is ';
|
|
$makeSentense.=(strtoupper($tag['is_applicant_owner']) == 'YES') ? "owner of the business." : ((strtoupper($tag['is_applicant_owner']) == 'NO') ? "not owner of the business." : "");
|
|
}
|
|
else if(strtoupper($tag['do_know'])=='NO'){
|
|
$makeSentense.="does not know ".$applicantName.'.';
|
|
}
|
|
return $makeSentense;
|
|
}, $values);
|
|
return $values;
|
|
}
|
|
public static function getReferenceDetails($values,$pdMasterValue) {
|
|
$applicantName=$pdMasterValue['main_applicant'];
|
|
$values = array_map(function($tag) use ($applicantName) {
|
|
$makeSentense=($tag['relationship_with'] == 1) ? $tag['others'] : (($tag['relationship_with'] > 1) ? $tag['relationship_with_master'] : "");
|
|
$makeSentense.= ' '.$tag['reference_name'].' of SineEdge was contacted over phone at ';
|
|
$makeSentense.=$tag['mobile'].'. ';
|
|
$makeSentense.='He is related to this business since last ';
|
|
$makeSentense.=($tag['year_relation_applicant'] == 1) ? $tag['year_relation_applicant']." year" : (($tag['year_relation_applicant'] > 1) ? $tag['year_relation_applicant']." years" : "");
|
|
$makeSentense.=" is doing a business of Rs.".$tag['business_volume_amount'];
|
|
switch($tag['business_volume_unit']) {
|
|
case 1:
|
|
$makeSentense .= ' per '.$tag['others_unit'].'.';
|
|
break;
|
|
case 2:
|
|
$makeSentense .= ' per annum.';
|
|
break;
|
|
case 3:
|
|
$makeSentense .= ' per halfyearly.';
|
|
break;
|
|
case 4:
|
|
$makeSentense .= ' per fortnightly.';
|
|
break;
|
|
case 5:
|
|
$makeSentense .= ' per daily.';
|
|
break;
|
|
case 6:
|
|
$makeSentense .= ' per quarterly.';
|
|
break;
|
|
case 7:
|
|
$makeSentense .= ' per month.';
|
|
break;
|
|
default:
|
|
$makeSentense .= '. ';
|
|
}
|
|
if($tag['reference_final_remarks']==3){
|
|
$makeSentense .=($tag['relationship_with'] == 1) ? $tag['others'] : (($tag['relationship_with'] > 1) ? $tag['relationship_with_master'] : "");
|
|
$makeSentense .=' did not provide sufficient information to validate the business credentials.';
|
|
}
|
|
else if($tag['reference_final_remarks']==2) {
|
|
$makeSentense .=($tag['relationship_with'] == 1) ? $tag['others'] : (($tag['relationship_with'] > 1) ? $tag['relationship_with_master'] : "");
|
|
$makeSentense .=' reference check was negative.';
|
|
}
|
|
else if($tag['reference_final_remarks']==1) {
|
|
$makeSentense .=($tag['relationship_with'] == 1) ? $tag['others'] : (($tag['relationship_with'] > 1) ? $tag['relationship_with_master'] : "");
|
|
$makeSentense .=' reference check was positive.';
|
|
}
|
|
|
|
return $makeSentense;
|
|
}, $values);
|
|
return $values;
|
|
}
|
|
|
|
}
|
|
?>
|