

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">   
             <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
 			 <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
  			 <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
             
             <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
 			 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
			 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>     
      
 
 
 <?php /*?><h3 align="center">PRIMARY ACCOUNT INFORMATION</h3><?php */?>
      
<div class="row">
    <div class="col-sm-3 col-md-3 col-lg-3">
	<form method="POST" action="<?php
echo base_url() ?>index.php/AccountRegister/AccountRegister/getdataPrimary">
		<div class="box box-solid box-primary">
			<div class="box-header">
    			<h4 class="box-title">PRIMARY ACCOUNT</h4>
           	</div>
        	<div class="box-body">
			<?php /*?>
<label>Primary Account</label>
<select name="primary" id="" required class="form-control input-sm">
<option value="">Select</option>
<?php
foreach ($primaryAccountType->result_array() as $acc) {
echo '<option value="'.$acc['primaryAccountId'].'">'.$acc['primaryAccountType'].'</option>';
}

?>
<?php */ ?>
				</select>
					<?php /*?>
<?php foreach($query->result() as $row)
{ ?>
<?php */ ?>
					<?php /*?>
<form method="POST" action="<?php echo base_url()?>index.php/PrimaryAccount/Primaryaccount1/myfunction">
<?php */ ?>

				<div class="form-group" style="color:#900">
                 
                 					<label for="primaryAccount">Account Classes</label> 
                		<span style="color:#F00" class="mandatory">*</span>
                    <select name="primaryAccount" required style="width: 250px">
                   		 <?php
							echo '<option value="">Select</option>';?>
                        <option value="asset">ASSET</option>
                        <option value="liability">LIABILITY</option>
                        <option value="income">INCOME</option>
                        <option value="expense">EXPENSE</option></select>
                        <?php /*?>
<?php
foreach ($primaryAccountType->result_array() as $acc) {
echo '<option value="'.$acc['primaryAccountId'].'">'.$acc['primaryAccountType'].'</option>';
}

?>
<?php */ ?>
                    
				</div>
                <div class="form-group" style="color:#900">
                    <label>Primary Account Name</label><span class="mandatory">*</span>
                    <input type="text" name="primaryAccountName" id="primaryAccountName" class="form-control input-sm">
                </div>
         	</div>

            <div class="box-footer">
                <div class="form-group">
                    <button type="submit" id="save" name="save" class="btn btn-primary">SAVE </button>
                </div>
            </div>
      	</div>
	</form>
	</div>
		
		<?php /*?>
<?php if(isset($_POST['save'])){
if($affectedRowCount>0){ ?>
<?php */ ?>

<?php /*?>	<div id="flashMessage" class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong>Success..</strong>
</div><?php */ ?>
		<?php /*?>
<?php }}?>
<?php */ ?>
	<?php /*?><div class="col-sm-6 col-md-6 col-lg-" 6>
	<form method="POST">
		<?php

if ($query->num_rows() > 0)
	{ ?>
		<div class="box box-solid box-success">
			<div class="box box-header">
				<h3 class="box-title" align="center">PRIMARY ACCOUNT DETAILS</h3>
           	</div>
			<div class="box box-body">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" data-page-size="5"
                		 data-page-navigation="pagination"
                          class="table table-condensed table-responsive table-bordered footable">
					<thead>
						<tr>
							<th width="1%">Sl.No</th>
							<th width="1%">Account Classes</th>
							<th width="3%">Primary Acccount Name</th>
							<th width="1%">Actions</th>
						</tr>
					</thead>
					<tbody>
						<?php /*?>
	<?php echo $tables; ?>
	<?php */ ?>
	<?php /*?>					<tr>
							<?php
	$i = 1;
	foreach($query->result() as $row)
		{

		// if($row->closeStatus==0){

		 ?>
							<td>
								<center>
									<?php
		echo $i++; ?>
								</center>
							</td>
							<td>
								<?php
		$primaryAccount = '';
		foreach($primaryAccountType->result() as $r)
			{
			if ($row->primaryAccountId == $r->primaryAccountId)
				{
				$primaryAccount = $r->primaryAccountType;
				break;
				}
			}

		echo $primaryAccount; //echo $row->companyGroupName;
		 ?>
                          	</td>
                    		<?php /*?>
		<td>
		<?php echo $primaryAccountId?>
		</td>
		<?php */ ?>
			<script>
            if (isset($_POST['save'])){
		redirect('AccountRgister/accountView.php');
		}
		</script>				
	</form><?php ?>
	</div>
</div>

