1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<?php
$pieces[] = array('designation' => 'Ampoule Narva R5W 12V 5W', 'ref' => '', 'ht' => 0, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Ampoule Narva P21W 12V', 'ref' => '', 'ht' => 0, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Disques de frein', 'ref' => 'DF1533', 'ht' => 107.42, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Filtre a air', 'ref' => 'A1045', 'ht' => 17.50, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Filtre a huile', 'ref' => 'ELH4213', 'ht' => 9.92, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Filtre habitacle', 'ref' => 'MFELR7004', 'ht' => 13.38, 'qte' => 1, 'tva' => 20);
$pieces[] = array('designation' => 'Plaquettes de frein', 'ref' => '598488', 'ht' => 53.17, 'qte' => 1, 'tva' => 20);
$i = 0;
foreach ($pieces as $piece) {
echo '<div class="row">';
echo ' <label class="col-xs-5 col-sm-4 col-md-4 control-label" for="piece_' . $i . '">' . $piece['designation'] . '</label> <input type="checkbox" name="piece_' . $i . '" id="piece_' . $i . '">' . '<input type="hidden" name="des_' . $i . '" id="des_' . $i . '" value="' . $piece['designation'] . '">';
echo ' <div class="col-xs-4 col-sm-3 col-md-2">';
echo ' <input type="text" class="form-control" name="ref_' . $i . '" id="ref_' . $i . '" value="' . $piece['ref'] . '">';
echo ' </div>';
echo ' <div class="col-xs-4 col-sm-3 col-md-2">';
echo ' <input type="text" class="form-control" name="ht_' . $i . '" id="ht_' . $i . '" value="' . $piece['ht'] . '">';
echo ' </div>';
echo ' <div class="col-xs-3 col-sm-2 col-md-1">';
echo ' <input type="text" class="form-control" name="qte_' . $i . '" id="qte_' . $i . '" value="' . $piece['qte'] . '">';
echo ' </div>';
echo ' <div class="col-xs-3 col-sm-2 col-md-1">';
echo ' <input type="text" class="form-control" name="tva_' . $i . '" id="tva_' . $i . '" value="' . $piece['tva'] . '">';
echo ' </div>';
echo '</div>';
$i++;
}
?> |
Partager