 <div class="content-wrapper">
    <div class="container-fluid">
		
		<div class="row">
			<div class="col-lg-12">
			   <form action="#" method="post" method="post" enctype="multipart/form-data">
			   <input type="hidden" name="id" value="<?= @$id; ?>">
			   <div class="card">
			     <div class="card-body">
				   <div class="card-title"><?= $pagetitle; ?> : <?= $creditdetails[0]->storename; ?> | Current Credits: <?= $creditdetails[0]->credits; ?> </div>
				   <?php echo ($this->session->flashdata('form_error'));?>
				   <?php echo ($this->session->flashdata('image_error'));?>
				   <hr>
					 
					<div class="form-group row">
					  <label for="input-21" class="col-sm-3 col-form-label">Enter Number Of Credits *</label>
					  <div class="col-sm-9">
						<input type="text" class="form-control" name="credits" id="input-21"  value='0'>
					  </div>
					</div>
					 
					 <div class="form-group row">
					  <div class="col-sm-6">
						<button type="submit" name="addcredits" class="btn btn-success btn-block px-5"><i class="icon-lock"></i> Add Credits</button>
					  </div>
					  <div class="col-sm-6">
						<button type="submit" name="removecredits" class="btn btn-danger btn-block px-5"><i class="icon-lock"></i> Remove Credits</button>
					  </div>
					</div>
				 </div>
			 </div>
			</form>
		</div>
	</div><!--End Row-->
		
		
	<div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-header">Transaction History</div>           
			<div class="card-body">
              <div class="table-responsive">
              <table id="default-datatable" class="table table-bordered">
                <thead>
                    <tr>
                        <th class="nosort">Sr. No.</th>
						<th>Credits</th>
						<th>Type</th>
						<th>Amount</th>
						<th>Date</th>  
						<th>Message</th>
                    </tr>
                </thead>
                <tbody>
					<?php $srno=1;
					foreach ($creditdetailslog as $logs){?>
						 <tr>
							<td><?= $srno; ?></td>
							<td><?= $logs->credits; ?></td>
							<td><?= $logs->type; ?></td>
							<td><?= $logs->amount; ?></td>
							<td><?= $logs->updatedon; ?></td>
							<td><?= $logs->message; ?></td>
						</tr>
					<?php $srno++; } ?>                   
                </tbody>
            </table>
            </div>
            </div>
          </div>
        </div>
      </div><!-- End Row-->	
	
	