public function getPrintedModal() { $modal .= ' <h4>EAN / ISBN ' . $this->code . '</h4> <input type="hidden" id="code-input" value="' . $this->code . '"> <p>Edition</p>'; $modal .= ' <select id="type-input">'; $types = getProduitsTypes(); foreach ($types as $key => $value) { if ($value == $this->type) { $modal .= '<option value="' . $value . '" SELECTED>' . $value . '</option>'; } else { $modal .= '<option value="' . $value . '">' . $value . '</option>'; } } $modal .= ' </select> <p>Titre</p> <input type="text" id="titre-input" value="' . $this->titre . '" class="full-middle-width"> <p>Auteur</p> <input type="text" id="auteur-input" value="' . $this->auteur . '" class="full-middle-width"> <p>Editeur</p> <input type="text" id="editeur-input" value="' . $this->editeur . '" class="full-middle-width">'; $editions = array("NORMALE", "SPECIALE"); $modal .= ' <p>Edition</p> <select id="edition-input">'; foreach ($editions as $key => $value) { if ($value == $this->edition) { $modal .= '<option value="' . $value . '" SELECTED>' . $value . '</option>'; } else { $modal .= '<option value="' . $value . '">' . $value . '</option>'; } } $modal .= ' </select> '; return $modal; }
public function alertReaFait() { $types = getProduitsTypes(); $this->Reassort->setDate(date("d/m/Y")); $message = "<br><br><h3>Les réassorts d'aujourd'hui ont-ils été faits ?</h3>"; foreach ($this->magasins as $key => $magasin) { $this->Reassort->setMagasin($magasin['localisation']); $message .= '<p style="margin-top:15px;"><strong>' . $magasin['localisation'] . '</strong></p>'; foreach ($types as $key => $type) { $this->Reassort->setType($type); $message .= '<p>'; $message .= '[' . $type . ']'; $message .= ' FAIT A [' . $this->Reassort->getReaPercent() . ' %]'; $message .= '</p>'; } } $message .= "<br><br>\n\n ----------------------------------------------------"; return $message; }
?> </legend> <?php echo '<div class="item-type-reassort"> <table class="table table-striped table-bordered"> <thead> <tr> <th>type</th> <th>Pourcentage</th> <th>#</th> </tr> </thead> <tbody> '; $types = getProduitsTypes(); foreach ($types as $key => $value) { $Reassort->setType($value); $Reassort->setMagasin($_GET['magasin']); $Reassort->setDate($_GET['date']); echo '<tr>'; echo '<td>' . $value . '</td>'; echo '<td>' . $Reassort->getReaPercent() . ' %</td>'; echo '<td><a href="rea-details.php?date=' . $_GET['date'] . '&magasin=' . $_GET['magasin'] . '&type=' . $value . '"><button class="btn">Consulter</button></a></td>'; echo '</tr>'; } echo ' </tbody> </table> </div>';