GET BUSI DETAILS CHNGED
This commit is contained in:
parent
c669e93140
commit
9698f7723d
@ -451,6 +451,9 @@ defined('ENTITYLENDERBRANCHID') OR define('ENTITYLENDERBRANCHID','entity_lender_
|
||||
defined('PDFORMDETAILSJSON') OR define('PDFORMDETAILSJSON','t_pd_form_details_json');
|
||||
defined('PDFORMDETAILSJSONID') OR define('PDFORMDETAILSJSONID','pd_form_detail_json_id');
|
||||
|
||||
defined('BUSINESSENTITYTYPE') OR define('BUSINESSENTITYTYPE','m_business_entity_type');
|
||||
defined('BUSINESSENTITYTYPEID') OR define('BUSINESSENTITYTYPEID','business_entity_type_id');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2092,13 +2092,14 @@ class PD_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
public function downloadExcel_post()
|
||||
public function downloadExcel_get()
|
||||
{
|
||||
$this->excel->setActiveSheetIndex(0)->mergeCells('F3:M3');
|
||||
$this->excel->getActiveSheet()->setTitle('Material Master');
|
||||
$this->excel->getActiveSheet()->setCellValue('F3', 'SIDDHARTH INDUSTRIES Material Master');
|
||||
$filename = 'MaterialMaster'.'.xls'; //save our workbook as this file name
|
||||
header('Content-Type: application/vnd.ms-excel'); //mime type
|
||||
header('Access-Control-Expose-Headers:Content-Disposition'); //mime type
|
||||
header('Content-Disposition: attachment;filename="' . $filename . '"'); //tell browser what's the file name
|
||||
header('Cache-Control: max-age=0'); //no cache
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
|
||||
@ -3397,10 +3398,10 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$records = $this->post('records');
|
||||
$pd_id = $records['pd_id'];
|
||||
$pd_form_id = $records['pd_form_id'];
|
||||
// $pd_form_id = $records['pd_form_id'];
|
||||
$final_array = array();
|
||||
$fields = array('json');
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id'=>$pd_form_id,'fk_pd_id'=>$pd_id);
|
||||
$where_condition_array = array('isactive' => 1,'fk_form_id'=>13,'fk_pd_id'=>$pd_id);
|
||||
$rec = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILSJSON);
|
||||
//print_r($this->db->last_query());
|
||||
//print_r($rec);
|
||||
@ -3409,7 +3410,11 @@ class PD_Controller extends REST_Controller {
|
||||
$temp_data = json_decode($rec[0]['json'],true);
|
||||
// print_r($temp_data);
|
||||
$final_array['profession_name'] = $temp_data['profession_name'];
|
||||
$final_array['profession_name_other'] = $temp_data['profession_name_other'];
|
||||
$final_array['profession_name_other'] = "";
|
||||
if(array_key_exists('profession_name_other',$temp_data))
|
||||
{
|
||||
$final_array['profession_name_other'] = $temp_data['profession_name_other'];
|
||||
}
|
||||
$final_array['type_of_activity'] = $temp_data['select_business_activity_type'];
|
||||
|
||||
foreach($final_array['type_of_activity'] as $f_key => $f_value)
|
||||
@ -3465,16 +3470,23 @@ class PD_Controller extends REST_Controller {
|
||||
$final_array['type_of_activity'][$f_key]['prodcuts'] =$temp;
|
||||
}
|
||||
}
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $final_array;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = "Fill Business Form First!";
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
}
|
||||
|
||||
$data['dataStatus'] = false;
|
||||
$data['status'] = REST_Controller::HTTP_NO_CONTENT;
|
||||
$data['msg'] = $final_array;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,17 +1,8 @@
|
||||
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Smartie Class
|
||||
*
|
||||
* @package CodeIgniter
|
||||
* @subpackage Libraries
|
||||
* @category Smarty
|
||||
* @author Kepler Gelotte
|
||||
* @link http://www.coolphptools.com/codeigniter-smarty
|
||||
*/
|
||||
require_once( APPPATH.'/third_party/PHPExcel/Classes/PHPExcel.php');
|
||||
|
||||
class excel extends PHPExcel {
|
||||
class Excel extends PHPExcel {
|
||||
|
||||
var $debug = false;
|
||||
|
||||
|
||||
@ -748,9 +748,10 @@ class PD_Model extends SPARQ_Model {
|
||||
foreach($template_forms as $template_key => $value)
|
||||
{
|
||||
$this->db->SELECT('count(*) as count');
|
||||
$this->db->FROM(PDFORMDETAILS.' as PDFORMDETAILS');
|
||||
$this->db->WHERE('PDFORMDETAILS.fk_pd_id',$pdid);
|
||||
$this->db->WHERE('PDFORMDETAILS.fk_form_id',$value['form_id']);
|
||||
$this->db->FROM(PDFORMDETAILSJSON.' as PDFORMDETAILSJSON');
|
||||
$this->db->WHERE('PDFORMDETAILSJSON.fk_pd_id',$pdid);
|
||||
$this->db->WHERE('PDFORMDETAILSJSON.fk_form_id',$value['form_id']);
|
||||
$this->db->WHERE('PDFORMDETAILSJSON.isactive',1);
|
||||
$template_forms_count = 0;
|
||||
$template_forms_count = $this->db->GET()->result_array();
|
||||
//print_r($template_forms_count);die();
|
||||
|
||||
@ -85,13 +85,20 @@ td, th {
|
||||
background-color: #dddddd;
|
||||
} -->
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
<ul>
|
||||
<li>Name of the Business Entity : <data> <?php echo $profession_name?><data></li>
|
||||
<li>Business Entity Type : <data><?php echo $business_entity_type?></data></li>
|
||||
<?php
|
||||
$name_of_the_business_entity = "Default";
|
||||
if($profession_name_other != "") {$name_of_the_business_entity = $profession_name_other;}else { $name_of_the_business_entity = $profession_name; }
|
||||
?>
|
||||
<li>Name of the Business Entity : <data> <?php echo $name_of_the_business_entity; ?><data></li>
|
||||
<li>Business Entity Type : <data><?php echo $business_entity_type_id?></data></li>
|
||||
<li>Business Vintage : <data><?php echo $business_years .' Year(s) & '.$business_month .' Month(s)'?></data></li>
|
||||
<?php
|
||||
$type_of_business_activity = "";
|
||||
@ -115,7 +122,7 @@ td, th {
|
||||
{
|
||||
echo "<tr><td>".($partners_key + 1)."</td>
|
||||
<td>".$partner['partner_name']."</td>
|
||||
<td>".$profession_name."</td>
|
||||
<td>".$name_of_the_business_entity."</td>
|
||||
<td>". "XXX"."</td>
|
||||
<td>"."XXX"."</td>
|
||||
<td>".'XXX'."</td>
|
||||
@ -129,11 +136,11 @@ td, th {
|
||||
{
|
||||
echo "<tr><td>".(count($partners) + 1)."</td>
|
||||
<td>".$persons_with_relationship['family_member_name']."</td>
|
||||
<td>".$persons_with_relationship['relation_to']."</td>
|
||||
<td>".$persons_with_relationship['other_family_relationship_name']."</td>
|
||||
<td>".$persons_with_relationship['relation_to_id']."</td>
|
||||
<td>".$persons_with_relationship['other_family_relationship_id']."</td>
|
||||
<td>".$persons_with_relationship['started_business']."</td>
|
||||
<td>".'XXX'."</td>
|
||||
<td>".$persons_with_relationship['currently_active_status']."</td>
|
||||
<td>".'XXX'."</td>
|
||||
<td>".'NA'."</td>
|
||||
<td>".'NA'."</td>
|
||||
<td>".'XXX'."</td> </tr>";
|
||||
@ -141,7 +148,48 @@ td, th {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p></p>
|
||||
<ul>
|
||||
<li>Brief of Business Entity, Ownership and Areas of Operations:</li>
|
||||
<p>
|
||||
<?php
|
||||
echo $name_of_the_business_entity. ", is a ” ".$business_entity_type_id." “ concern, formed in ”".$business_date_object." .</br>" ;
|
||||
switch($business_entity_type_id)
|
||||
{
|
||||
case 1:// Private Limited Company
|
||||
foreach($partners as $partners_key => $partner)
|
||||
{
|
||||
echo $partner['partner_name']. " is (relation to company) of ".$name_of_the_business_entity." having ". $partner['shareholding']."% shareholding";
|
||||
}
|
||||
break;
|
||||
case 2:// Public Ltd Company
|
||||
break;
|
||||
case 3:// Sole proprietorship
|
||||
break;
|
||||
case 4:// HUF (Hindu Undivided Family)
|
||||
break;
|
||||
case 5:// Partnership
|
||||
break;
|
||||
case 6:// Cooperative
|
||||
break;
|
||||
case 7:// Limited Liability Partnership(LLP)
|
||||
break;
|
||||
case 8:// OPC (One Person Company)
|
||||
break;
|
||||
case 9:// Society
|
||||
break;
|
||||
case 10:// Trust
|
||||
break;
|
||||
case 11:// Others (Please Specify)
|
||||
break;
|
||||
default: echo "Nothing Defined";
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</p>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user