Flyhi Fixes 1 : ps
This commit is contained in:
parent
8da58136c5
commit
830589b612
@ -611,7 +611,7 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
//$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr'];
|
//$view_name = $sales_pd_data[0]['short_name'].'_'.$sales_pd_data[0]['abbr'];
|
||||||
$view_name = $sales_pd_data[0]['short_name'];
|
$view_name = $sales_pd_data[0]['short_name'];
|
||||||
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
$html_content = $this->load->view('sale_pd_templates/'.$view_name,$view_data,true);
|
||||||
echo $html_content;die();
|
// echo $html_content;die();
|
||||||
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
$pdf_doc = $this->pdfgenerator->generate($html_content, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait");
|
||||||
//End of PDF Gen using DOM PDF
|
//End of PDF Gen using DOM PDF
|
||||||
$output_file = $this->external_path ."/sales_pd/" .$pd_id. "/temp.pdf";
|
$output_file = $this->external_path ."/sales_pd/" .$pd_id. "/temp.pdf";
|
||||||
@ -674,17 +674,15 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
{
|
{
|
||||||
$questions = json_decode($section_array['section_data'],true);
|
$questions = json_decode($section_array['section_data'],true);
|
||||||
return $this->processSalesPDQuestions($questions['questions'],$section_array['section_id']);
|
return $this->processSalesPDQuestions($questions['questions'],$section_array['section_id']);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function processSalesPDQuestions($questions,$section_id)
|
function processSalesPDQuestions($questions,$section_id)
|
||||||
{
|
{
|
||||||
//print_r($questions);die();
|
|
||||||
$temp_array = array();
|
$temp_array = array();
|
||||||
foreach ($questions as $ques_key => $question)
|
foreach ($questions as $ques_key => $question)
|
||||||
{
|
{
|
||||||
//if($question['section_id']){}
|
|
||||||
if($question['is_repeatable'] == null && ($question['type'] == 1 || $question['type'] == 2 || $question['type'] == 3 || $question['type'] == 4 || $question['type'] == 6 || $question['type'] == 7 || $question['type'] == 8))//text,radio,SDD,MDD,camera,txt area, searchable dd
|
if($question['is_repeatable'] == null && ($question['type'] == 1 || $question['type'] == 2 || $question['type'] == 3 || $question['type'] == 4 || $question['type'] == 6 || $question['type'] == 7 || $question['type'] == 8))//text,radio,SDD,MDD,camera,txt area, searchable dd
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -692,20 +690,30 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
if($question['question_key'] == 'residence_state' || $question['question_key'] == 'residence_city' || $question['question_key'] == 'residence_pincode' ||
|
if($question['question_key'] == 'residence_state' || $question['question_key'] == 'residence_city' || $question['question_key'] == 'residence_pincode' ||
|
||||||
$question['question_key'] == 'business_state'|| $question['question_key'] == 'business_city'|| $question['question_key'] == 'business_pincode' ||
|
$question['question_key'] == 'business_state'|| $question['question_key'] == 'business_city'|| $question['question_key'] == 'business_pincode' ||
|
||||||
$question['question_key'] == 'permanent_state' || $question['question_key'] == 'permanent_city' || $question['question_key'] == 'permanent_pincode' ||
|
$question['question_key'] == 'permanent_state' || $question['question_key'] == 'permanent_city' || $question['question_key'] == 'permanent_pincode' ||
|
||||||
$question['question_key'] == 'officer_state' || $question['question_key'] == 'officer_city' || $question['question_key'] == 'officer_pincode')
|
$question['question_key'] == 'officer_state' || $question['question_key'] == 'officer_city' || $question['question_key'] == 'officer_pincode' ||
|
||||||
|
$question['question_key'] == 'lender_name' || $question['question_key'] == 'branch' || $question['question_key'] == 'lender_sales_person' || $question['question_key'] == 'lender_credit_person')
|
||||||
// $question['question_key'] == 'employer_business_state' || $question['question_key'] == 'employer_business_address_city' || $question['question_key'] == 'employer_business_pincode' ||
|
// $question['question_key'] == 'employer_business_state' || $question['question_key'] == 'employer_business_address_city' || $question['question_key'] == 'employer_business_pincode' ||
|
||||||
// $question['question_key'] == 'educational_institute_state' || $question['question_key'] == 'educational_institute_address_city' || $question['question_key'] == 'educational_institute_pincode'
|
// $question['question_key'] == 'educational_institute_state' || $question['question_key'] == 'educational_institute_address_city' || $question['question_key'] == 'educational_institute_pincode'
|
||||||
// )
|
// )
|
||||||
{
|
{
|
||||||
//if($question['type'] == 4) { print_r($question['answer_value']); }
|
$temp_array[ $question['question_key'] ] = $this->getMasterData($question['answer_value'],$question['answers']);
|
||||||
$temp_array[ $question['question_key'] ] = $this->getMasterData($question['answer_value'],$question['answers']);
|
|
||||||
// if($question['type'] == 4) { print_r($temp_array[ $question['question_key'] ]); }
|
|
||||||
}
|
}
|
||||||
if(isset($question['subfield_key']))
|
if(isset($question['subfield_key']))
|
||||||
{
|
{
|
||||||
|
|
||||||
$temp_array[ $question['question_key'] ] .= $question['subfield_value'].',';
|
$temp_array[ $question['question_key'] ] .= $question['subfield_value'].',';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($question['onchange_properties'])){
|
||||||
|
for ($a = 0; $a < count($question['onchange_properties']); $a++){
|
||||||
|
if(isset($question['onchange_properties'][$a]['form_controls'])){
|
||||||
|
$onchange_array = $question['onchange_properties'][$a]['form_controls'];
|
||||||
|
$singleArray = [];
|
||||||
|
for ($i = 0; $i < count($onchange_array); $i++){
|
||||||
|
$value = $this->processSalesPDQuestions($onchange_array[$i]['questions'],$section_id);
|
||||||
|
foreach ($value as $key => $val){ $temp_array[$key] = $val; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// echo 'FIRST';print_r($temp_array[ $question['question_key'] ]);
|
// echo 'FIRST';print_r($temp_array[ $question['question_key'] ]);
|
||||||
if(substr_count($temp_array[ $question['question_key'] ], ','))
|
if(substr_count($temp_array[ $question['question_key'] ], ','))
|
||||||
@ -745,7 +753,6 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//echo "SDKJHKSJ**";
|
|
||||||
$group_temp = array();
|
$group_temp = array();
|
||||||
foreach ($question['questions_group'] as $group_key => $group_value)
|
foreach ($question['questions_group'] as $group_key => $group_value)
|
||||||
{
|
{
|
||||||
@ -756,12 +763,12 @@ class Flyhi_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// //print_r($temp_array);die();
|
|
||||||
// if($section_id == 2)
|
// if($section_id == 2)
|
||||||
// {
|
// {
|
||||||
// //print_r(json_decode($section_array['section_data'],true)); die();
|
// //print_r(json_decode($section_array['section_data'],true)); die();
|
||||||
// die();
|
// die();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return $temp_array;
|
return $temp_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -356,15 +356,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
<td colspan="3" >Loan Amount Applied for (Rs)</td>
|
||||||
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_amount_applied'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied']):'Not Provided'; ?> </td>
|
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_amount_applied'])?$rupee_symbol.' '.MYUTIL::customIndianNumberFormat($section1['loan_amount_applied']):'Not Provided'; ?> </td>
|
||||||
<td colspan="2">Total Fund Requirement (Rs)</td>
|
<td colspan="2" >Loan Tenure (Months)</td>
|
||||||
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['total_fund_requirement'])?$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement']):'Not Provided'; ?> </td>
|
<td class = "tdcenteralign" colspan="2"> <?php echo isset($section1['loan_tenor'])?$section1['loan_tenor']:'Not Provided'; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<!-- <tr>
|
||||||
<td colspan="3" >Loan Tenure (Months)</td>
|
<td colspan="3">Total Fund Requirement (Rs)</td>
|
||||||
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['loan_tenure'])?$section1['loan_tenure']:'Not Provided'; ?> </td>
|
<td class = "tdcenteralign" colspan="3"> <?php echo isset($section1['total_fund_requirement'])?$rupee_symbol.' '. MYUTIL::customIndianNumberFormat($section1['total_fund_requirement']):'Not Provided'; ?> </td>
|
||||||
<td colspan="2" ></td>
|
<td colspan="2" ></td>
|
||||||
<td class = "tdcenteralign" colspan="2"></td>
|
<td class = "tdcenteralign" colspan="2"></td>
|
||||||
</tr>
|
</tr> -->
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user