Merge remote-tracking branch 'origin/master'

This commit is contained in:
Velz2020 2021-03-21 19:57:56 +05:30
commit 4130554667
9 changed files with 415 additions and 20 deletions

View File

@ -89,7 +89,7 @@ $autoload['drivers'] = array();
|
| $autoload['helper'] = array('url', 'file');
*/
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber','vendor_form','custom_encryption','readexceldata');
$autoload['helper'] = array('url','file','form', 'jwt', 'authorization', 'date','mylog','myocr','mydb','pdalerts','myutil','myhttpclient','pdscore','businessform','otherincomeform','financialform','neighbourreferencecheckform', 'otherfamilyform', 'assetsform','stockform', 'bankingform','sms_gupshup','assessedincome','rentalform','external_dir_check','applicantname_grabber','vendor_form','custom_encryption','readexceldata','loanform');
/*
| -------------------------------------------------------------------

View File

@ -105,6 +105,7 @@ $route['updateExistUser'] = 'User_Management_Controller/updateExistUser';
$route['getUsersDetails'] = 'User_Management_Controller/getUsersDetails';
$route['getSingedProfilePicURL'] = 'User_Management_Controller/getSingedProfilePicURL';
$route['checkpin'] = 'User_Management_Controller/checkpin';
$route['saveOrUpdateUserConfig'] = 'User_Management_Controller/saveOrUpdateUserConfig';
// TEMPLATE MANAGEMENT
$route['(listAllTemplates/:any)'] = 'Template_Management_Controller/listAllTemplates/';

View File

@ -6079,6 +6079,8 @@ public function getPDFormDetailsJSON_post()
public function codeigniterViewTest_post()
{
// echo "i am here";
// exit();
// $host = getenv('DB_HOST');
// echo $this->config->item('new_db_variable');
// echo MY_CONSTANT;
@ -6139,7 +6141,8 @@ public function getPDFormDetailsJSON_post()
{
mkdir($this->external_path.'/pd_reports/'.$pdid,0761);
}
// echo "finally";
// exit();
// $this->load->helper('DIFFCHECK');
// $old_version = $this->external_path.'/pd_reports/'.$pdid.'/a.html';
@ -6231,7 +6234,7 @@ public function getPDFormDetailsJSON_post()
$data['pd_master_details'] = $this->PD_Model->getPDMasterDetails($pdid);
$data['applicants_details'] = $this->PD_Model->getApplicantsDetails($pdid);
print_r($data['pd_master_details']);die();
// print_r($data['pd_master_details']);die();
//$data['satellite_path'] = $this->external_path.'/pd_reports/'. $pdid .'/satellite.png';
// $data['pd_master_details'][0]['lender_short_name'] = 'CLIXH';
// $data['pd_master_details'][0]['product_abbr'] = 'HL';
@ -8415,9 +8418,13 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
function getLatestPDReportHTMLFile($pdid,$random_string,$return_type = false)
{
// echo "now i am in child function ";
// exit();
if(($pdid != null || $pdid != "")) //&& (strlen($pdid) == 16) &&(is_string($pdid)))
{
$pd_data = $this->PD_Model->selectCustomRecords(array('pd_id','pd_report_html_filename'),array('random_string' => $random_string,'pd_id' => $pdid),PDTRIGGER);
// print_r($pd_data);exit();
if(count($pd_data))
{
@ -8431,6 +8438,8 @@ public function getCompaniesListsFromGeneralFormRawJSON_post()
}
file_put_contents($temp_file_path,$report_data);
$view_name = 'pd_reports/'. $pd_data[0]['pd_id'] .'/temp.html';
// echo $view_name;
// die();
return $this->load->view($view_name,array(),$return_type);

View File

@ -429,4 +429,113 @@ class User_Management_Controller extends REST_Controller {
}
}
/** USER CONFIGURATION SAVE AND UPDATE API
* @PARAM post params sales_products, state mapping -- currently implemented for MWISE LENDER only
*/
public function saveOrUpdateUserConfig_post() {
if($this->post('user_id')) {
$user_id = $this->post('user_id');
$user_config = $this->User_Management_Model->getUserConfigDetails($user_id);
// print_r($user_config);
// die();
$salesproduct_msg = "";
$rcmstate_msg = "";
/** FOR SALES PD PRODUCTS ADD AND UPDATE */
if($this->post('salespd_products')){
$salespd_products = $this->post('salespd_products');
if($salespd_products && !empty($salespd_products))
{
$salespd_products = (implode(',',$salespd_products));
$arr = array('fk_user_id' => $user_id,'config_type' => 1,'data' => $salespd_products);
$this->db->set($arr);
if(!$user_config || !array_key_exists('salespd_products',$user_config) || empty($user_config['salespd_products'])) {
$res = $this->db->insert(USERCONFIG);
$salesproduct_msg = "Sales Products Added";
}
else{
$this->db->where('fk_user_id',$user_id);
$res = $this->db->update(USERCONFIG);
$salesproduct_msg = "Sales Products Updated";
}
// print_r($res);
}
}
/** END OF SALES PD PRODUCTS ADD AND UPDATE */
/** FOR INSERTING THE RCM STATE MAPPING DATA */
if($this->post('rcm_state_mapping')){
$rcm_state_mapping = $this->post('rcm_state_mapping');
}
if($rcm_state_mapping && !empty($rcm_state_mapping)) {
if(!$user_config || !array_key_exists('rcm_state_mapping',$user_config) || empty($user_config['rcm_state_mapping'])) {
}
else {
$intersect_value = array_intersect($rcm_state_mapping,$user_config['rcm_state_mapping']);
if(!empty($intersect_value)) {
foreach( $intersect_value as $key => $value) {
$key = (float) array_search($value,$rcm_state_mapping);
unset($rcm_state_mapping[$key]);
$key = (float) array_search($value,$user_config['rcm_state_mapping']);
unset($user_config['rcm_state_mapping'][$key]);
}
if(!empty($user_config['rcm_state_mapping'])) {
$this->User_Management_Model->deactivateDataOnRcmStateMapping($user_id,$user_config['rcm_state_mapping']);
$rcmstate_msg = "RCM States Modified";
}
}
// print_r($rcm_state_mapping);
// die();
if(!empty($rcm_state_mapping)) {
$insert_value = array();
foreach($rcm_state_mapping as $key=>$value) {
if($value) {
array_push($insert_value,(object)[
"fk_user_id" => $user_id,
"fk_state_id" => $value,
"isactive" => "1"
]);
}
}
if(!empty($insert_value)) {
$res = $this->db->insert_batch(RCM_STATE_MAPPING,$insert_value);
$rcmstate_msg = "RCM States Added";
}
}
// echo "\n old data \n";
// print_r($user_config['rcm_state_mapping']);
// echo "new data";
// print_r($rcm_state_mapping);
// die();
}
}
/** END OF INSERTING THE RCM STATE MAPPING DATA */
$response_msg = salesproduct_msg ? $salesproduct_msg : '';
$response_msg.= $response_msg && $rcmstate_msg ? ' and '.$rcmstate_msg : $rcmstate_msg ? ' '.$rcmstate_msg : '';
$data['dataStatus'] = true;
$data['status'] = REST_Controller::HTTP_OK;
$data['msg'] = $response_msg." Successully";
$this->response($data,REST_Controller::HTTP_OK);
/** FOR GETTING SALES PRODUCTS */
// $user_id = $this->post('user_id');
// $user_config = $this->User_Management_Model->getUserConfigDetails($user_id);
// print_r($user_config);
}
else {
$data['dataStatus'] = false;
$data['status'] = REST_Controller::HTTP_NOT_FOUND;
$data['msg'] = 'User Not Found';
$this->response($data,REST_Controller::HTTP_NOT_FOUND);
}
}
}

