PD REPORT BUSI ASSEST REVIEW
This commit is contained in:
parent
bb146b3398
commit
bf22528350
Binary file not shown.
@ -112,139 +112,120 @@ public static function getOthersAssetsDetails($values){
|
||||
return $mergeResult;
|
||||
}
|
||||
|
||||
// business asset details
|
||||
public static function getBusinessAssetsDetails($values){
|
||||
$mergeResult=array();
|
||||
foreach($values as $fetchVal){
|
||||
// echo "helper";
|
||||
// print_r($fetchVal);
|
||||
$storeValue=array();
|
||||
if($fetchVal['business_assets_mode'] != ""){
|
||||
$storeValue['business_assets_mode'] = $fetchVal['business_assets_mode'];
|
||||
|
||||
// business asset details
|
||||
public static function getBusinessAssetsDetails($business_assets){
|
||||
|
||||
|
||||
$header_row = '<tr><th>Particulars</th>';
|
||||
$first_row = '<tr><td>Asset Type</td>';
|
||||
$sec_row = '<tr><td>Asset Description</td>';
|
||||
$third_row = '<tr><td>Ownership</td>';
|
||||
$fourth_row = '<tr><td>Owned by</td>';
|
||||
$fifth_row = '<tr><td>Market Value</td>';
|
||||
$sixth_row = '<tr><td>Monthly Rent</td>';
|
||||
$seventh_row = '<tr><td>Age of Asset</td>';
|
||||
$eighth_row = '<tr><td>Loan (Y/N)</td>';
|
||||
$rupee_symbol = "<span style='font-family: DejaVu Sans; sans-serif;font-size:10px'>₹</span>";
|
||||
$rental_flag = 0;
|
||||
$owned_flag = 0;
|
||||
|
||||
foreach($business_assets as $bsk => $fetchVal){
|
||||
|
||||
if($fetchVal['business_assets_mode']==4){
|
||||
switch(strtoupper($fetchVal['business_ownership_type'])) {
|
||||
case 'RENTED':
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['ownership'] = 'RENTED';
|
||||
$storeValue['business_approximate_market_value'] = 'NA';
|
||||
$storeValue['rent_amount'] = $fetchVal['business_monthly_rented_amt'];
|
||||
$owners_list = null;
|
||||
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['equipment_manufacturing_description'];
|
||||
//.' rented at Rs.'.$fetchVal['business_monthly_rented_amt'];
|
||||
$storeValue['business_approximate_market_value'] = '';
|
||||
break;
|
||||
case 'OWNED':
|
||||
$storeValue['ownership'] = 'OWNED';
|
||||
$storeValue['rent_amount'] = 'NA';
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner'][0]['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner'][0]['name'];
|
||||
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['equipment_manufacturing_description'];
|
||||
//.' purchased in '.$fetchVal['business_purchase_year'];
|
||||
|
||||
|
||||
$storeValue['business_approximate_market_value'] = 'Rs.'.$fetchVal['business_approximate_market_value'];
|
||||
break;
|
||||
default:
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['about_business_assets'] = '';
|
||||
$storeValue['business_approximate_market_value'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($fetchVal['business_name_of_the_owner']) && (is_array($fetchVal['business_name_of_the_owner'])) && count($fetchVal['business_name_of_the_owner']))
|
||||
{
|
||||
foreach($fetchVal['business_name_of_the_owner'] as $owner)
|
||||
{
|
||||
$owners_list.= ($owner['id'] != 0 ? $owner['name'].', ' : $fetchVal['business_name_of_the_other_owner'].', ');
|
||||
}
|
||||
}
|
||||
//print_r($owners_list);
|
||||
$owners_list = substr_replace($owners_list, '', strrpos($owners_list, ','),1);
|
||||
|
||||
$owners_list = $owners_list != "" || $owners_list != null ? $owners_list : 'NA';
|
||||
$ownership_type = 'NA';
|
||||
|
||||
if(!strcasecmp($fetchVal['business_ownership_type'],'owned'))
|
||||
{
|
||||
$ownership_type = strtoupper($fetchVal['business_ownership_type']);
|
||||
$owned_flag++;
|
||||
}else if(!strcasecmp($fetchVal['business_ownership_type'],'rented'))
|
||||
{
|
||||
$ownership_type = strtoupper($fetchVal['business_ownership_type']);
|
||||
$rental_flag++;
|
||||
}
|
||||
|
||||
if($fetchVal['business_assets_mode']==4){
|
||||
|
||||
$header_row .= '<th>Asset '.($bsk+1).'</th>';
|
||||
$first_row .= '<td class="customtd">'.$fetchVal['business_assets_mode_master'].'</td>';
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['equipment_manufacturing_description']).'</td>';
|
||||
$third_row .= '<td class="customtd">'. $ownership_type .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').'</td>';
|
||||
|
||||
}
|
||||
// this is for vehicle
|
||||
else if($fetchVal['business_assets_mode']==3){
|
||||
switch(strtoupper($fetchVal['business_ownership_type'])) {
|
||||
case 'RENTED':
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['ownership'] = 'RENTED';
|
||||
$storeValue['business_approximate_market_value'] = 'NA';
|
||||
$storeValue['rent_amount'] = $fetchVal['business_monthly_rented_amt'];
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['manufacturer_model_vehicle'];
|
||||
//.' rented at Rs.'.$fetchVal['business_monthly_rented_amt'];
|
||||
|
||||
break;
|
||||
case 'OWNED':
|
||||
//print_r($fetchVal['business_name_of_the_owner']);die();
|
||||
$storeValue['ownership'] = 'OWNED';
|
||||
$storeValue['rent_amount'] = 'NA';
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner'][0]['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner'][0]['name'];
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['manufacturer_model_vehicle'];
|
||||
//.' purchased in '. $fetchVal['business_purchase_year'];
|
||||
$storeValue['business_approximate_market_value'] = 'Rs.'.$fetchVal['business_approximate_market_value'];
|
||||
break;
|
||||
default:
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['about_business_assets'] = '';
|
||||
$storeValue['business_approximate_market_value'] = '';
|
||||
}
|
||||
$header_row .= '<th>Asset '.($bsk+1).'</th>';
|
||||
$first_row .= '<td class="customtd">'.$fetchVal['business_assets_mode_master'].'</td>';
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['manufacturer_model_vehicle']).'</td>';
|
||||
$third_row .= '<td class="customtd">'. $ownership_type .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').'</td>';
|
||||
}
|
||||
|
||||
// this property
|
||||
else if($fetchVal['business_assets_mode']==2){
|
||||
switch(strtoupper($fetchVal['business_ownership_type'])) {
|
||||
case 'RENTED':
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['ownership'] = 'RENTED';
|
||||
$storeValue['business_approximate_market_value'] = 'NA';
|
||||
$storeValue['rent_amount'] = $fetchVal['business_monthly_rented_amt'];
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master'];
|
||||
//.' rented at Rs.'. $fetchVal['business_monthly_rented_amt'] : $fetchVal['business_details'][0]['property_type'].' rented at Rs.'. $fetchVal['business_monthly_rented_amt'];
|
||||
|
||||
break;
|
||||
case 'OWNED':
|
||||
$storeValue['ownership'] = 'OWNED';
|
||||
$storeValue['rent_amount'] = 'NA';
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner'][0]['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner'][0]['name'];
|
||||
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master'];
|
||||
//.' purchased in '. $fetchVal['business_purchase_year'] : $fetchVal['business_details'][0]['property_type'].' purchased in '. $fetchVal['business_purchase_year'];
|
||||
$storeValue['business_approximate_market_value'] = 'Rs.'.$fetchVal['business_approximate_market_value'];
|
||||
break;
|
||||
default:
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['about_business_assets'] = '';
|
||||
$storeValue['business_approximate_market_value'] = '';
|
||||
}
|
||||
// switch(strtoupper($fetchVal['business_ownership_type'])) {
|
||||
|
||||
$header_row .= '<th>Asset '.($bsk+1).'</th>';
|
||||
$first_row .= '<td class="customtd">'.$fetchVal['business_assets_mode_master'].'</td>';
|
||||
$sec_row .= '<td class="customtd">'.($fetchVal['business_details'][0]['property_type']==1 ? $fetchVal['business_details'][0]['other_property_type']:$fetchVal['business_details'][0]['property_type_master']).'</td>';
|
||||
$third_row .= '<td class="customtd">'. $ownership_type .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? $fetchVal['business_emi'] : 'NA').'</td>';
|
||||
}
|
||||
//this is for other
|
||||
else if($fetchVal['business_assets_mode']==1){
|
||||
switch(strtoupper($fetchVal['business_ownership_type'])) {
|
||||
case 'RENTED':
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['ownership'] = 'RENTED';
|
||||
$storeValue['business_approximate_market_value'] = 'NA';
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['rent_amount'] = $fetchVal['business_monthly_rented_amt'];
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['any_other_assets'];
|
||||
//.' rented at Rs.'. $fetchVal['business_monthly_rented_amt'];
|
||||
|
||||
break;
|
||||
case 'OWNED':
|
||||
|
||||
$storeValue['ownership'] = 'OWNED';
|
||||
$storeValue['business_assets_mode_master'] = $fetchVal['business_assets_mode_master'];
|
||||
$storeValue['rent_amount'] = 'NA';
|
||||
$storeValue['business_name_of_the_owner'] = $fetchVal['business_name_of_the_owner'][0]['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner'][0]['name'];
|
||||
$storeValue['about_business_assets'] = $fetchVal['business_details'][0]['any_other_assets'];
|
||||
//.' purchased in '. $fetchVal['business_purchase_year'].' at Rs.'.$fetchVal['business_details'][0]['any_other_asset_value'];
|
||||
$storeValue['business_approximate_market_value'] = 'Rs.'.$fetchVal['business_approximate_market_value'];
|
||||
break;
|
||||
default:
|
||||
$storeValue['business_name_of_the_owner'] = '';
|
||||
$storeValue['about_business_assets'] = '';
|
||||
$storeValue['business_approximate_market_value'] = '';
|
||||
}
|
||||
$header_row .= '<th>Asset '.($bsk+1).'</th>';
|
||||
$first_row .= '<td class="customtd">'.$fetchVal['business_assets_mode_master'].'</td>';
|
||||
$sec_row .= '<td class="customtd">'.$fetchVal['business_details'][0]['any_other_assets'].'</td>';
|
||||
$third_row .= '<td class="customtd">'. $ownership_type .'</td>';
|
||||
$fourth_row .= '<td class="customtd">'.$owners_list.'</td>';
|
||||
$fifth_row .= '<td class="customtd">'.($fetchVal['business_approximate_market_value'] != "" && $fetchVal['business_approximate_market_value'] != null ? $rupee_symbol.' '.$fetchVal['business_approximate_market_value'] : 'NA').'</td>';
|
||||
$sixth_row .= '<td class="customtd">'.(($fetchVal['business_monthly_rented_amt'] != "") ? $fetchVal['business_monthly_rented_amt'] : 'NA').'</td>';
|
||||
$seventh_row .= '<td class="customtd">'.($fetchVal['business_vintage'] != "" ? $fetchVal['business_vintage'] : 'NA').'</td>';
|
||||
$eighth_row .= '<td class="customtd">'.($fetchVal['business_emi'] != "" ? strtoupper($fetchVal['business_emi']) : 'NA').'</td>';
|
||||
}
|
||||
}
|
||||
|
||||
array_push($mergeResult,$storeValue);
|
||||
}
|
||||
return $mergeResult;
|
||||
}
|
||||
}
|
||||
|
||||
$header_row .= '</tr>';
|
||||
$first_row .= '</tr>';
|
||||
$sec_row .= '</tr>';
|
||||
$third_row .= '</tr>';
|
||||
$fourth_row .= '</tr>';
|
||||
$fourth_row = $owned_flag != 0 ? $fourth_row : '';
|
||||
$fifth_row .= '</tr>';
|
||||
$fifth_row = $owned_flag != 0 ? $fifth_row : '';
|
||||
$sixth_row .= '</tr>';
|
||||
$sixth_row = $owned_flag != 0 ? $sixth_row : '';
|
||||
$seventh_row .= '</tr>';
|
||||
$eighth_row .= '</tr>';
|
||||
$eighth_row = $owned_flag != 0 ? $eighth_row : '';
|
||||
|
||||
return array('header_row' => $header_row, 'first_row' => $first_row,'sec_row'=> $sec_row,'third_row' =>$third_row,'fourth_row'=>$fourth_row,'fifth_row'=>$fifth_row,'sixth_row'=>$sixth_row,'seventh_row'=>$seventh_row,'eighth_row'=>$eighth_row);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -80,15 +80,17 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
/*font-family: Merriweather;*/
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.scorecard_table td, .scorecard_table th {
|
||||
border: 1px solid #000;
|
||||
padding: 8px;
|
||||
page-break-inside: avoid;
|
||||
|
||||
}
|
||||
|
||||
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;}
|
||||
.scorecard_table tr:nth-child(even){background-color: #f2f2f2;page-break-inside: avoid;}
|
||||
|
||||
.scorecard_table tr:hover {background-color: #ddd;}
|
||||
|
||||
@ -98,6 +100,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
text-align: center;
|
||||
background-color: #0191ed;
|
||||
color: white;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
.customth { width: 10%; }
|
||||
@ -1336,7 +1339,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$baRow = $pd_processed_forms[22][$business_count];
|
||||
|
||||
$businessAssetRow = json_decode($baRow['processed_json'],true);
|
||||
//print_r($businessAssetRow);echo "*************";
|
||||
//print_r($businessAssetRow);die();
|
||||
$bindBusinessAsset["company_name"] ='Assets used for ';
|
||||
$bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1);
|
||||
$bindBusinessAsset["company_name"] .=' Business :';
|
||||
@ -1346,11 +1349,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
array_push($businessAssetResult,$bindBusinessAsset);
|
||||
|
||||
|
||||
// print_r($businessAssetResult);die();
|
||||
// print_r($businessAssetResult);die();
|
||||
?>
|
||||
|
||||
<?php
|
||||
//print_r($businessAssetResult);die();
|
||||
//print_r($businessAssetResult);
|
||||
if(count($businessAssetResult)>0){ ?>
|
||||
<div class="page_break"> <div>
|
||||
<br>
|
||||
@ -1358,41 +1361,24 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
<?php foreach($businessAssetResult as $iterateAsset){ ?>
|
||||
<p><?php echo $iterateAsset['company_name']; ?></p>
|
||||
<table class="scorecard_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
<th>Asset Type</th>
|
||||
<th>Asset Description</th>
|
||||
<th>Ownership</th>
|
||||
<th>Monthly Rent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php echo $iterateAsset['details']['header_row']; ?>
|
||||
<tbody>
|
||||
<?php
|
||||
echo $iterateAsset['details']['first_row'];
|
||||
echo $iterateAsset['details']['sec_row'];
|
||||
echo $iterateAsset['details']['third_row'];
|
||||
echo $iterateAsset['details']['fourth_row'];
|
||||
echo $iterateAsset['details']['fifth_row'];
|
||||
echo $iterateAsset['details']['sixth_row'];
|
||||
echo $iterateAsset['details']['seventh_row'];
|
||||
echo $iterateAsset['details']['eighth_row'];
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
|
||||
|
||||
foreach($iterateAsset['details'] as $business_asset_key => $baRow){
|
||||
if(isset($baRow['business_assets_mode_master']))
|
||||
{
|
||||
$rent_amount = isset($baRow['rent_amount']) ? $rupee_symbol." ".MYUTIL::customIndianNumberFormat((double)$baRow['rent_amount']): '0.00';
|
||||
?>
|
||||
<tr>
|
||||
<td class="customtd"><?php echo ($business_asset_key+1);?></td>
|
||||
<td class="customtd"><?php echo $baRow['business_assets_mode_master']; ?></td>
|
||||
<td class="customtd"><?php echo $baRow['about_business_assets']; ?></td>
|
||||
<td class="customtd"><?php echo $baRow['ownership']; ?></td>
|
||||
<td class="customtd"><?php echo $baRow['ownership'] == 'RENTED' ? $rent_amount : "NA";?></td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }
|
||||
}} ?>
|
||||
|
||||
?>
|
||||
|
||||
<?php }
|
||||
else {?>
|
||||
<p>Business asset is not available.</p>
|
||||
<?php }
|
||||
<?php
|
||||
//die();?>
|
||||
<!-- #################end business asset #################-->
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user