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 ' |