View File

@ -0,0 +1,85 @@
<?php
class Loanform
{
public static function getanchordetails($loan_form){
$anchor_details_display = array();
$facility_amt = MYUTIL::customIndianNumberFormat($loan_form['facility_amount']);
$monthly_business_anchor_amt = MYUTIL::customIndianNumberFormat($loan_form['monthly_business_anchor']);
$average_invoicevalue_amt = MYUTIL::customIndianNumberFormat($loan_form['average_invoicevalue']);
$stock_related_amt = MYUTIL::customIndianNumberFormat($loan_form['stock_related_anchor']);
// $facility_amt = $loan_form['facility_amount'];
// $monthly_business_anchor_amt = $loan_form['monthly_business_anchor'];
// $average_invoicevalue_amt = $loan_form['average_invoicevalue'];
// $stock_related_amt = $loan_form['stock_related_anchor'];
$payment_mechanism_arr = array('bill_wise' => 'Bill Wise','open_account' => 'Open Account');
$sales_low_months=SELF::getMonths($loan_form['sales_low_months']);
// if($loan_form['vintage_anchor_year'] > 1 ){ $yr = $loan_form['vintage_anchor_year']."Yrs";}
// else if($loan_form['vintage_anchor_year'] == 1 ){ $yr = $loan_form['vintage_anchor_year']."Yr"; }
// else{ $yr = ''; }
// if($loan_form['vintage_anchor_month'] > 1 ){ $mnt = $loan_form['vintage_anchor_month']."Months";}
// else if($loan_form['vintage_anchor_month'] == 1 ){ $mnt = $loan_form['vintage_anchor_month']."Month"; }
// else{ $mnt = ''; }
// if($mnt != '' && $yr != '' ){ $yrandmnt = $yr.' and '.$mnt; }
// else if($mnt == '' && $yr != ''){ $yrandmnt = $yr; }
// else if($mnt != '' && $yr == ''){ $yrandmnt = $mnt; }
// else{ $yrandmnt = '-';}
$anchor_details_display[] = array('particulars' => "Facility Amount Applied For (₹)",'details' => "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".$facility_amt.' ('.MYUTIL::numtowords($loan_form['facility_amount']).')');
$anchor_details_display[] = array('particulars' => "Name of Anchor",'details' => $loan_form['anchor_name']);
$anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Year",'details' => $loan_form['vintage_anchor_year']);
$anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Month",'details' => $loan_form['vintage_anchor_month']);
// $anchor_details_display[] = array('particulars' => "Applicant's association vintage with the Anchor Year and Month",'details' => $yrandmnt );
$anchor_details_display[] = array('particulars' => "Monthly business (sale/purchase) with the Anchor (₹)",'details' => "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".$monthly_business_anchor_amt.' ('.MYUTIL::numtowords($loan_form['monthly_business_anchor']).')');
$anchor_details_display[] = array('particulars' => "Business concentration with Anchor",'details' => $loan_form['business_concentration'].' %');
$anchor_details_display[] = array('particulars' => "Credit period with the Anchor (Days)",'details' => $loan_form['credit_period_days']);
$anchor_details_display[] = array('particulars' => "Payment Mechanism",
'details' => $payment_mechanism_arr[$loan_form['payment_mechanism']]);
$anchor_details_display[] = array('particulars' => "Average Invoice Value (₹)",'details' => "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".$average_invoicevalue_amt.' ('.MYUTIL::numtowords($loan_form['average_invoicevalue']).')');
$anchor_details_display[] = array('particulars' => "Are there peak seasons for the business with Anchor",'details' => ucfirst($loan_form['peakseasons_anchor']));
if($loan_form['peakseasons_anchor']=='yes')
{
$anchor_details_display[] = array('particulars' => "Months in which sales/service is low?",'details' => $sales_low_months );
$anchor_details_display[] = array('particulars' => "Comments",'details' => $loan_form['peak_season_comment'] );
}
$anchor_details_display[] = array('particulars' => "Are there debit/credit notes being issued to/by Anchor",'details' => ucfirst($loan_form['anchor_notes']));
if($loan_form['anchor_notes']=='yes'){
$anchor_details_display[] = array('particulars' => "Reason for such debit/credit notes",'details' => ucfirst($loan_form['debitcredit_notes']) );
}
$anchor_details_display[] = array('particulars' => "Value of stock related to Anchor (₹)",'details' => "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>"." ".$stock_related_amt.' ('.MYUTIL::numtowords($loan_form['stock_related_anchor']).')');
$anchor_details_display[] = array('particulars' => "Observations on Sample Invoices",'details' => $loan_form['sample_invoices'] );
return $anchor_details_display;
// print_r($anchor_details_display);
}
public static function getMonths($details) {
foreach($details as $key=>$value){
$getRow=$getRow;
$getRow .= ($key==0) ? "":($key==count($details)-1 ? ' and ' : ",");
switch($value) {
case 1:$getRow .='January';break;
case 2:$getRow .='February';break;
case 3:$getRow .='March';break;
case 4:$getRow .='April';break;
case 5:$getRow .='May';break;
case 6:$getRow .='June';break;
case 7:$getRow .='July';break;
case 8:$getRow .='August';break;
case 9:$getRow .='September';break;
case 10:$getRow .='October';break;
case 11:$getRow .='November';break;
case 12:$getRow .='December';break;
}
}
return $getRow;
}
}
?>

