

Alguien me puede ayudar a resolver ese problema?, cómo hago para tener la opción de que esté un botón para desplegar los pedidos o que estén ocultos y haya manera de mirarlos seleccionando algo...Este es el código que se utiliza:
Código:
  
Se los agradecería, Saludos !! <?php
$u = null;
if( Session::getUID() != "" && !empty( $_GET["id"] ) ):
	$u = UserData::getById( Session::getUID() );
    $user = $u->name." ".$u->lastname;
    $client_id = $_GET["id"];
    $client = ClientData::getById( $client_id );
    $cliente = false;
elseif( Session::getUID() != "" && empty( $_GET["id"] ) ):
	$u = UserData::getById( Session::getUID() );
    $user = $u->name." ".$u->lastname;
    
    $client = ClientData::getByIdUser( $u->id );
 
    $client_id = $client->id;
    $cliente = true;
else:
	print "<script>window.location='index.php';</script>";
endif;
?>
<div class="row">
	<div class="col-md-12">
		<h1><i class='fa fa-clock-o'></i> <?php echo $client->name." ".$client->lastname; ?> </h1>
		<br>
		<form class="form-horizontal" role="form">
			<input type="hidden" name="view" value="itemhistory">
			<input type="hidden" name="id" value="<?php echo $client->id; ?>">
			<div class="form-group">
				<div class="col-lg-3">
					<div class="input-group">
						<span class="input-group-addon">INICIO</span>
						<input type="date" name="start_at" required value="<?php if(isset($_GET["start_at"]) && $_GET["start_at"]!=""){ echo $_GET["start_at"]; } ?>" class="form-control" placeholder="Palabra clave">
					</div>
				</div>
				<div class="col-lg-3">
					<div class="input-group">
						<span class="input-group-addon">FIN</span>
						<input type="date" name="finish_at" required value="<?php if(isset($_GET["finish_at"]) && $_GET["finish_at"]!=""){ echo $_GET["finish_at"]; } ?>" class="form-control" placeholder="Palabra clave">
					</div>
				</div>
				<div class="col-lg-6">
					<button class="btn btn-primary btn-block">Procesar</button>
				</div>
			</div>
		</form>
		<?php
		$products = array();
		if(isset($_GET["start_at"]) && $_GET["start_at"]!="" && isset($_GET["finish_at"]) && $_GET["finish_at"]!=""){
			if($_GET["start_at"]<$_GET["finish_at"]){
				
				$products = OperationData::getAllByClientIdAndRange( $client->id,$_GET["start_at"], $_GET["finish_at"] );
			}
		}
		else{
			
			$products = OperationData::getAllByClientId( $client->id );
		}
		if( count( $products ) > 0 ){
			?>
			<div class="row">
			<h3 class="col-lg-4 col-lg-offset-4">Lista de Pedidos:</h3></div>
			
			<table class="table table-bordered table-hover	">
				<thead>
					<th>Clave</th>
					<th>Color</th>
					<th>Precio</th>
					<th>Fecha del pedido</th>
					<? 
                	if( $u->is_admin == 1 ):?>
						<th></th>
					<?
					endif;?>
				</thead>
				<?php 
				#echo "<pre>";print_r( $products );echo "</pre>";
				foreach($products as $sell):
					#$item = $sell->getItem();
					$book = BookData::getById( $sell->book_id );
					?>
					<tr>
						<td>
						<?php echo $book->isbn; ?>
						</td>
						<td>
						<?php echo $book->title; ?>
						</td>
						<td><?php echo $book->cantidad; ?></td>
						<td><?php echo $sell->start_at; ?></td>
						<? 
                		if( $u->is_admin == 1 ):?>
							<td>
								<a href="index.php?action=delorder&id=<?php echo $sell->id;?>" class="btn btn-danger btn-xs">Eliminar</a>
							</td>
						<?
						endif;?>
					</tr>
				<?php
				endforeach; ?>
			</table>
			<div class="clearfix"></div>
			<?php
		}
		else{
			?>
			<p class="alert alert-danger">No hay pedidos.</p>
			<?php
		}
		$inventario = OperationData::getInventory( $client->id );
		$list_inventario = OperationData::Discount_list( $client->id );
		$inventario_sum = OperationData::Discount_sum( $client->id );
		$initial_vendedor = ClientData::getById( $client->id );
		?>
		<div class="row">
			<div class="col-lg-3">
				Tu Inventario inicial<br>
				<?
				if( !$cliente ):?>
					<form action="index.php?action=updateinventory" method="post">
						<input id="vendedor" type="hidden" name="vendedor" value="<?= $client->id ?>">
						<input required id="invetory_initial" type="text" name="invetory_initial" value="<?= $initial_vendedor->initial_inventory ?>">
						<button type="submit" class="btn btn-success">Editar</button>
					</form>
				<?
				else:?>
					<h3>$<?= $initial_vendedor->initial_inventory ?></h3>
				<?
				endif;?>
			</div>
			<div class="col-lg-3">
				Pedidos Realizados: <h3>$<?= ( empty( $inventario[0]->total ) ) ? 0 : $inventario[0]->total ?></h3>
			</div>
			<div class="col-lg-3">
				Abonos: <h3> $<?= ( empty( $inventario_sum[0]->total ) ) ? 0 : $inventario_sum[0]->total ?></h3>
			</div>
			<div class="col-lg-3">
				Deuda Total: <h3> $<?= ( ( $initial_vendedor->initial_inventory + $inventario[0]->total ) - $inventario_sum[0]->total ) ?></h3>
			</div><br>
		</div>
		<?
		if( count( $list_inventario ) > 0 ){?>
			<div class="row">
				<h3 class="col-lg-4 col-lg-offset-4">Lista de Abonos:</h3><br>
				<?
				if( count( $list_inventario ) > 0 ){
					?>
					<br>
					<table align="center" class="table table-bordered table-hover">
						<thead>
							<th>Abono</th>
							<th>Fecha del abono:</th>
						</thead>
						<?php 
						foreach($list_inventario as $list_inventario):
							?>
							<tr>
								<td>
									<?php echo $list_inventario->discount_valor; ?>
								</td>
								<td>
									<?php echo $list_inventario->discount_date; ?>
								</td>
							</tr>
						<?php
						endforeach; ?>
					</table>
					<?php
				}?>
			</div>
		<?
		}
		if( !$cliente ):?>
			<div>
				<form action="index.php?action=addiscount" method="post">
					<input id="cliente" name="cliente" type="hidden" value="<?= $client->id ?>">
					<label>Abono: </label>
					<input required id="discount_n" type="text" name="discount_n">
					<button type="submit" class="btn btn-success">Abonar</button>
				</form>
			</div>
		<?
		endif;?>
		<div class="clearfix"></div>
		<br><br><br><br><br><br><br><br><br><br>
	</div>
</div>
 
 




