From fae994495bc44ab42f50cc3223d6f5249255b807 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Fri, 9 Aug 2019 11:20:17 +0530 Subject: [PATCH] TINY ISSUES --- api/application/helpers/rentalform_helper.php | 19 ++++++++++++++----- api/application/helpers/stockform_helper.php | 4 ++-- .../views/report_templates/JSONTOREPORT.php | 18 +++++++++++------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/api/application/helpers/rentalform_helper.php b/api/application/helpers/rentalform_helper.php index d6973b57..b892e527 100644 --- a/api/application/helpers/rentalform_helper.php +++ b/api/application/helpers/rentalform_helper.php @@ -30,7 +30,10 @@ class Rentalform } $property_owners_name = substr_replace($property_owners_name,' ',strrpos($property_owners_name,','),1); - $property_owners_name = substr_replace($property_owners_name,' and ',strrpos($property_owners_name,','),1); + if(strrpos($property_owners_name,',')) + { + $property_owners_name = substr_replace($property_owners_name,' and ',strrpos($property_owners_name,','),1); + } $property_showing_persons_name = null; foreach($rental_data['person_met'] as $person_met){ @@ -46,7 +49,12 @@ class Rentalform } $property_showing_persons_name = substr_replace($property_showing_persons_name,' ',strrpos($property_showing_persons_name,','),1); - $property_showing_persons_name = substr_replace($property_showing_persons_name,' and ',strrpos($property_showing_persons_name,','),1); + + if(strrpos($property_owners_name,',')) + { + $property_showing_persons_name = substr_replace($property_showing_persons_name,' and ',strrpos($property_showing_persons_name,','),1); + } + $property_document_proof_visted = $rental_data['property_ownership_proof_documents'] == 1 ? 'Yes': 'No'; $type_of_document_visited = (substr_count($rental_data['sighted_documents']['name'], 'Others')) ? $rental_data['other_sighted_documents'] : $rental_data['sighted_documents']['name']; @@ -65,7 +73,7 @@ class Rentalform $temp = array(); //if($unit['tenant_lessees_options'] == 1) { $temp['lesse_name'] = $unit['name_tenant_lessees'];} else { $temp['lesse_name'] = 'Not Available' ; } - $temp['agreement_tenant_lessees_name'] = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']: 'Not Provided
('. $unit['name_tenant_lessees_reason'] .')'; + $temp['agreement_tenant_lessees_name'] = isset($unit['agreement_tenant_lessees_name']) ? $unit['agreement_tenant_lessees_name']: ( isset($unit['name_tenant_lessees']) ? $unit['name_tenant_lessees'] : 'Not Provided
('. $unit['name_tenant_lessees_reason'] .')' ); $temp['agreement_monthly_rent_amount'] = isset($unit['agreement_monthly_rent_amount']) ? $unit['agreement_monthly_rent_amount'] : $unit['monthly_rent_amount']; $temp['agreement_security_deposit_amount'] = isset($unit['agreement_security_deposit_amount']) ? $unit['agreement_security_deposit_amount']: $unit['securtity_deposit_amount']; $temp['property_cover_area'] = $unit['property_cover_area'] .' '. $unit['unit_measurement']['name']; @@ -75,8 +83,9 @@ class Rentalform $temp['payment_mode'] .= ')'; $temp['rent_agreement_executed'] = $unit['is_rent_agreement_executed'] == 1 ? 'Yes' : 'No' ; - - + // echo $unit['agreement_date']; + // echo explode('T',$unit['agreement_date'])[0]; + // echo date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y');die(); $temp['leease_period'] = isset($unit['agreement_date']) ? 'lease start from '. date_format(date_create_from_format("Y-m-d",explode('T',$unit['agreement_date'])[0]) ,'M-Y') .' to '.date_format(date_create_from_format("d/m/Y",$unit['agreement_expiring_date']),'M-Y') : 'NA'; array_push($unit_wise_details,$temp); diff --git a/api/application/helpers/stockform_helper.php b/api/application/helpers/stockform_helper.php index 4d6a242f..fe6aac90 100644 --- a/api/application/helpers/stockform_helper.php +++ b/api/application/helpers/stockform_helper.php @@ -84,11 +84,11 @@ public static function getStockWholesaleDetails($goods){ // get wholesale public static function getStockServiceDetails($services){ - // goods + // print_r($services);die(); if(count($services)>0){ $services = array_map(function($tag) { $getUom= $tag['service_provider_uom']==1 ? $tag['service_provider_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : ''); - $getSufficient= (strtoupper($tag['service_provider_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_service_goods']) =='YES') ? 'Yes, the stock of service providing observed' : 'No, the stock of service providing observed because of '.$tag['service_goods_remarks']); + $getSufficient = (strtoupper($tag['service_provider_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_service_goods']) =='YES') ? 'Yes, the stock of service providing observed' : 'No, the stock of service providing observed because of '.$tag['service_goods_remarks']); return array( 'name' => $tag['service_provider_name'], 'type' => 'Service Providing', diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 05d3175a..0aea4228 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -976,7 +976,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - +
PD Location Approach Name Board of Business
PD Location Approach Name Board of Business/Entrance
@@ -1017,11 +1017,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if($first_business_form['was_the_company_name_board_sighted'] == 'yes') { - echo '
  • Business Name board was seen at visited address.Business Form
  • '; + echo '
  • The Business Name board was seen at the visited address.Business Form
  • '; } else { - echo '
  • Business Name board was not seen at visited address.Business Form
  • '; + echo '
  • The Business Name board was not seen at the visited address.Business Form
  • '; } if($business_assets_details['business_assets_for_address'][0]['business_is_pd_visited'] == 'yes') { @@ -2890,16 +2890,17 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } // this is for stock service details + //print_r($stockRow['servicing_details']); if(count($stockRow['servicing_details'][0]['service_provider']) > 0){ $bindStockResult["service_stocks"]=Stockform::getStockServiceDetails($stockRow['servicing_details'][0]['service_provider']); } else { $bindStockResult["service_stocks"]=array(); } - - count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult; + //print_r($bindStockResult);die(); + count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'] || $bindStockResult["service_stocks"])? array_push($stockResult,$bindStockResult) : $stockResult; //echo "**********************"; - //print_r($stockResult); + //print_r($stockResult);die(); ?> For property'.($key + 1).' Third Party check has done with ' . $value['third_check_details']['whom_third_party_check_done']; echo isset($value['third_check_details']['description_third_party_check_done']) ? ' ('. $value['third_check_details']['description_third_party_check_done'].'). ' : ' '; - echo ' ' . $rupee_symbol .' '. MYUTIL::customIndianNumberFormat( $value['third_check_details']['rental_rates_third_party_check_done'] ) .' is rental rate in the area as per person whom third party check is done.'; + if($value['third_check_details']['rental_rates_third_party_check_done'] != "") + { + echo 'Rental rates in the area as per person whom third party check is done is '.$value['third_check_details']['rental_rates_third_party_check_done']; + } } else {