for cet data : ps
This commit is contained in:
parent
3979ab9031
commit
68a132aaf6
@ -1669,7 +1669,7 @@ public function filterSalesPDList_post() {
|
||||
}else{
|
||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||
}
|
||||
|
||||
// print_r($html_content);exit();
|
||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||
$new_pdf_name = "PD_Report_".$view_data['pd_master_details'][0]['main_applicant'];
|
||||
|
||||
|
||||
@ -16,8 +16,32 @@ class smc_creditpd
|
||||
break;
|
||||
|
||||
case 4://General Business
|
||||
$json = json_decode($section['json'],true);
|
||||
for($i=0;$i<count($json['business_entity']);$i++)
|
||||
{
|
||||
$value = $json['business_entity'][$i]['company_name'];
|
||||
$json['business_entity'][$i]['name_of_the_company'] = (isset($value) ? $company[$value] : 'NA');
|
||||
}
|
||||
$return_data = $json;
|
||||
break;
|
||||
case 5://Key Stakeholders
|
||||
$json = json_decode($section['json'],true);
|
||||
for($i=0;$i<count($json['key_stakeholders']);$i++)
|
||||
{
|
||||
$value = $json['key_stakeholders'][$i]['company_name'];
|
||||
$json['key_stakeholders'][$i]['name_of_the_company'] = (isset($value) ? $company[$value] : 'NA');
|
||||
}
|
||||
$return_data = $json;
|
||||
break;
|
||||
case 6://bbusiness brief
|
||||
$json = json_decode($section['json'],true);
|
||||
for($i=0;$i<count($json['key_products_contribution']);$i++)
|
||||
{
|
||||
$value = $json['key_products_contribution'][$i]['company_name'];
|
||||
$json['key_products_contribution'][$i]['name_of_the_company'] = (isset($value) ? $company[$value] : 'NA');
|
||||
}
|
||||
$return_data = $json;
|
||||
break;
|
||||
case 7://emp strength
|
||||
case 9://banking
|
||||
case 10://finance
|
||||
@ -259,6 +283,8 @@ class smc_creditpd
|
||||
{
|
||||
foreach ($json['supplier_details'] as $key => $value)
|
||||
{
|
||||
$json['supplier_details'][$key]['name_of_the_company'] = (isset($value['company_name']) ? $company[$value['company_name']] : 'NA');
|
||||
$json['supplier_details'][$key]['type_of_payment'] = (isset($value['payment_type']) ? $payment_term [ $value['payment_type'] ]: 'NA');
|
||||
|
||||
$header_row .= '<th>Supplier '.$value['supplier_name'].'</th>';
|
||||
$first_row .= '<td style="text-align:center;">'. $value['provider_name'] .'</td>';
|
||||
@ -309,7 +335,9 @@ class smc_creditpd
|
||||
|
||||
foreach ($json['client_details'] as $key => $value)
|
||||
{
|
||||
|
||||
$json['client_details'][$key]['name_of_the_company'] = (isset($value['company_name']) ? $company[$value['company_name']] : 'NA');
|
||||
$json['client_details'][$key]['type_of_payment'] = (isset($value['payment_type']) ? $payment_term [ $value['payment_type'] ]: 'NA');
|
||||
|
||||
$header_row .= '<th>Client '.$value['client_name'].'</th>';
|
||||
$first_row .= '<td style="text-align:center;">'. $value['provider_name'] .'</td>';
|
||||
$second_row .= '<td style="text-align:center;">'. $value['contact_person_name'] .'</td>';
|
||||
@ -351,12 +379,17 @@ class smc_creditpd
|
||||
if(isset($json['stock_details']) && is_array($json['stock_details']) && count($json['stock_details']))
|
||||
{
|
||||
foreach ($json['stock_details'] as $key => $value)
|
||||
{
|
||||
{
|
||||
if(isset($value['company_name']))
|
||||
{
|
||||
$json['stock_details'][$key]['name_of_the_company'] = (isset($value['company_name']) ? $company[$value['company_name']] : 'NA');
|
||||
}
|
||||
if(isset($value['estimated_uom']))
|
||||
{
|
||||
//echo $value['estimated_uom'];die();
|
||||
foreach ($uom_master as $m_key => $mvalue)
|
||||
{
|
||||
|
||||
if($value['estimated_uom'] == $mvalue['uom_id'])
|
||||
{ $json['stock_details'][$key]['estimated_uom'] = $mvalue['name'];break; }
|
||||
}
|
||||
@ -385,6 +418,7 @@ class smc_creditpd
|
||||
$eight_row = '<tr>'.'<td> Balance Tenure (Mnts) </td>';
|
||||
foreach ($json['existing_loan_details'] as $key => $value)
|
||||
{
|
||||
$json['existing_loan_details'][$key]['lender_name'] = ((isset($value['lender_name']) && $value['lender_name'] != 0) ? $value['lender_name'] : 'NA');
|
||||
$json['existing_loan_details'][$key]['business_owner_name'] = (isset($value['business_name_of_the_owner']) ? (applicantname_grabber::getApplicantsNameById($value['business_name_of_the_owner'],$applicant_details)): 'NA');
|
||||
|
||||
$header_row .= '<th>Loan '.($key + 1).'</th>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user