MWQ CHANGES 1
This commit is contained in:
parent
920333ab86
commit
f872efac1c
@ -860,7 +860,7 @@ class SMC_Credit_PD_Controller extends REST_Controller {
|
|||||||
$photo_count = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_smc_credit_pd_id' => $pd_id),SMC_CREDIT_PD_DOCS);
|
$photo_count = $this->SMC_Credit_PD_Model->selectCustomRecords(array('*'),array('isactive' => 1,'fk_smc_credit_pd_id' => $pd_id),SMC_CREDIT_PD_DOCS);
|
||||||
if(is_array($photo_count) && count($photo_count))
|
if(is_array($photo_count) && count($photo_count))
|
||||||
{
|
{
|
||||||
$return_data['template_details'][ (count($return_data['template_details'])-1) ]['is_answered'] = 1;
|
$return_data['template_details'][ (count($return_data['template_details'])-1) ]['is_answered'] = "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
// print_r($return_data['template_details']);die();
|
// print_r($return_data['template_details']);die();
|
||||||
@ -1511,7 +1511,7 @@ public function filterSalesPDList_post() {
|
|||||||
// die();
|
// die();
|
||||||
//score card part
|
//score card part
|
||||||
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
$html_content = $this->load->view('smc_creditpd_reports/MWISE',$view_data,true);
|
||||||
echo $html_content;die();
|
// echo $html_content;die();
|
||||||
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
$pdf_name = $view_data['pd_master_details'][0]['main_applicant'];
|
||||||
$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
|
||||||
|
|||||||
@ -505,18 +505,21 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$records = $this->post('records');
|
$records = $this->post('records');
|
||||||
$is_entry_done = null;
|
$is_entry_done = null;
|
||||||
$id = null;
|
$id = null;
|
||||||
//print_r($records);die();
|
// print_r($records);//die();
|
||||||
|
|
||||||
|
|
||||||
log_message('ERROR','####SALESPD SAVE CALLED');
|
log_message('ERROR','####SALESPD SAVE CALLED');
|
||||||
|
|
||||||
$section_names = array('1' => 'General Section','2' => 'Fund Requirement','3' => 'stakeholders','4' => 'Brief of business','5' => 'Financial','6' => 'Property Details','7' => 'Final Remraks','8' => 'Officer Details','9' => 'Photography');
|
|
||||||
|
|
||||||
$count = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $records['lender_id'],'product_id' => $records['product_id']),SALES_PD_DATA);
|
|
||||||
|
|
||||||
$lender_short_name = $this->Sales_PD_Model->selectCustomRecords(array('short_name'),array('entity_id' => $records['lender_id']),ENTITY);
|
$lender_short_name = $this->Sales_PD_Model->selectCustomRecords(array('short_name'),array('entity_id' => $records['lender_id']),ENTITY);
|
||||||
|
|
||||||
$product_short_name = $this->Sales_PD_Model->selectCustomRecords(array('abbr'),array('product_id' => $records['product_id']),PRODUCTS);
|
$product_short_name = $this->Sales_PD_Model->selectCustomRecords(array('abbr'),array('product_id' => $records['product_id']),PRODUCTS);
|
||||||
|
|
||||||
|
$section_names = array('1' => 'General Section','2' => 'Fund Requirement','3' => 'stakeholders','4' => 'Brief of business','5' => 'Financial','6' => 'Property Details','7' => 'Final Remraks','8' => 'Officer Details','9' => 'Photography');
|
||||||
|
if($product_short_name == 'MEQ')
|
||||||
|
{
|
||||||
|
$section_names = array('1' => 'General Section','2' => 'Fund Requirement','3' => 'stakeholders','4' => 'Institution Details','5' => 'Product Information','6' => 'Financial Information','7' => 'Final Remraks','8' => 'Officer Details','9' => 'Photography');
|
||||||
|
}
|
||||||
|
|
||||||
|
//$count = $this->Sales_PD_Model->selectCustomRecords(array('count(*) as count'),array('lender_id' => $records['lender_id'],'product_id' => $records['product_id']),SALES_PD_DATA);
|
||||||
|
|
||||||
|
// die();
|
||||||
if($records['sales_pd_id'] == '' || $records['sales_pd_id'] == null)
|
if($records['sales_pd_id'] == '' || $records['sales_pd_id'] == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -547,7 +550,7 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
$drafted_sections = $this->Sales_PD_Model->selectCustomRecords(array('section_id'),array('status' => 0,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA);
|
$drafted_sections = $this->Sales_PD_Model->selectCustomRecords(array('section_id'),array('status' => 0,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA);
|
||||||
|
|
||||||
$completed_sections = $this->Sales_PD_Model->selectCustomRecords(array('section_id'),array('status' => 1,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA);
|
$completed_sections = $this->Sales_PD_Model->selectCustomRecords(array('section_id'),array('status' => 1,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA);
|
||||||
//print_r($completed_sections);
|
// print_r($completed_sections);die();
|
||||||
|
|
||||||
if($records['sales_pd_type'] == 1)
|
if($records['sales_pd_type'] == 1)
|
||||||
{
|
{
|
||||||
@ -573,8 +576,24 @@ class Sales_PD_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print_r($dup_of_section_names);
|
||||||
unset($dup_of_section_names[9]);//unset photograph always
|
unset($dup_of_section_names[9]);//unset photograph always
|
||||||
if($product_short_name[0]['abbr'] == "WCTL"){ unset($dup_of_section_names[6]);}
|
if($product_short_name[0]['abbr'] == "WCTL"){ unset($dup_of_section_names[6]);}
|
||||||
|
if($product_short_name[0]['abbr'] == "MEQ")
|
||||||
|
{
|
||||||
|
$gen = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('status' => 1,'sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => 1),SALESPD_SECTION_DATA);
|
||||||
|
if(count($gen))
|
||||||
|
{
|
||||||
|
$gen = json_decode($gen[0]['section_data'],true);
|
||||||
|
echo $gen['questions'][2]['answer_value'];
|
||||||
|
if($gen['questions'][2]['answer_value'] == 9 || $gen['questions'][2]['answer_value'] == 10)
|
||||||
|
{
|
||||||
|
unset($dup_of_section_names[3]);// remove stake holders if MEQ Gen sectio have constitiion as socity or trust
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
// print_r($dup_of_section_names);die();
|
// print_r($dup_of_section_names);die();
|
||||||
if(count($dup_of_section_names))
|
if(count($dup_of_section_names))
|
||||||
{
|
{
|
||||||
@ -995,12 +1014,16 @@ public function filterSalesPDList_post() {
|
|||||||
$rand_string = $this->post('rand_string');
|
$rand_string = $this->post('rand_string');
|
||||||
|
|
||||||
$sales_pd_master_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('rand_string' => $rand_string),SALES_PD_DATA);
|
$sales_pd_master_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('rand_string' => $rand_string),SALES_PD_DATA);
|
||||||
|
$product_short_name = $this->Sales_PD_Model->selectCustomRecords(array('abbr'),array('product_id' => $sales_pd_master_data[0]['product_id']),PRODUCTS);
|
||||||
$sales_pd_img_data = $this->Sales_PD_Model->selectCustomRecords(array('doc_id', 'fk_sales_pd_id','img','img_name','isactive'),array('fk_sales_pd_id' => $sales_pd_master_data[0]['sales_pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SALEPD_DOCS);
|
$sales_pd_img_data = $this->Sales_PD_Model->selectCustomRecords(array('doc_id', 'fk_sales_pd_id','img','img_name','isactive'),array('fk_sales_pd_id' => $sales_pd_master_data[0]['sales_pd_id'],'isactive' => 1,'img_name!=' => 'satellite'),SALEPD_DOCS);
|
||||||
|
|
||||||
//print_r($sales_pd_img_data);die();
|
// print_r($product_short_name);die();
|
||||||
//sales tele pd img structure array
|
//sales tele pd img structure array
|
||||||
$imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'),'name_board_seen' => array('is_multiple' => 1,'img_name' => 'Business Name Board'),'stock_image' => array('is_multiple' => 1,'img_name' => 'Stock Images'),'workplace_interior_image' => array('is_multiple' => 1,'img_name' => 'Work Place Interior'));
|
$imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'),'name_board_seen' => array('is_multiple' => 1,'img_name' => 'Business Name Board'),'stock_image' => array('is_multiple' => 1,'img_name' => 'Stock Images'),'workplace_interior_image' => array('is_multiple' => 1,'img_name' => 'Work Place Interior'));
|
||||||
|
if($product_short_name[0]['abbr'] == 'MEQ')
|
||||||
|
{
|
||||||
|
$imgs = array('selfie_with_person_met' => array('is_multiple' => 0,'img_name' => 'Selfie of the person contacted'),'hospital_building' => array('is_multiple' => 1,'img_name' => 'Hospital building photo'));
|
||||||
|
}
|
||||||
|
|
||||||
$img_data = array();
|
$img_data = array();
|
||||||
if(count($sales_pd_img_data))
|
if(count($sales_pd_img_data))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user