2009-05-12 16:57:43 +00:00

84 lines
1.7 KiB
PHP

<?php
$q = Doctrine_Query::create()
->from('Country')
->where('status="actif"');
$results = $q->execute();
$tabPays = $results->toArray();
$q = Doctrine_Query::create()
->from('Commandes c')
->leftJoin('c.Country p, c.CommandesDetail cd')
->orderBy('c.dateordered');
$tabCommandes = $q->execute();
?>
<form>
<select name="country">
<option value="">Tri par pays</option>
<?php
foreach($tabPays as $pays){
?>
<option value="<?php print $pays['graydon_country']; ?>"><?php print $pays['graydon_country']; ?></option>
<?php
}
?>
</select>
<select name="servicespeed">
<option>Tri par type de commande</option>
<option>Immediate</option>
<option>Normal</option>
<option>Rapide</option>
</select>
<select name="status">
<option>Tri par état de la commande</option>
<option>Completed</option>
<option>Assigned</option>
<option>InError</option>
<option>Initialised</option>
<option>Delivered</option>
<option>Notified</option>
<option>ReCompleted</option>
</select>
De <input type="text" name="dateFrom" /> à <input type="text" name="dateTo" /> (Format : AAAA-MM-JJ)
</form>
<table>
<tr>
<th>Pays</th>
<th>Reference</th>
<th>Service commandé</th>
<th>Prix à la commande</th>
<th>Status de la commande</th>
<th>Date de la commande</th>
<th>Date due</th>
<th>Actions</th>
</tr>
<?php
foreach($tabCommandes as $commande){
?>
<tr>
<td><?php print $commande->Country->graydon_country; ?></td>
<td><?php print $commande->reference; ?></td>
<td><?php print $commande->servicespeed; ?></td>
<td><?php print $commande->prix; ?></td>
<td><?php print $commande->orderstate; ?></td>
<td><?php print $commande->dateordered; ?></td>
<td><?php print $commande->datedue; ?></td>
<td>
<a href="">Détails</a>
<a href="">Rapport</a>
</td>
</tr>
<?php
}
?>
</table>