
<?php 

include 'includes/header.php';
require_once("lib/helper.php");
session_start();

if((!isset($_SESSION["company_edit_id"])) &&  (!isset($_COOKIE["company_detail_id"])))
{
    ?>
	<script type="text/javascript">
		location.href="dashboard.php";
	</script>
	<?php
    
}

 ?>
<style>
  .form-anf-modal .close-btn{
        padding: 6px 30px;
  }
  
  th:nth-child(1), td:nth-child(1){

    width: 6%;

  }
  th:nth-child(2), td:nth-child(2){

    width: 20%;

  }

  th:nth-child(4), td:nth-child(4){

    width: 40%;

  }
   th:nth-child(5), td:nth-child(5){

    width: 90%;

  }
  /*.tooltip:hover .tooltiptext {
  visibility: visible;
}*/
</style>
<body> 
<div id="wrapper" class="active">  
    
     <?php include 'includes/sidebar.php'; ?>
      <div id="page-content-wrapper">
        <div class="page-content inset">
          
        <div class="main">
 


 <div class="heading-banner">
  <div class="card-header card-header-warning report-header">
   <div class="row captured-data">


     <?php
     
           if(isset($_SESSION["company_edit_id"]))
          {
              
              
              $id=$_SESSION["company_edit_id"];
              
              
             $detail=$obj->select( "*","gbca_company_detail_master as gbca RIGHT JOIN gbca_company_master as mas ON gbca.company_detail_name=mas.company_id RIGHT JOIN gbca_section_master as sec ON gbca.section_id=sec.section_id ","company_detail_id= $id");
           
          }else
          {
              
              $sub_id=$_COOKIE["company_detail_id"];
           $detail=$obj->select( "*","gbca_company_detail_master as gbca RIGHT JOIN gbca_company_master as mas ON gbca.company_detail_name=mas.company_id RIGHT JOIN gbca_section_master as sec ON gbca.section_id=sec.section_id ","company_detail_id= $sub_id");
           
               
          }
           {
           ?>
              <div class="col-md-7">

       <h2>Report Card for Eligibility Test of the Companies Act, 2013</h2>

     </div>

     <div class="col-md-3 wizard-formdiv">

            	<a href='pdffiles/<?php echo trim($detail[0]['company_detail_document']);?>' download><button  title="Export as PDF" type="button" class="report-btn" >Export as PDF</button></a>
						<button href="#" title="Export as Excel" onClick="location.href='export_to_excel.php?status=1'" type="button" class="report-btn">Export as EXCEL</button>

     </div>
               <div class="col-md-12 col-12">
                 <h1><?= $detail[0]["company_name"]; ?></h1>

               </div>
               <div class="col-md-6 col-6">
                 <h5><?= $detail[0]["section_name"]; ?></h5>
               </div>
               <div class="col-md-6 col-6">
                 <h5>Date: <?=date('d F Y')?></h5>
               </div>
               <div class="col-md-6 col-6">
                 <h5>Made By: <?= $detail[0]["company_detail_maker_name"]; ?></h5>
               </div>
               <div class="col-md-6 col-6">
                 <h5>Checked By: <?= $detail[0]["company_detail_checker_name"]; ?></h5>
               </div>
            <?php
          }
          ?>



   </div>
 </div>
 </div>
 <!-- End Navbar -->
 