View File

@ -123,7 +123,23 @@ class User_Management_Model extends SPARQ_Model {
}
}
/** FOR GETTING THE RCM STATE MAPPING DATA BY ACTIVE USER ID */
$this->db->select('*');
$this->db->where('RCM_STATE_MAPPING.fk_user_id',$userid);
$this->db->where('RCM_STATE_MAPPING.isactive',1);
$state_mapping_result = $this->db->get(RCM_STATE_MAPPING.' as RCM_STATE_MAPPING')->result_array();
// print_r($state_mapping_result);
// die();
if(count($state_mapping_result) != 0) {
$return_data['rcm_state_mapping'] = array();
foreach($state_mapping_result as $key => $value)
{
array_push($return_data['rcm_state_mapping'],$value['fk_state_id']);
}
}
/** END OF GETTING THE RCM STATE MAPPING DATA BY ACTIVE USER ID */
return $return_data;
@ -147,4 +163,14 @@ class User_Management_Model extends SPARQ_Model {
return $result_data;
}
}
public function deactivateDataOnRcmStateMapping($userid,$data_arr) {
echo "inside function";
foreach($data_arr as $key => $value) {
$this->db->set(array('isactive' => 0));
$this->db->where('fk_user_id',$userid);
$this->db->where('fk_state_id',$value);
$this->db->update(RCM_STATE_MAPPING);
}
}
}

