diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 018de5b5..079b42b3 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -5140,26 +5140,9 @@ class PD_Controller extends REST_Controller { $t = substr_replace($t,'',strpos($t,''),(strlen(''))); } - //echo $t; - //die(); - - // if (!is_dir(APPPATH.'views/pd_reports/'.$pdid)) { - // $dust = mkdir(APPPATH.'views/pd_reports/'.$pdid, 0777, TRUE); - // } - // $pd_report_time = date('Y-m-d-h-i-s'); - // $pd_report_store = APPPATH.'views/pd_reports/'.$pdid.'/'.$pd_report_time.'.html'; - // file_put_contents($pd_report_store,$t); - - // $update = $this->PD_Model->updateRecords(array('pd_report_html_filename' => $pd_report_time),PDTRIGGER,array('pd_id' => $pdid)); - - // if(count($update)) - // { - // $dat['dataStatus'] = true; - // $dat['status'] = REST_Controller::HTTP_OK; - // $dat['msg'] = 'Report Generated Sucessfully..!'; - // $this->response($dat,REST_Controller::HTTP_OK); - // } + echo $t; + //PDF Gen using DOM PDF $pdf_doc = $this->pdfgenerator->generate($t, $filename='version', $stream=false, $paper = 'A4', $orientation = "portrait"); //End of PDF Gen using DOM PDF @@ -6883,28 +6866,30 @@ class PD_Controller extends REST_Controller { #####Address Form Questions######## - if(count($pd_images[5])) + if($client != "WEB") { - $approach_image_count = 0; - - foreach ($pd_images[5] as $key => $value) + if(count($pd_images[5])) { - if(substr_count(strtolower($value['pd_document_title']),strtolower('Approach to PD Location'))) + $approach_image_count = 0; + + foreach ($pd_images[5] as $key => $value) { - $approach_image_count++; + if(substr_count(strtolower($value['pd_document_title']),strtolower('Approach to PD Location'))) + { + $approach_image_count++; + } + } + + if(!$approach_image_count){ $incomplete_details[] = 'Address Section - Approach to PD location Image not captured'; } + + } + else + { + $incomplete_details[] = 'Address Section - Approach to PD location Image not captured'; } - - if(!$approach_image_count){ $incomplete_details[] = 'Address Section - Approach to PD location Image not captured'; } - } - else - { - $incomplete_details[] = 'Address Section - Approach to PD location Image not captured'; - - } - #####Business Form Questions######## $business_form = (json_decode($form_data[13][0]['processed_json'],true)); //print_r($business_form);die(); @@ -7084,8 +7069,7 @@ class PD_Controller extends REST_Controller { if(count($supplier_form)) { - - if(array_key_exists('manufacturing_details',$supplier_form)) + if(array_key_exists('manufacturing_details',$supplier_form)) { if(isset($supplier_form['manufacturing_details'][0]['main_raw_materials'])) { @@ -7166,6 +7150,10 @@ class PD_Controller extends REST_Controller { { $incomplete_details[] = 'Supplier Section - '.$supplier_name.' - Images Not Found'; } + } + else if($trading_value['trade_product_name'] == "" && $trading_value['trade_supplier_name'] == "" && $trading_value['trade_product_contact_person_name'] != "" && ($trading_value['trade_product_contact_person_mobile_number'] == "" || $trading_value['person_landline'] == "")) + { + } else { @@ -7231,6 +7219,10 @@ class PD_Controller extends REST_Controller { } } + else if($value['manufacturing_product_name'] == "" && $value['manufacturing_client_name'] == "" && $value['manufacturing_contact_person_name'] == "" && ($value['manufacturing_contact_person_mobile_number'] == "" || $value['person_landline'] == "")) + { + + } else { $incomplete_details[] = 'Client Section - Client (Manufacturing Product '.($key+1).') Details not sufficient'; @@ -7271,6 +7263,10 @@ class PD_Controller extends REST_Controller { { $incomplete_details[] = 'Client Section - '.$client_name .'- Images Not Found'; } + } + else if($value['trade_product_name'] == "" && (isset($value['trade_client_name'])) && $value['trade_client_name'] == "" && $value['trade_product_contact_person_name'] == "" && ($value['trade_product_contact_person_mobile_number'] == "" || $value['person_landline'] == "")) + { + } else { @@ -7312,6 +7308,10 @@ class PD_Controller extends REST_Controller { $incomplete_details[] ='Client Section - ' .$client_name .'- Images Not Found'; } + } + else if($value['service_provider_product_name'] == "" && $value['service_provider_client_name'] == "" && $value['service_provider_product_contact_person_name'] == "" && ($value['service_provider_product_contact_person_mobile_number'] == "" || $value['person_landline'] == "")) + { + } else { diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf index d6e9d5a7..eddd05d2 100644 Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index f3a3ad0e..e670eb19 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -1,5 +1,5 @@ @@ -209,7 +209,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); /*font-family: Merriweather;*/ border-collapse: collapse; width: auto; - //display:inline; + } .billwise_table td, .billwise_table th { @@ -262,7 +262,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); #billwise { box-sizing: content-box; - disply:inline; + /*disply:inline;*/ width: 100%; height: auto; padding: 10px; @@ -306,7 +306,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); /* #########Person met card css######### */ .chip { - /*display: inline-block;*/ + padding: 0 25px; height: 100px; width: 600px; @@ -432,7 +432,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); echo "

".$main_applicant_name."

"; echo ""; - echo "



"; + echo "



";` ?> @@ -891,6 +891,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $final_remark_data = json_decode($pd_processed_forms[20][0]['processed_json'],true) ; $business_assets_details = json_decode($pd_processed_forms[22][0]['processed_json'],true); + //print_r($business_assets_details);die(); $address_images = $pd_images[5]; //print_r($address_images);die(); @@ -1965,6 +1966,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> + +
@@ -1973,9 +1978,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - @@ -1987,8 +1989,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
From To
Sales / Revenue (Rs)
- - + +
@@ -2016,17 +2018,20 @@ defined('BASEPATH') OR exit('No direct script access allowed'); }else { echo "

As per Loan Applicant(s) met, the financials figures were not provided.

"; } ?> - +

Working Capital Cycle:

Particulars Range provided Final Considered
- - + +
S.No Particulars Days
1 Debtor Days
2 Creditor Days
1 Debtor Days
2 Creditor Days
3 Stock Days
+ +

Working Capital Facilities:

@@ -2038,7 +2043,9 @@ defined('BASEPATH') OR exit('No direct script access allowed'); }?>
- The Loan Applicants have not availed any Working Capital Facilities from any financial institution.

";} ?> + The Loan Applicants have not availed any Working Capital Facilities from any financial institution.

";} + } + ?>