<div class="content wizard-formdiv">
   <div class="container-fluid2">
 
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-body report-card">
                    <div class="report-title">
                    <div class="row">
                     
                    
                    <?php
                     $total=$detail[0]["company_detail_total_borrowing"];
                     $total_cap=$detail[0]["company_detail_twice_paid_up_share"];
                    
                    if(($detail[0]["company_type_name"] == "Nidhi Company" || $detail[0]["company_type_name"] == "Government Company") ||($detail[0]["company_detail_lending_operation"] == "Yes" || $detail[0]["company_detail_interest_charge"] == "Yes") ||($detail[0]["company_type_name"] == "Private Company" && $detail[0]["company_detail_default_borrowings"] == "No" && $detail[0]["company_detail_shareholder_corporate"] == "No" && $total < 500000000 && $total<$total_cap && $total !="" && $total_cap!="" ))
                    {
                        ?>
                        <div class="col-md-12 mt-3">
                   <h5>Sec 185 is not Applicable to you. You can give loans to any person, however please take due care of Sec 2(22)(e) of the Income Tax Act, 1961</h5>
                       </div> 
                       
                       <?php
                    }
                    else
                    {
                        ?>
                         <div class="col-md-12 mt-3">
                    <h5>Sec 185 is Applicable to you. Please refer to the following Party-wise Checklist for your ready reference. Non-compliance of such provisions will have penal consequences on both, the lender and the borrower.</h5>
                       </div>
                       
                       <?php
                    }
                    ?>
                   
                    
                   
                    <div class="col-md-12">
                        <p>A. List of Parties to whom the company cannot advance any Loan or Provide any Security and Give any guarantee in respect of loan taken by such party</p>

                        <?php
                         if(isset($_SESSION["company_edit_id"]))
                        {
                            $id=$_SESSION["company_edit_id"];
                          $company_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$id' AND (sub_company_type_id=6 OR sub_company_type_id=7 OR sub_company_type_id=8 OR sub_company_type_id=10 OR sub_company_type_id=13)");
                              // echo "<pre>";print_r($company_arr);echo "</pre>";
                              //print_r($company_arr);
                          $loan_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'ELSE 'Security Provided to' END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$id' AND sub_company_type_id=2");

                            $wholly_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'ELSE 'Security Provided to' END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$id' AND sub_company_type_id=3");

    $parties_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name , CASE  WHEN sub_company_type_id = 4 THEN '1. It should be a part of the conditions of service extended by the company to all its employees; or
2. It should be pursuant to any scheme approved by the members by a special resolution;
' WHEN sub_company_type_id = 5 THEN '1. It should be a part of the conditions of service extended by the company to all its employees; or
2. It should be pursuant to any scheme approved by the members by a special resolution;
'WHEN sub_company_type_id = 11 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 12 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 14 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 15 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'

END as conditi","gbca_sub_company_mapping","company_detail_id='$id' AND (sub_company_type_id=4 OR sub_company_type_id=5 OR sub_company_type_id=11 OR sub_company_type_id=12 OR sub_company_type_id=14 OR sub_company_type_id=15)");

                             
                               $given_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$id' AND (sub_company_type_id=16 OR sub_company_type_id=17 OR sub_company_type_id=18 OR sub_company_type_id=19)");
  
                        }
                        else
                        {
                            $sub_id=$_COOKIE["company_detail_id"];
                         $company_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$sub_id' AND (sub_company_type_id=6 OR sub_company_type_id=7 OR sub_company_type_id=8 OR sub_company_type_id=10 OR sub_company_type_id=13)");
                              // echo "<pre>";print_r($company_arr);echo "</pre>";
                              //print_r($company_arr);
                          $loan_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'ELSE 'Security Provided to' END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$sub_id' AND sub_company_type_id=2");

                            $wholly_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'ELSE 'Security Provided to' END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$sub_id' AND sub_company_type_id=3");

    $parties_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name , CASE  WHEN sub_company_type_id = 4 THEN '1. It should be a part of the conditions of service extended by the company to all its employees; or
2. It should be pursuant to any scheme approved by the members by a special resolution;
' WHEN sub_company_type_id = 5 THEN '1. It should be a part of the conditions of service extended by the company to all its employees; or
2. It should be pursuant to any scheme approved by the members by a special resolution;
'WHEN sub_company_type_id = 11 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 12 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 14 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'
WHEN sub_company_type_id = 15 THEN 'Passing of special resolution + Explanatory statement to the notice disclosing the full particulars of the loans given, or guarantee given or security provided + the purpose for which the loan or guarantee or security is proposed to be utilised by the recipient of the loan or guarantee or security + the loans are utilised by the borrowing company for its principal business activities.'

END as conditi","gbca_sub_company_mapping","company_detail_id='$sub_id' AND (sub_company_type_id=4 OR sub_company_type_id=5 OR sub_company_type_id=11 OR sub_company_type_id=12 OR sub_company_type_id=14 OR sub_company_type_id=15)");

                             
                               $given_arr = $obj->select("*,CASE
    WHEN sub_company_type_id = 1 THEN 'Holding Companies'
    WHEN sub_company_type_id = 2 THEN 'Subsidiary Companies'
    WHEN sub_company_type_id = 3 THEN 'Wholly Owned Subidiary Companies'
    WHEN sub_company_type_id = 4 THEN 'Managing Director'
    WHEN sub_company_type_id = 5 THEN 'Whole time directors'
    WHEN sub_company_type_id = 6 THEN 'Director of an Company'
    WHEN sub_company_type_id = 7 THEN 'Relative of directors'
    WHEN sub_company_type_id = 8 THEN 'Partner of directors in any firm (incl. LLP)'
     WHEN sub_company_type_id = 9 THEN 'Firm (incl. LLP) in which director is a partner'
    WHEN sub_company_type_id = 10 THEN 'Firm (incl. LLP) in which relative of director is a partner'
    WHEN sub_company_type_id = 11 THEN 'Private Companies in which director is a director'
    WHEN sub_company_type_id = 12 THEN 'Private Companies in which director is a Member'
    WHEN sub_company_type_id = 13 THEN 'Director of holding company'
    WHEN sub_company_type_id = 14 THEN 'Companies / LLPs wherein director either singly or jointly with other directors of lending company has 25%'
    WHEN sub_company_type_id = 15 THEN 'any directors of lending company'
    WHEN sub_company_type_id = 16 THEN 'Given Loan to'
    WHEN sub_company_type_id = 17 THEN 'Loan Represented as Book debt'
    WHEN sub_company_type_id = 18 THEN 'Guarantee Given in respect of Loan taken by'
    ELSE 'Security Provided to'
END as sub_company_name","gbca_sub_company_mapping","company_detail_id='$sub_id' AND (sub_company_type_id=16 OR sub_company_type_id=17 OR sub_company_type_id=18 OR sub_company_type_id=19)");
   
                        }
                                ?>
                        
                        <table cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th scope="col">Sr. No.</th>
									<th scope="col">Parties</th>
									<th scope="col">Nature of relation </th>
								</tr>
							</thead>
							<tbody>
								<?php

                            if(is_array($company_arr))
                            {
                              $i = 1;
                              foreach($company_arr as $company)
                              {
                                ?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $company['sub_company_type_name'];?></td>
									<td><?php echo $company['sub_company_name']; ?></td>
								</tr>
								<?php
                                    $i++;

                                  }
                                } ?>
								
							</tbody>
						</table>
                    </div>

                    <div class="col-md-12">
                        <p>B. List of Parties to whom the company cannot advance any Loan but can Provide any Security or Give any guarantee in respect of loan taken by such party</p>
                    <table cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th scope="col">Sr. No.</th>
									<th scope="col">Parties</th>
									<th scope="col">Nature of relation </th>
								</tr>
							</thead>
							<tbody>
								<?php

                            if(is_array($loan_arr))
                            {
                              $i = 1;
                              foreach($loan_arr as $loan)
                              {
                                ?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $loan['sub_company_type_name'];?></td>
									<td><?php echo $loan['sub_company_name']; ?></td>
								</tr>
								<?php
                                    $i++;

                                  }
                                } ?>
								
							</tbody>
						</table>
                    </div>

                    <div class="col-md-12">
                    <p>C. List of Parties to whom the company can advance Loan or Provide any Security or Give any guarantee in respect of loan taken by such party without any conditions</p>
						<table cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th scope="col">Sr. No.</th>
									<th scope="col">Parties</th>
									<th scope="col">Nature of relation </th>
									<th scope="col">Remark </th>
								</tr>
							</thead>
							<tbody>
								<?php

                            if(is_array($wholly_arr))
                            {
                              $i = 1;
                              foreach($wholly_arr as $wholly)
                              {
                                ?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $wholly['sub_company_type_name'];?></td>
									<td><?php echo $wholly['sub_company_name']; ?></td>
								<td>Please take care of Section 2(22)(e) of the Income Tax Act, 1961</td>
								</tr>
								<?php
                                    $i++;

                                  }
                                } ?>
							</tbody>
						</table>
                    </div>

                    <div class="col-md-12">
                        <p>D. List of Parties to whom the company can advance Loan or Provide any Security or Give any guarantee in respect of loan taken by such party provided certain conditions are met. (If such conditions are not met, the transaction shall be treated as non-compliant)</p>
    					<table cellpadding="0" cellspacing="0">
							<thead>
								<tr>
									<th scope="col">Sr. No.</th>
									<th scope="col">Parties</th>
									<th scope="col">Nature of relation </th>
									<th scope="col">Condition</th>
								</tr>
							</thead>
							<tbody>
																<?php

                            if(is_array($parties_arr))
                            {
                              $i = 1;
                              foreach($parties_arr as $parties)
                              {
                                ?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $parties['sub_company_type_name'];?></td>
									<td><?php echo $parties['sub_company_name']; ?></td>
									<td><?php echo $parties['conditi']; ?></td>
								</tr>
								<?php
                                    $i++;

                                  }
                                } ?>

							</tbody>
						</table>
                    </div>
                    <div class="col-md-12">
                        <p>E. List of Parties with whom the company has already undertaken specified transactions which require due attention of the management as the same may either be not in compliance with the provisions or may require to fulfill one or the other condition to comply with the provisions of Sec 185 of the Companies Act, 2013 (unless the borrower is Wholly Owned Subsidiary).</p>
						<table cellpadding="0" cellspacing="0">

							<thead>
								<tr>
									<th scope="col">Sr. No.</th>
									<th scope="col">Parties</th>
									<th scope="col">Nature of relation </th>
									<th scope="col">Transaction Type </th>
                                 	<th scope="col">Remark </th>
								</tr>
							</thead>
							<tbody>
							
								<?php

                            if(is_array($given_arr))
                            {
                              $i = 1;
                              foreach($given_arr as $given)
                              {
                                ?>
								<tr>
									<td><?php echo $i; ?></td>
									<td><?php echo $given['sub_company_type_name'];?></td>
									<td><?php echo $given['sub_company_transaction_relation']; ?></td>
									<td><?php echo $given['sub_company_name']; ?></td>
									<td>1. If nature of relation is same as Section C part D then  respective condition of section C part D will appear after the following line.
Compliant only if below conditions are met. 
2. If nature of relation is same as section C Part C then the following will appear.
Compliant 
3. If nature of relation is same as section C Part A then the following will appear.
Non Compliant 
4.  If nature of relation is same as section C Part B then the following will appear.
Compliant (If the transaction type is Loan)
Non Complaint (If the Transaction type is Other than loan)

</td>
								</tr>
								<?php
                                    $i++;

                                  }
                                } ?>
							</tbody>
						</table>
                        <div class="pull-right">
     <!-- <button href="#" type="button" id="drftBtn">Download</button> -->

     <iframe src="report.php" style="display:none;" name="frame"></iframe>

    <!-- <input type="button" onclick="frames['frame'].print()" value="printletter"> -->

      <!--<button onclick="frames['frame'].print()"  type="button">Print</button> -->
      <button onclick="window.print()"  type="button">Print</button> 
   <!-- <script>
     
     function doPrint() {
    window.print();            
    document.location.href = "report.php"; 
}
   </script> -->
     <!-- <a href="javascript:window.print()" class="button print">Print Page</a> -->
   </div>
                    </div>
                    
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
</div>
 


<footer class="footer no-print">
    <div class="container-fluid">
     <p>GBCA & Associates LLP, Chartered Accountants. © 2021 All Rights Reserved. Powered by OneRoof Technologies LLP.</p>
   </div>
   </footer>
   </div>
   

        </div>
      </div>



</div>
</body>
</html>