View File

@ -1371,6 +1371,23 @@ if ( isset($pdf) ) {
//
echo "<br><br>".$loan_form['loandetails_remarks'];
?>
<?php if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$anchor_details_display = array();
$anchor_details_display=Loanform::getanchordetails($loan_form);
?>
<br><p contenteditable="true"><b>Anchor Details Section:</b></p>
<table class="scorecard_table_resonal_assest">
<tr> <th style="text-align:center;">S.No</th> <th> Particulars</th> <th> Particular Details</th> </tr>
<tbody>
<?php
foreach($anchor_details_display as $row_key => $row)
{
echo '<tr> <td style="text-align:center;width:25px;">'.($row_key + 1)."</td> <td>".$row['particulars']."</td> <td>".$row['details'] ."</td> </tr>";
}
?>
</tbody>
</table>
<?php } ?>
<!-- ####################### End of Loan Details Details Section ############################-->
@ -2217,6 +2234,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
break;
case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
break;
case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
break;
case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
break;
case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
break;
case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
break;
}
}
}
@ -2225,8 +2254,14 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
array_push($businessFinancialResult,$bindBusinessFinancial);
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
}
array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@ -2294,19 +2329,19 @@ if($total_no_of_business > 0) {
</table>
<?php
echo '<br><p>' . $comments_on_financials . '</p>';
}
}
else { if($pd_master_details[0]['fk_pd_type'] == 1) { echo "<p>Financial statements not provided by ".$loan_word." Applicants to PD officer. </p>";} }
// if($pd_master_details[0]['lender_short_name'] != 'CFPL' ) {}
?>
<!-- customer finance statements-->
<p><?php echo $iterateFinance['financial_customer']; ?></p>
<?php
if($iterateFinance['is_customer_statement'])
{
if(count($iterateFinance['customer_statements'])>0){
@ -2463,7 +2498,27 @@ if($total_no_of_business > 0) {
echo '<br>Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
<p><strong>Working Capital Cycle:</strong></p>
<!--################ Buisness Financial Information - Title Changes for CFPL lender ###################-->
<?php
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$business_fin_sub_title1 = 'Total Banking Cycle';
$business_fin_sub_title2 = 'Total Banking Facilities';
}else{ $business_fin_sub_title1 = 'Working Capital Cycle';
$business_fin_sub_title2 = 'Working Capital Facilities';
}
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Details</th> </tr> </thead>
<tbody>
<?php foreach($iterateFinance['cfpl_lender_details'] as $fk => $facility){
echo '<tr> <td class="customtd">'.(++$fk) .'</td><td class="customtd">'.$facility['name'].'</td> <td class="customtd">'.$facility['details'].'</td></tr>';
}?>
</tbody>
</table>
<?php } ?>
<p><strong><?php echo $business_fin_sub_title1.' :'; ?></strong></p>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Days</th> </tr> </thead>
<tbody>
@ -2475,18 +2530,18 @@ if($total_no_of_business > 0) {
<?php if($iterateFinance['is_working_capital_facility'] != "" ){ ?>
<p><strong>Working Capital Facilities:</strong></p>
<p><strong><?php echo $business_fin_sub_title2.' :'; ?></strong></p>
<?php if(strcasecmp($iterateFinance['is_working_capital_facility'],'no')){?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Facility Type</th> <th>Facility Details</th> </tr> </thead>
<tbody>
<?php foreach($iterateFinance['working_capital_facilites'] as $fk => $facility){
echo '<tr> <td class="customtd">'.(++$fk) .'</td><td class="customtd">'.$facility['name'].'</td> <td class="customtd">'.$facility['details'].'</td></tr>';
}?>
</tbody>
</table>
<?php }else{echo "<p>The Loan Applicants have not availed any Working Capital Facilities from any financial institution.<p>";}
<?php }else{echo "<p>The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.<p>";}
}
?>

View File

@ -1368,6 +1368,23 @@ if ( isset($pdf) ) {
//
echo "<br><br>".$loan_form['loandetails_remarks'];
?>
<?php if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$anchor_details_display = array();
$anchor_details_display=Loanform::getanchordetails($loan_form);
?>
<br><p contenteditable="true"><b>Anchor Details Section:</b></p>
<table class="scorecard_table_resonal_assest">
<tr> <th style="text-align:center;">S.No</th> <th> Particulars</th> <th> Particular Details</th> </tr>
<tbody>
<?php
foreach($anchor_details_display as $row_key => $row)
{
echo '<tr> <td style="text-align:center;width:25px;">'.($row_key + 1)."</td> <td>".$row['particulars']."</td> <td>".$row['details'] ."</td> </tr>";
}
?>
</tbody>
</table>
<?php } ?>
<!-- ####################### End of Loan Details Details Section ############################-->
@ -2214,6 +2231,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
break;
case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
break;
case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
break;
case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
break;
case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
break;
case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
break;
}
}
}
@ -2222,7 +2251,13 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
}
array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@ -2460,7 +2495,27 @@ if($total_no_of_business > 0) {
echo '<br>Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
<p><strong>Working Capital Cycle:</strong></p>
<!--################ Buisness Financial Information - Title Changes for CFPL lender ###################-->
<?php
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$business_fin_sub_title1 = 'Total Banking Cycle';
$business_fin_sub_title2 = 'Total Banking Facilities';
}else{ $business_fin_sub_title1 = 'Working Capital Cycle';
$business_fin_sub_title2 = 'Working Capital Facilities';
}
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Details</th> </tr> </thead>
<tbody>
<?php foreach($iterateFinance['cfpl_lender_details'] as $fk => $facility){
echo '<tr> <td class="customtd">'.(++$fk) .'</td><td class="customtd">'.$facility['name'].'</td> <td class="customtd">'.$facility['details'].'</td></tr>';
}?>
</tbody>
</table>
<?php } ?>
<p><strong><?php echo $business_fin_sub_title1.' :'; ?></strong></p>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Days</th> </tr> </thead>
<tbody>
@ -2472,7 +2527,7 @@ if($total_no_of_business > 0) {
<?php if($iterateFinance['is_working_capital_facility'] != "" ){ ?>
<p><strong>Working Capital Facilities:</strong></p>
<p><strong><?php echo $business_fin_sub_title2.' :'; ?></strong></p>
<?php if(strcasecmp($iterateFinance['is_working_capital_facility'],'no')){?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Facility Type</th> <th>Facility Details</th> </tr> </thead>
@ -2483,7 +2538,7 @@ if($total_no_of_business > 0) {
}?>
</tbody>
</table>
<?php }else{echo "<p>The Loan Applicants have not availed any Working Capital Facilities from any financial institution.<p>";}
<?php }else{echo "<p>The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.<p>";}
}
?>

