function notifyEstoque() { $notifications = array(); $produtos = Produto::findAll(); foreach ($produtos as $produto) { if ($produto->getStEstoque() == 'FT') { $notifications[] = $produto->getIdProduto(); } } return $notifications; }
<table id="estoque" class="table table-condensed table-hover"> <thead> <tr> <th>#</th> <th>Produto</th> <th>Quilos</th> <th>Métros</th> <th>Péças</th> </tr> </thead> <tbody> <?php $produtos = Produto::findAll(); ?> <?php foreach ($produtos as $produto) { ?> <tr> <td><?php echo $produto->getIdProduto(); ?> </td> <td><?php echo $produto->getNmProduto(); ?> </td> <td><?php echo toKG($produto->getQtEstoque('KG'));
</div> <!-- /widget-header --> <div class="widget-content"> <table class="table table-striped table-bordered"> <thead> <tr> <th class="span1"> # </th> <th class="span6"> Nome do Produto</th> <th class="span2"> Preço</th> <th class="span2"> Quantidade</th> <th class="td-actions"> </th> </tr> </thead> <tbody> <?php foreach ($produto->findAll() as $key => $value) { ?> <tr> <td> <?php echo $count++; ?> </td> <td><img src="../img/produtos/<?php echo $value->url_foto_capa; ?> " width="50"> <?php echo $value->nome; ?> </td>