MONEYWISE REPORT TRIGGER UPDATE NAME TRIM

This commit is contained in:
Velz2020 2019-11-12 11:55:50 +05:30
parent da6640c9cb
commit 28299afd98
2 changed files with 62 additions and 24 deletions

View File

@ -554,7 +554,7 @@ class PD_Controller extends REST_Controller {
foreach($pd_applicant_details as $pd_applicant_detail) foreach($pd_applicant_details as $pd_applicant_detail)
{ {
$pd_applicant_detail['fk_pd_id'] = $pd_id; $pd_applicant_detail['fk_pd_id'] = $pd_id;
$pd_applicant_detail['applicant_name'] = MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['applicant_name']); $pd_applicant_detail['applicant_name'] = trim(MYUTIL::applicantNameCamelCaseConvertion($pd_applicant_detail['applicant_name']));
$co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS); $co_applicant_id = $this->PD_Model->saveRecords($pd_applicant_detail,PDAPPLICANTSDETAILS);
if($co_applicant_id != null || $co_applicant_id != '') if($co_applicant_id != null || $co_applicant_id != '')
{ {
@ -1272,6 +1272,7 @@ public function assignPDTempalate($data)
//print_r($this->post());die(); //print_r($this->post());die();
foreach($pd_applicant_details as $pd_applicant_detail) foreach($pd_applicant_details as $pd_applicant_detail)
{ {
$pd_applicant_detail['applicant_name'] = trim($pd_applicant_detail['applicant_name']);
if($pd_applicant_detail['pd_co_applicant_id'] != null || $pd_applicant_detail['pd_co_applicant_id'] != "") if($pd_applicant_detail['pd_co_applicant_id'] != null || $pd_applicant_detail['pd_co_applicant_id'] != "")
{ {
//$pd_id = $pd_applicant_detail['fk_pd_id']; //$pd_id = $pd_applicant_detail['fk_pd_id'];
@ -2559,7 +2560,7 @@ public function assignPDTempalate($data)
case 24: case 24:
$processed_json = GETPROCESSEDJSON::convertCreditManagerQueriesForm($records,$formid); $processed_json = GETPROCESSEDJSON::convertCreditManagerQueriesForm($records,$formid);
$records['docs_to_be_sighted'] = $processed_json['docs_to_be_sighted']; $records['docs_to_be_sighted'] = isset($processed_json['docs_to_be_sighted']) ? $processed_json['docs_to_be_sighted'] : null;
unset($processed_json['docs_to_be_sighted']); unset($processed_json['docs_to_be_sighted']);
@ -2953,9 +2954,11 @@ public function getPDFormDetailsJSON_post()
{ {
$bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id']; $bucketname = LENDER_BUCKET_NAME_PREFIX.$pd_master_details[0]['fk_lender_id'];
//echo $bucketname; //echo $bucketname;
//print_r($credit_manager_form_data);die();
foreach ($pd_documnets as $doc_key => $doc_value) { foreach ($pd_documnets as $doc_key => $doc_value) {
if(is_array($credit_manager_form_data['docs_to_be_sighted']) && count($credit_manager_form_data['docs_to_be_sighted']))
{
foreach ($credit_manager_form_data['docs_to_be_sighted'] as $docs_to_be_sighted_key => $docs_to_be_sighted_value) foreach ($credit_manager_form_data['docs_to_be_sighted'] as $docs_to_be_sighted_key => $docs_to_be_sighted_value)
{ {
if(isset($docs_to_be_sighted_value['img']) && $docs_to_be_sighted_value['img'] == $doc_value['pd_document_id']) if(isset($docs_to_be_sighted_value['img']) && $docs_to_be_sighted_value['img'] == $doc_value['pd_document_id'])
@ -2970,6 +2973,7 @@ public function getPDFormDetailsJSON_post()
} }
} }
} }
}
return $credit_manager_form_data; return $credit_manager_form_data;
} }
@ -5893,10 +5897,10 @@ public function getPDFormDetailsJSON_post()
// die(); // die();
// foreach($u as $v) // foreach($u as $v)
// { // {
// $this->aws_cognito->adminSetUserPassword('harshita.nadigatla@imgc.com'); $this->aws_cognito->adminSetUserPassword('harshita.nadigatla@imgc.com');
// } // }
//die(); die();
$is_regenerate = 0; $is_regenerate = 0;
@ -6020,7 +6024,7 @@ public function getPDFormDetailsJSON_post()
$t = ""; $t = "";
if(!count($add_on_pd)) if(!count($add_on_pd))
{ {
if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX') if($data['pd_master_details'][0]['lender_short_name'] == 'CLIX' || $data['pd_master_details'][0]['lender_short_name'] == 'MONEYWISE')
{ {
$t = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true); $t = $this->load->view('report_templates/JSONTOREPORT_CLIX',$data,true);
} }

View File

@ -1333,7 +1333,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$bindEachResult["company_details"]=$companyList; $bindEachResult["company_details"]=$companyList;
// this is for partner details // this is for partner details
if(array_key_exists('partners',$businessRow)){ if(array_key_exists('partners',$businessRow)){
$bindEachResult["partner"]=Businessform::getPartnerDetails($businessRow['partners']); $bindEachResult["partner"]=Businessform::getPartnerDetails($businessRow['partners'],$pd_master_details[0]['pd_id']);
} }
else { else {
$getPartner=array(); $getPartner=array();
@ -1523,7 +1523,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</table> </table>
<!--this is for family members involved in business --> <!--this is for family members involved in business -->
<!-- <?php <?php
//print_r($fetchRow['family_members_involved']); //print_r($fetchRow['family_members_involved']);
if(count($fetchRow['family_members_involved']) >0){ ?> if(count($fetchRow['family_members_involved']) >0){ ?>
<div> <div>
@ -1556,7 +1556,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
</tbody> </tbody>
</table> </table>
<?php }?> --> <?php }?>
<!-- end family members --> <!-- end family members -->
<!-- start manufacturing --> <!-- start manufacturing -->
@ -2428,6 +2428,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_fifth_row = ''; $client_fifth_row = '';
$client_sixth_row = ''; $client_sixth_row = '';
$client_seventh_row = ''; $client_seventh_row = '';
$client_eigth_row = '';
$to_no_of_clients = 0; $to_no_of_clients = 0;
$done_on_credit = 0; $done_on_credit = 0;
$name_of_the_company = ''; $name_of_the_company = '';
@ -2454,6 +2455,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_fifth_row = '<tr><td class="customtd">5</td><td class="customtd">Payment Terms</td>'; $client_fifth_row = '<tr><td class="customtd">5</td><td class="customtd">Payment Terms</td>';
$client_sixth_row = '<tr><td class="customtd">6</td><td class="customtd">Payment Mode</td>'; $client_sixth_row = '<tr><td class="customtd">6</td><td class="customtd">Payment Mode</td>';
$client_seventh_row = '<tr><td class="customtd">7</td><td class="customtd">No of Days Credit</td>'; $client_seventh_row = '<tr><td class="customtd">7</td><td class="customtd">No of Days Credit</td>';
$client_eigth_row = '<tr><td class="customtd">8</td><td class="customtd">Contribution to Total Turnover in %</td>';
// this is for manufacturing // this is for manufacturing
@ -2496,6 +2498,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? '<td class="customtd">'. $main_raw_material['manufacturing_credit_days_from'].' to '. $main_raw_material['manufacturing_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ; $client_seventh_row .= $main_raw_material['manufacturing_credit_days_from'] && $main_raw_material['manufacturing_credit_days_to'] ? '<td class="customtd">'. $main_raw_material['manufacturing_credit_days_from'].' to '. $main_raw_material['manufacturing_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ;
$client_eigth_row .= isset($main_raw_material['manufacturing_contribution_total_turnover']) && $main_raw_material['manufacturing_contribution_total_turnover'] != "" ? '<td class="customtd">'. $main_raw_material['manufacturing_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
} }
} }
@ -2540,6 +2544,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to']? '<td class="customtd">'. $trading_product['trade_product_credit_days_from'].' to '. $trading_product['trade_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ; $client_seventh_row .= $trading_product['trade_product_credit_days_from'] && $trading_product['trade_product_credit_days_to']? '<td class="customtd">'. $trading_product['trade_product_credit_days_from'].' to '. $trading_product['trade_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ;
$client_eigth_row .= isset($main_raw_material['trade_product_contribution_total_turnover']) && $main_raw_material['trade_product_contribution_total_turnover'] != "" ? '<td class="customtd">'. $main_raw_material['trade_product_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
} }
@ -2585,6 +2591,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to']? '<td class="customtd">'. $service_product['service_provider_product_credit_days_from'].' to '. $service_product['service_provider_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ; $client_seventh_row .= $service_product['service_provider_product_credit_days_from'] && $service_product['service_provider_product_credit_days_to']? '<td class="customtd">'. $service_product['service_provider_product_credit_days_from'].' to '. $service_product['service_provider_product_credit_days_to'].' days'.'</td>' :'<td class="customtd"> NIL </td>' ;
$client_eigth_row .= isset($main_raw_material['service_provider_contribution_total_turnover']) && $main_raw_material['service_provider_contribution_total_turnover'] != "" ? '<td class="customtd">'. $main_raw_material['service_provider_contribution_total_turnover'].'</td>' :'<td class="customtd"> NA </td>' ;
} }
} }
@ -2601,6 +2609,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$client_fifth_row .= '</tr>'; $client_fifth_row .= '</tr>';
$client_sixth_row .= '</tr>'; $client_sixth_row .= '</tr>';
$client_seventh_row .= '</tr>'; $client_seventh_row .= '</tr>';
$client_eigth_row .= '</tr>';
//echo $client_third_row; //echo $client_third_row;
?> ?>
@ -2631,9 +2640,18 @@ defined('BASEPATH') OR exit('No direct script access allowed');
<?php echo $client_second_row?> <?php echo $client_second_row?>
<?php echo $client_third_row?> <?php echo $client_third_row?>
<?php echo $client_fourth_row?> <?php echo $client_fourth_row?>
<?php //echo $client_fifth_row?>
<?php //echo $client_sixth_row?> <?php
<?php //echo $client_seventh_row?> if($pd_master_details[0]['lender_short_name'] == 'MONEYWISE')
{
?>
<?php echo $client_fifth_row?>
<?php echo $client_sixth_row?>
<?php echo $client_seventh_row?>
<?php echo $client_eigth_row?>
<?php
}
?>
</tbody> </tbody>
@ -2707,6 +2725,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_fifth_row = '<tr><td class="customtd">5</td><td class="customtd">Payment Terms</td>'; $supplier_fifth_row = '<tr><td class="customtd">5</td><td class="customtd">Payment Terms</td>';
$supplier_sixth_row = '<tr><td class="customtd">6</td><td class="customtd">Payment Mode</td>'; $supplier_sixth_row = '<tr><td class="customtd">6</td><td class="customtd">Payment Mode</td>';
$supplier_seventh_row = '<tr><td class="customtd">7</td><td class="customtd">No of Days Credit</td>'; $supplier_seventh_row = '<tr><td class="customtd">7</td><td class="customtd">No of Days Credit</td>';
$supplier_eigth_row = '<tr><td class="customtd">8</td><td class="customtd">Contribution to Total Purchase in %</td>';
if(isset($pd_processed_forms[1][$business_count])) if(isset($pd_processed_forms[1][$business_count]))
{ {
@ -2752,7 +2771,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '<td class="customtd">'. $raw['person_stdcode'].' '.$raw['person_landline'].'</td></tr>' : '<td class="customtd">'.'Not Provided'.'</td>'; $supplier_fourth_row .= $raw['person_stdcode'] && $raw['person_landline'] ? '<td class="customtd">'. $raw['person_stdcode'].' '.$raw['person_landline'].'</td>' : '<td class="customtd">'.'Not Provided'.'</td>';
@ -2764,6 +2783,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_seventh_row .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? '<td class="customtd">'. $raw['manufacturing_credit_days_from'].' to '. $raw['manufacturing_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>'; $supplier_seventh_row .= $raw['manufacturing_credit_days_from'] && $raw['manufacturing_credit_days_to'] ? '<td class="customtd">'. $raw['manufacturing_credit_days_from'].' to '. $raw['manufacturing_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>';
//array_push($supplierResult,$temp); //array_push($supplierResult,$temp);
$supplier_eigth_row .= isset($raw['manufacturing_contribution_total_purchase']) && $raw['manufacturing_contribution_total_purchase'] != "" ? '<td class="customtd">'.$raw['manufacturing_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
} }
} }
@ -2808,6 +2828,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_sixth_row .= $tradeRow['trade_product_payment_mode'] ? '<td class="customtd">'. $tradeRow['trade_product_payment_mode'] .'</td>' : '<td class="customtd">NA</td>'; $supplier_sixth_row .= $tradeRow['trade_product_payment_mode'] ? '<td class="customtd">'. $tradeRow['trade_product_payment_mode'] .'</td>' : '<td class="customtd">NA</td>';
$supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '<td class="customtd">'. $tradeRow['trade_product_credit_days_from'].' to '. $tradeRow['trade_product_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>'; $supplier_seventh_row .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '<td class="customtd">'. $tradeRow['trade_product_credit_days_from'].' to '. $tradeRow['trade_product_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>';
$supplier_eigth_row .= isset($raw['trade_product_contribution_total_purchase']) && $raw['trade_product_contribution_total_purchase'] != "" ? '<td class="customtd">'.$raw['trade_product_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
///array_push($supplierResult,$temp); ///array_push($supplierResult,$temp);
//} //}
@ -2852,6 +2874,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_sixth_row .= $serviceRow['service_provider_payment_mode'] ? '<td class="customtd">'. $serviceRow['service_provider_payment_mode'] .'</td>' : '<td class="customtd">NA</td>'; $supplier_sixth_row .= $serviceRow['service_provider_payment_mode'] ? '<td class="customtd">'. $serviceRow['service_provider_payment_mode'] .'</td>' : '<td class="customtd">NA</td>';
$supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '<td class="customtd">'. $serviceRow['service_provider_credit_days_from'].' to '. $serviceRow['service_provider_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>'; $supplier_seventh_row .= $serviceRow['service_provider_credit_days_from'] && $serviceRow['service_provider_credit_days_to'] ? '<td class="customtd">'. $serviceRow['service_provider_credit_days_from'].' to '. $serviceRow['service_provider_credit_days_to'].' days</td>' : '<td class="customtd">NA</td>';
$supplier_eigth_row .= isset($raw['service_provider_contribution_total_purchase']) && $raw['service_provider_contribution_total_purchase'] != "" ? '<td class="customtd">'.$raw['service_provider_contribution_total_purchase'] .'</td>' : '<td class="customtd"> NA </td>' ;
//array_push($supplierResult,$temp); //array_push($supplierResult,$temp);
//} //}
@ -2866,6 +2890,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$supplier_fifth_row .= '</tr>'; $supplier_fifth_row .= '</tr>';
$supplier_sixth_row .= '</tr>'; $supplier_sixth_row .= '</tr>';
$supplier_seventh_row .= '</tr>'; $supplier_seventh_row .= '</tr>';
$supplier_eigth_row .= '</tr>';
} }
// echo "dsfnsdkfnj**********"; // echo "dsfnsdkfnj**********";
// print_r($supplierResult);// // print_r($supplierResult);//
@ -2901,9 +2926,15 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo $supplier_second_row; echo $supplier_second_row;
echo $supplier_third_row; echo $supplier_third_row;
echo $supplier_fourth_row; echo $supplier_fourth_row;
// echo $supplier_fifth_row;
// echo $supplier_sixth_row; if($pd_master_details[0]['lender_short_name'] == 'MONEYWISE')
// echo $supplier_seventh_row; {
echo $supplier_fifth_row;
echo $supplier_sixth_row;
echo $supplier_seventh_row;
echo $supplier_eigth_row;
}
?> ?>
</tbody> </tbody>
@ -2996,6 +3027,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$is_stock_sufficient_enough_remarks = $stockRow['finished_and_traded_goods_remarks']; $is_stock_sufficient_enough_remarks = $stockRow['finished_and_traded_goods_remarks'];
$is_raw_materials_sufficient_enough = null; $is_raw_materials_sufficient_enough = null;
$is_raw_materials_sufficient_enough_remarks = null; $is_raw_materials_sufficient_enough_remarks = null;
$how_was_the_stock_validated = isset($stockRow['stock_validated']) ? $stockRow['stock_validated'] : null;
$is_sufficiant_service_goods = $stockRow['is_sufficiant_service_goods']; $is_sufficiant_service_goods = $stockRow['is_sufficiant_service_goods'];
$bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1); $bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1);
// this is for stock manufacturing details // this is for stock manufacturing details
@ -3178,6 +3210,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
echo '<p style="text-align:justify;">Stock not required to be maintained.</p>'; echo '<p style="text-align:justify;">Stock not required to be maintained.</p>';
} }
echo '<p>'. $how_was_the_stock_validated ? 'How was stock validated :- '.$how_was_the_stock_validated : ''.'</p>';
$stock_photo_count = array_filter($pd_images[11],function($d) use ($business_count){ if($d['company_id'] == ($business_count + 1)){ return 1;}else {return 0;} }); $stock_photo_count = array_filter($pd_images[11],function($d) use ($business_count){ if($d['company_id'] == ($business_count + 1)){ return 1;}else {return 0;} });
$stock_img_row_count = ceil(count($stock_photo_count) / 3); $stock_img_row_count = ceil(count($stock_photo_count) / 3);
if(count($stock_photo_count)){ if(count($stock_photo_count)){
@ -3637,7 +3671,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
$is_personal_info_available = 1; $is_personal_info_available = 1;
if(count($otherAssetRow['assets_details'])>0){ if(count($otherAssetRow['assets_details'])>0){
$otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],,$pd_master_details[0]['pd_id']); $otherAssetResult=ASSETSFORM::getOthersAssetsDetails($otherAssetRow['assets_details'],$pd_master_details[0]['pd_id']);
//print_r($otherAssetResult); //print_r($otherAssetResult);
} }