View File

@ -1372,6 +1372,23 @@ if ( isset($pdf) ) {
//
echo "<br><br>".$loan_form['loandetails_remarks'];
?>
<?php if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$anchor_details_display = array();
$anchor_details_display=Loanform::getanchordetails($loan_form);
?>
<br><p contenteditable="true"><b>Anchor Details Section:</b></p>
<table class="scorecard_table_resonal_assest">
<tr> <th style="text-align:center;">S.No</th> <th> Particulars</th> <th> Particular Details</th> </tr>
<tbody>
<?php
foreach($anchor_details_display as $row_key => $row)
{
echo '<tr> <td style="text-align:center;width:25px;">'.($row_key + 1)."</td> <td>".$row['particulars']."</td> <td>".$row['details'] ."</td> </tr>";
}
?>
</tbody>
</table>
<?php } ?>
<!-- ####################### End of Loan Details Details Section ############################-->
@ -2219,6 +2236,18 @@ if($total_no_of_business > 0) {
case 7:
$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['od_limit'];
break;
case 8 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['lender_name'];
break;
case 9 : $businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_amount'];
break;
case 10 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_type'];
break;
case 11 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_tenor'];
break;
case 12 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['loan_start_date'];
break;
case 13 :$businessFinancialRow['select_working_capital_facilities_availed'][$k]['details'] = $businessFinancialRow['monthly_emi'];
break;
}
}
}
@ -2227,7 +2256,13 @@ if($total_no_of_business > 0) {
$bindBusinessFinancial['estimate_posmachine_or_cc_annual_sales'] = isset($businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales']) ? $businessFinancialRow['estimated_value'][0]['estimate_posmachine_or_cc_annual_sales'] : null;
//print_r($bindBusinessFinancial['select_working_capital_facilities_availed']); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']);
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Turnover in last completed Year",'details' => isset($businessFinancialRow['turnover_lastcomplete_year'])?$businessFinancialRow['turnover_lastcomplete_year']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "YTD turnover (till last month)",'details' => isset($businessFinancialRow['ytd_turnover'])?$businessFinancialRow['ytd_turnover']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall debtor collection period",'details' => isset($businessFinancialRow['deptor_collection_period'])?$businessFinancialRow['deptor_collection_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall Inventory holding period",'details' => isset($businessFinancialRow['inventory_holding_period'])?$businessFinancialRow['inventory_holding_period']: null );
$bindBusinessFinancial['cfpl_lender_details'][] = array('name' => "Overall creditor payment period",'details' => isset($businessFinancialRow['creditor_payment_period'])?$businessFinancialRow['creditor_payment_period']: null );
}
array_push($businessFinancialResult,$bindBusinessFinancial);
?>
@ -2462,7 +2497,27 @@ if($total_no_of_business > 0) {
echo '<br>Orders in Hand to be executed in Current FY : '. $current_business_info['orders_hand_FY'];
}
?>
<p><strong>Working Capital Cycle:</strong></p>
<!--################ Buisness Financial Information - Title Changes for CFPL lender ###################-->
<?php
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
$business_fin_sub_title1 = 'Total Banking Cycle';
$business_fin_sub_title2 = 'Total Banking Facilities';
}else{ $business_fin_sub_title1 = 'Working Capital Cycle';
$business_fin_sub_title2 = 'Working Capital Facilities';
}
if($pd_master_details[0]['lender_short_name'] == 'CFPL'){
?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Details</th> </tr> </thead>
<tbody>
<?php foreach($iterateFinance['cfpl_lender_details'] as $fk => $facility){
echo '<tr> <td class="customtd">'.(++$fk) .'</td><td class="customtd">'.$facility['name'].'</td> <td class="customtd">'.$facility['details'].'</td></tr>';
}?>
</tbody>
</table>
<?php } ?>
<p><strong><?php echo $business_fin_sub_title1.' :'; ?></strong></p>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Particulars</th> <th>Days</th> </tr> </thead>
<tbody>
@ -2474,7 +2529,7 @@ if($total_no_of_business > 0) {
<?php if($iterateFinance['is_working_capital_facility'] != "" ){ ?>
<p><strong>Working Capital Facilities:</strong></p>
<p><strong><?php echo $business_fin_sub_title2.' :'; ?></strong></p>
<?php if(strcasecmp($iterateFinance['is_working_capital_facility'],'no')){?>
<table class="scorecard_table">
<thead> <tr> <th>S.No</th> <th>Facility Type</th> <th>Facility Details</th> </tr> </thead>
@ -2485,7 +2540,7 @@ if($total_no_of_business > 0) {
}?>
</tbody>
</table>
<?php }else{echo "<p>The Loan Applicants have not availed any Working Capital Facilities from any financial institution.<p>";}
<?php }else{echo "<p>The Loan Applicants have not availed any ".$business_fin_sub_title2." from any financial institution.<p>";}
}
?>