Example #1
0
 /**
  * 
  * @param type $texto
  * @return string
  */
 private function busca_produtos_ajax($texto = '')
 {
     $ret = "";
     $consulta = $this->produtos_model->get($campos = 'id,descricao,quantidade,valor,id_tipo_produto,id_marca,proc_tipo_maquina', $id = '', $descricao = $texto);
     if (count($consulta) == 0) {
         $ret .= '<tr><td colspan="3">' . reprovado("Nunhume Produto encotrado!") . '</td></tr>';
     }
     foreach ($consulta as $key => $value) {
         if ($value['id_tipo_produto'] == 4) {
             $link = anchor('produtos/form_processador/' . $value['id_tipo_produto'] . '/' . $value['id_marca'] . '/' . $value['proc_tipo_maquina'] . '/' . $value['id'] . '/2', '<i class="fa fa-share"></i></i>');
         }
         if ($value['id_tipo_produto'] == 1) {
             $link = anchor('produtos/ver/' . $value['id_tipo_produto'] . '/' . $value['id_marca'] . '/' . $value['id'], '<i class="fa fa-share"></i></i>');
         }
         $texto = strtoupper($texto);
         $novo_texto = str_replace($texto, '<span class="destaque_busca"> <b> ' . $texto . '</b></span>', $value['descricao']);
         $ret .= "<tr><td>" . $novo_texto . "</td><td>" . $value['quantidade'] . "</td><td>" . decimal2str($value['valor']) . "</td><td>" . $link . "</td></tr>";
     }
     return $ret;
 }
Example #2
0
                $link_pagar = '';
                $link_editar = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/form/" . $value['id'], '<i class="fa fa-pencil"></i>');
                $link_confirmar_pg = "";
                $link_add = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/form/", '<i class="fa fa-plus-square"></i> Adicionar Parcela');
            }
            if ($value['status'] == 0) {
                $link_pagar = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/pagar/" . $value['id'], '<i class="fa fa-money"></i>');
                $link_editar = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/form/" . $value['id'], '<i class="fa fa-pencil"></i>');
                $link_confirmar_pg = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/confirmar/" . $value['id'], '<i class="fa fa-thumbs-o-up fa-1x">      ');
                $link_add = bt_link("processos/proc/" . $this->uri->segment(3) . "/" . $this->uri->segment(4) . "/pagamentos/form/", '<i class="fa fa-plus-square"></i> Adicionar Parcela');
            }
        }
        echo '<tr>
                    <td>' . $value['n_parcela'] . '</td>
                    <td>' . data_br($value['data']) . '</td>
                    <td> R$ ' . decimal2str($value['valor']) . '</td>
                    <td>' . $quem . '</td>
                    <td>' . $status . '</td>
                    <td>' . $link_editar . ' | ' . $link_pagar . ' | ' . $link_confirmar_pg . '</td>
                </tr>';
    }
    echo '<tr><td colspan="6">' . $link_add . '</td></tr>';
    ?>

        </tbody>
    </table>
            <?php 
}
if ($this->uri->segment(6) == "pagar" && $this->uri->segment(7) != '' && $this->uri->segment(8) == '') {
    $link = base_url() . $this->uri->segment(1) . '/' . $this->uri->segment(2) . '/' . $this->uri->segment(3) . '/' . $this->uri->segment(4) . '/' . $this->uri->segment(5) . '/' . $this->uri->segment(6) . '/' . $this->uri->segment(7);
    echo confirma_acao("Deseja realmente confirmar o recebimento ? ", $link . '/1', $link . '/0');