diff --git a/api/application/docs/sample.pdf b/api/application/docs/sample.pdf index d1bf449d..4127dca0 100644 Binary files a/api/application/docs/sample.pdf and b/api/application/docs/sample.pdf differ diff --git a/api/application/helpers/assetsform_helper.php b/api/application/helpers/assetsform_helper.php index d3cbf1a0..fc9aa048 100644 --- a/api/application/helpers/assetsform_helper.php +++ b/api/application/helpers/assetsform_helper.php @@ -225,10 +225,11 @@ public static function getBusinessAssetsDetails($values){ 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']['id']==0 ? $fetchVal['business_name_of_the_other_owner'] : $fetchVal['business_name_of_the_owner']['name']; + $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']; diff --git a/api/application/helpers/stockform_helper.php b/api/application/helpers/stockform_helper.php index a25442da..5f0b2a37 100644 --- a/api/application/helpers/stockform_helper.php +++ b/api/application/helpers/stockform_helper.php @@ -49,7 +49,8 @@ public static function getStockRetailDetails($goods){ $getUom= $tag['traded_goods_uom']==1 ? $tag['traded_goods_other_uom'] : (isset($tag['uom_master']) ? $tag['uom_master'] : ''); $getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']); return array( - 'name' => $tag['traded_goods_name'], + 'type' => 'Trading Goods', + 'name' => $tag['traded_goods_name'], 'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['traded_goods_quantity'] : '', 'uom' => strtoupper($tag['traded_goods_observed'])=='YES' ? $getUom : '', 'value' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['estimated_traded_goods_value'] : '', @@ -69,6 +70,7 @@ public static function getStockWholesaleDetails($goods){ $getSufficient= (strtoupper($tag['traded_goods_observed']) =='NO') ? 'No Stock Observed' : ((strtoupper($tag['is_sufficiant_traded_goods']) =='YES') ? 'Yes, the stock of traded goods observed' : 'No, the stock of traded goods observed because of '.$tag['traded_goods_remarks']); return array( 'name' => $tag['traded_goods_name'], + 'type' => 'Trading Goods', 'quantity' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['traded_goods_quantity'] : '', 'uom' => strtoupper($tag['traded_goods_observed'])=='YES' ? $getUom : '', 'value' => strtoupper($tag['traded_goods_observed'])=='YES' ? $tag['estimated_traded_goods_value'] : '', diff --git a/api/application/views/report_templates/JSONTOREPORT.php b/api/application/views/report_templates/JSONTOREPORT.php index 983e085a..70e7f19d 100644 --- a/api/application/views/report_templates/JSONTOREPORT.php +++ b/api/application/views/report_templates/JSONTOREPORT.php @@ -792,7 +792,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $bRow = $pd_processed_forms[13][$business_count]; $businessRow = json_decode($bRow['processed_json'],true); - + //print_r($businessRow);die(); $companyList = MYUTIL::findCompanyName($all_company_details,$businessRow['company_id'],2); //$companyList .=' The director details are as under :'; $bindEachResult["company_details"]=$companyList; @@ -862,6 +862,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); else{ $bindEachResult['business_peak_details']='The Business has no major changes in sales across season.'; } + $bindEachResult['company_employees'] = ''; // this is for no of employess details if(isset($businessRow['employees_permanent']) && $businessRow['employees_permanent'] <= 0) { $bindEachResult['company_empployees']='As per person met there are no permanent'; @@ -873,6 +874,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); { $bindEachResult['company_employees'].= 'and '.$businessRow['employees_temporary'].' temporary employee(s) with company.'; }else{ + $bindEachResult['company_employees'].= ' and no temporary employess with company'; } if(isset($businessRow['officer_total']) && $businessRow['officer_total'] > 0) @@ -881,6 +883,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $bindEachResult['officer_visit_company_employees']='At the time of PD visit, the officer sighted '.$businessRow['officer_total'] .' '.$emp.' at the business premises.'; } else{ + $bindEachResult['officer_visit_company_employees']='At the time of PD visit, PD officer could not able to see any of employees at the business premises.'; } //this is documents visited @@ -1291,7 +1294,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); + //print_r($businessAssetRow);echo "*************"; $bindBusinessAsset["company_name"] ='Assets used for '; $bindBusinessAsset["company_name"] .=MYUTIL::findCompanyName($all_company_details,$businessAssetRow['company_id'],1); $bindBusinessAsset["company_name"] .=' Business :'; @@ -1392,6 +1395,8 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $bindBusinessFinancial['working_capital_pay'] = $businessFinancialRow['pay_the_money_in_days']; $bindBusinessFinancial['working_capital_unsold_stock'] = $businessFinancialRow['unsold_stock_lies_in_days'] != "" || $businessFinancialRow['unsold_stock_lies_in_days'] != null ? $businessFinancialRow['unsold_stock_lies_in_days'] : 'Data Not Provided'; $bindBusinessFinancial['is_working_capital_facility'] = $businessFinancialRow['is_there_working_capital_available']; + if(isset($businessFinancialRow['select_working_capital_facilities_availed'])) + { foreach($businessFinancialRow['select_working_capital_facilities_availed'] as $k => $v) { switch($v['id']) @@ -1424,9 +1429,9 @@ defined('BASEPATH') OR exit('No direct script access allowed'); break; } } - + } - $bindBusinessFinancial['working_capital_facilites'] = $businessFinancialRow['select_working_capital_facilities_availed']; + $bindBusinessFinancial['working_capital_facilites'] = isset($businessFinancialRow['select_working_capital_facilities_availed']) ? $businessFinancialRow['select_working_capital_facilities_availed'] : null; //print_r($bindBusinessFinancial['select_working_capital_facilities_availed']);die(); //FINANCIALFORM::getAvailableFacilities($businessFinancialRow[-'"working_capital_facilities_availed']); @@ -1435,15 +1440,19 @@ defined('BASEPATH') OR exit('No direct script access allowed'); ?> - 0){ ?> + 0){ + + ?> +

Financial Information

0){ ?>

Company / Firm Name : " . $iterateFinance['company_name']; ?>

No of Years of Financial Statements provided : " . $iterateFinance['years_data_provided']; ?>

Snapshot of Financials as per Books of Account Provided : "; ?>

- 0){ ?> + @@ -1567,7 +1576,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');

Financial information is not available.

-
+ '.$main_raw_material['manufacturing_product_name'].''; - $client_second_row .= $main_raw_material['person_title_name_master'] ? ''; - $client_third_row .= ''; + $client_third_row .= ''; $client_fourth_row .= $main_raw_material['person_stdcode'] && $main_raw_material['person_landline'] ? '' : ''; @@ -1724,7 +1733,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_first_row .= ''; - $client_second_row .= $trading_product['person_title_name_master'] ? ''; - $client_third_row .= ''; + $client_third_row .= ''; $client_fourth_row .= $trading_product['person_stdcode'] && $trading_product['person_landline'] ? '' : ''; @@ -1765,7 +1774,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_first_row .= ''; - $client_second_row .= $service_product['person_title_name_master'] ? ''; - $client_third_row .= ''; + $client_third_row .= ''; $client_fourth_row .= $service_product['person_stdcode'] && $service_product['person_landline'] ? '' : ''; @@ -1849,7 +1858,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // this is for manufacturing $supplier_details = $pd_processed_forms[1][$business_count]; $supplierRow = json_decode($supplier_details['processed_json'],true); - //print_r($supplierRow); + //print_r($supplierRow['trade_details']);die(); $company_name = MYUTIL::findCompanyName($all_company_details,$supplierRow['company_id'],1); $total_no_of_suppliers = count($supplierRow['manufacturing_details']); $total_payments_percent_on_credit_for_supplier = 0; @@ -1867,7 +1876,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $supplier_second_row = ''; - $supplier_second_row .= $raw['person_title_name_master'] ? ''; $temp['supplier_second_row'] = $supplier_second_row.''; - $temp['supplier_third_row'] = ''.''; + $temp['supplier_third_row'] = ''.''; $temp['supplier_fourth_row'] = ''; @@ -1900,54 +1909,60 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } } // this is for trading - foreach(isset($clientRow['trade_details']) && $clientRow['trade_details'] as $tradeRow){ + //print_r($supplierRow['trade_details'][0]['trading_products']); + if(isset($supplierRow['trade_details'][0]['trading_products']) && count($supplierRow['trade_details'][0]['trading_products'])) + { + foreach($supplierRow['trade_details'][0]['trading_products'] as $tradeRow){ - $total_payments_percent_on_credit_for_supplier = $clientRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; + $total_payments_percent_on_credit_for_supplier = $supplierRow['trade_details'][0]['trading_products_total_payments_percent_on_credit']; - if(isset($tradeRow['trading_products'])){ + //if(isset($tradeRow['trading_products'])){ - foreach($tradeRow['trading_products'] as $trade){ + //foreach($tradeRow['trading_products'] as $trade){ - $temp['supplier_first_row'] = ''.''; + $temp['supplier_first_row'] = ''.''; $supplier_second_row = ''; - $supplier_second_row .= $trade['person_title_name_master'] ? ''; + $supplier_second_row .= ' '.$tradeRow['trade_supplier_name'].''; $temp['supplier_second_row'] = $supplier_second_row.''; - $temp['supplier_third_row'] = ''.''; + $temp['supplier_third_row'] = ''.''; $temp['supplier_fourth_row'] = ''; - $temp['supplier_fourth_row'] .= $trade['person_stdcode'] && $trade['person_landline'] ? '' : ''; + $temp['supplier_fourth_row'] .= $tradeRow['person_stdcode'] && $tradeRow['person_landline'] ? '' : ''; $temp['supplier_fifth_row'] = ''; - $temp['supplier_fifth_row'] .= $trade['trade_product_payment_type_master'] ? '' : ''; + $temp['supplier_fifth_row'] .= $tradeRow['trade_product_payment_type_master'] ? '' : ''; $temp['supplier_sixth_row'] = ''; - $temp['supplier_sixth_row'] .= $trade['trade_product_payment_mode'] ? '' : ''; + $temp['supplier_sixth_row'] .= $tradeRow['trade_product_payment_mode'] ? '' : ''; $temp['supplier_seventh_row'] = ''; - $temp['supplier_seventh_row'] .= $trade['trade_product_credit_days_from'] && $trade['trade_product_credit_days_to'] ? '' : ''; + $temp['supplier_seventh_row'] .= $tradeRow['trade_product_credit_days_from'] && $tradeRow['trade_product_credit_days_to'] ? '' : ''; array_push($supplierResult,$temp); - } - } + //} + //} - } - + } + } + // echo "dsfnsdkfnj**********"; + // print_r($supplierResult); +//die(); if(count($supplierResult)) { ?> @@ -1996,7 +2011,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $stockResult=array(); $stRow = $pd_processed_forms[11][$business_count]; $stockRow = json_decode($stRow['processed_json'],true); - //print_r($stockRow);die(); + //print_r($stockRow); $is_stock_sufficient_enough = $stockRow['is_sufficiant_finished_and_traded_goods']; $is_raw_materials_sufficient_enough = null; $bindStockResult["company_name"]=MYUTIL::findCompanyName($all_company_details,$stockRow['company_id'],1); @@ -2026,19 +2041,18 @@ defined('BASEPATH') OR exit('No direct script access allowed'); } count($bindStockResult['wholesale']) || count($bindStockResult['retail']) || count($bindStockResult['manufacturing'])? array_push($stockResult,$bindStockResult) : $stockResult; - + //echo "**********************"; //print_r($stockResult);die(); ?> + if(count($stockResult)){ + $stock_sr_no = 0; + ?>

Stock Details

- - 0) { ?> -
' . $main_raw_material['person_title_name_master']: '' . ''; + $client_second_row .= isset($main_raw_material['person_title_name_master']) ? '' . $main_raw_material['person_title_name_master']: ''; $client_second_row .= $main_raw_material['manufacturing_contact_person_name'] ; $client_second_row .= isset($main_raw_material['person_designation']) && $main_raw_material['person_designation']== 1 ? ' '.$main_raw_material['other_person_designation'] : ' ';// @@ -1693,7 +1702,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_second_row .= ' '.$main_raw_material['manufacturing_client_name'].''. $main_raw_material['manufacturing_contact_person_mobile_number'] .''.$main_raw_material['manufacturing_contact_person_mobile_number'] ? $main_raw_material['manufacturing_contact_person_mobile_number'] : 'Not Provided' .''. $main_raw_material['person_stdcode'].' '.$main_raw_material['person_landline'].''.'Not Provided'.''.$trading_product['trade_product_name'].'' . $trading_product['person_title_name_master']: '' . ''; + $client_second_row .= isset($trading_product['person_title_name_master']) ? '' . $trading_product['person_title_name_master']: ''; $client_second_row .= $trading_product['trade_product_contact_person_name'] ; $client_second_row .= isset($trading_product['person_designation']) && $trading_product['person_designation']== 1 ? ' '.$trading_product['other_person_designation'] : ' ';// @@ -1733,7 +1742,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_second_row .= ' '.$trading_product['trade_client_name'].''. $trading_product['trade_product_contact_person_mobile_number'] .''. $trading_product['trade_product_contact_person_mobile_number'] ? $trading_product['trade_product_contact_person_mobile_number'] : 'Not Provided'.''. $trading_product['person_stdcode'].' '.$trading_product['person_landline'].''.'Not Provided'.''.$service_product['service_provider_product_name'].'' . $service_product['person_title_name_master']: '' . ''; + $client_second_row .= isset($service_product['person_title_name_master']) ? '' . $service_product['person_title_name_master']: ''; $client_second_row .= $service_product['service_provider_product_contact_person_name'] ; $client_second_row .= isset($service_product['person_designation']) && $service_product['person_designation']== 1 ? ' '.$service_product['other_person_designation'] : ' ';// @@ -1774,7 +1783,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $client_second_row .= ' '.$service_product['service_provider_client_name'].''. $service_product['service_provider_product_contact_person_mobile_number'] .''. $service_product['service_provider_product_contact_person_mobile_number'] ? $service_product['service_provider_product_contact_person_mobile_number'] : 'Not Provided' .''. $service_product['person_stdcode'].' '.$service_product['person_landline'].''.'Not Provided'.'
2Contact Person ' . $raw['person_title_name_master']: '' . ''; + $supplier_second_row .= isset($raw['person_title_name_master']) ? '' . $raw['person_title_name_master']: '' . ''; $supplier_second_row .= $raw['manufacturing_contact_person_name'] ; $supplier_second_row .= isset($raw['person_designation']) && $raw['person_designation']== 1 ? ' '.$raw['other_person_designation'] : ' ';// @@ -1877,7 +1886,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); $supplier_second_row .= ' '.$raw['manufacturing_supplier_name'].'
3Mobile Number '. $raw['manufacturing_contact_person_mobile_number'] .'
3Mobile Number '. isset($raw['manufacturing_contact_person_mobile_number']) ? $raw['manufacturing_contact_person_mobile_number'] : 'Not Provided' .'
4Landline No
1Item Purchased '.$trade['trade_product_name'].'
1Item Purchased '.$tradeRow['trade_product_name'].'
2Contact Person ' . $trade['person_title_name_master']: '' . ''; - $supplier_second_row .= $trade['trade_product_contact_person_name'] ; + $supplier_second_row .= isset($tradeRow['person_title_name_master']) ? '' . $tradeRow['person_title_name_master']: '' . ''; + $supplier_second_row .= $tradeRow['trade_product_contact_person_name'] ; - $supplier_second_row .= isset($trade['person_designation']) && $trade['person_designation']== 1 ? ' '.$trade['other_person_designation'] : ' ';// + $supplier_second_row .= isset($tradeRow['person_designation']) && $tradeRow['person_designation']== 1 ? ' '.$tradeRow['other_person_designation'] : ' ';// - $supplier_second_row .= isset($trade['person_designation_master']) ? $trade['person_designation_master'] : '' ; + $supplier_second_row .= isset($tradeRow['person_designation_master']) ? $tradeRow['person_designation_master'] : '' ; - $supplier_second_row .= ' '.$trade['trade_supplier_name'].'
3Mobile Number '. $trade['trade_product_contact_person_mobile_number'] .'
3Mobile Number '. isset($tradeRow['trade_product_contact_person_mobile_number']) ? $tradeRow['trade_product_contact_person_mobile_number'] : 'Not Provided' .'
4Landline No'. $trade['person_stdcode'].' '.$trade['person_landline'].'
'.'Not Provided'.'
'. $tradeRow['person_stdcode'].' '.$tradeRow['person_landline'].'
'.'Not Provided'.'
5Payment Terms'. $trade['trade_product_payment_type_master'] .'
NA
'. $tradeRow['trade_product_payment_type_master'] .'
NA
6Payment Mode'. $trade['trade_product_payment_mode'] .'
NA
'. $tradeRow['trade_product_payment_mode'] .'
NA
7No of Days Credit'. $trade['trade_product_credit_days_from'].' to '. $trade['trade_product_credit_days_to'].' days
NA
'. $tradeRow['trade_product_credit_days_from'].' to '. $tradeRow['trade_product_credit_days_to'].' days
NA
@@ -2048,10 +2062,10 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + - + 0) { foreach($getstRow['manufacturing'] as $pstRow){ if($pstRow['name']){ ?> @@ -2070,10 +2084,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - 0) { ?> + + @@ -2081,10 +2098,16 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - - + + - 0) { ?> + + @@ -2092,7 +2115,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - + @@ -2621,6 +2644,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); 0){ //print_r($familyResult);die(); ?> +

Family Information:

$fmValue) { ?> @@ -2751,6 +2775,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); // } } ?> +

Neighbourhood / Reference Check

0){ //print_r($existNeighRefCheck);die(); @@ -2786,7 +2811,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');

PD OFFICERS REMARKS ON CUSTOMER BEHAVOUR, BUSINESS LOCATION & OVERALL PD STATUS

"; foreach($final_remark_data['recommendation_negative'] as $neg){ echo "
  • ".$neg['reason_for_negative']."
  • ";} } - else if($refer_to_credit){ echo "'.''; } @@ -3030,8 +3056,6 @@ defined('BASEPATH') OR exit('No direct script access allowed'); if($key == 'location_suited_for_busienss') { echo ''.''; - - } if($key == 'cerificates')
    Stock Value (Rs) Stock Quantity
    '.$question.''.$business['l2_weightage'].'%'.$business['answer'].''.$business['score_band'].''.$business['attributed_score'].'
    '.$span.'
    '.$business['max_score'].'
    '.$max_span.'
    '.$question.''.$business['l2_weightage'].'%'.$address_type_remarks_caption[ $business['answer'] ].''.$business['score_band'].''.$business['attributed_score'].'
    '.$span.'
    '.$business['max_score'].'
    '.$max_span.'