| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/merenda/itapipoca19/modulos/licitacao/ |
Upload File : |
<?php
include_once("../../includes/conexao.php");
include_once("../../includes/funcoes.php");
$cod_prd = $_GET['cod_prd'];
$cod_for = $_GET['cod_for'];
$forn = $_GET['forn'];
$id_prod = $_GET['id_prd'];
$valor = $_GET['valor'];
$prd = mysql_query("select * from v_lista_licitacao_forn_item where pli_pro_id = '$id_prod'");
$p = mysql_fetch_array($prd);
$for = mysql_query("SELECT * from v_lista_licitacao_forn where plf_forn_id = '$cod_for'");
$f = mysql_fetch_array($for);
$prg = mysql_query("SELECT * FROM programa ORDER BY prg_programa");
$itemprg = mysql_query("SELECT * FROM v_lista_licitacao_fornecedor_itens_prg where pip_pli_id = $cod_prd");
?>
<head id="Head1">
<meta charset="utf-8"/>
<title>SGAE | Merenda</title>
<link href="../../Styles/Site.css" rel="stylesheet" type="text/css"/>
<link href="../../Styles/smoothness/jquery-ui-1.8.24.custom.css" rel="stylesheet" type="text/css"/>
<script src="../../Scripts/jquery-1.8.2.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
<link href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="../../Styles/bootstrap.css" rel="stylesheet" type="text/css"/>
<script src="../../js/mascara.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/1.10.7/integration/bootstrap/3/dataTables.bootstrap.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/responsive/1.0.6/css/dataTables.responsive.css">
<link href="http://jquery.iceburg.net/jqModal/jqModal.css" rel="stylesheet">
<link href="http://ironsummitmedia.github.io/startbootstrap-sb-admin/css/plugins/morris.css" rel="stylesheet">
<link href="http://ironsummitmedia.github.io/startbootstrap-sb-admin/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="../../datatables/media/css/jquery.dataTables.css" rel="stylesheet" type="text/css"/>
<script src="../../datatables/media/js/jquery.dataTables.js" type="text/javascript"></script>
<script>
function Mudarestado(el) {
var display = document.getElementById(el).style.display;
if (display == "none")
document.getElementById(el).style.display = 'block';
else
document.getElementById(el).style.display = 'none';
}
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#tabela').DataTable({
"pagingType": "full_numbers", "lengthMenu": [[8, 25, 50, -1], [8, 25, 50, "Todos"]], stateSave: true, "oLanguage": {
"sProcessing": "Processando. Aguarde...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "NENHUM REGISTRO ENCONTRADO!",
"sInfo": "Mostrando _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
"sInfoFiltered": "(de _MAX_ registros no total)",
"sInfoPostFix": "",
"sSearch": "<img src='../../img/btPesquisar.png' width='20' title='Pesquisar'/>",
"sUrl": "",
"oPaginate": {
"sFirst": "<<",
"sPrevious": "<img src='../../img/anterior.png' width='20' title='Registro anterior'/>",
"sNext": "<img src='../../img/proximo.png' width='20' title='Próximo registro'/>",
"sLast": ">>"
}
}
});
});
</script>
</head>
<body style="padding-top: 5px;"/>
<div class="container">
<input type='hidden' class='form-control' name='cod_contrato' value="<? $cod_contrato ?>">
<div id='margin-bottom'>
<div class='col-md-6'>
<div id="padding">
<?php
echo '<div style="font-size: 11px; font-family: Verdana, Arial, sans-serif;" class="notice notice-primary"><b>' . utf8_encode($forn) . '</b><br>';
echo '<b>' . $p['pli_pro_id'] . '-' . utf8_encode($p['pro_produto']) . '</b></div>';
?>
<!-- <div class="centro">-->
<!-- <a href="#" onclick="Mudarestado('minhaDiv')" title="adicioniar programa" style="font-size: 22px; color: #307930;">adicionar programa</a>-->
<!-- </div>-->
</div>
<!-- <div class="container" id="minhaDiv" style="display: none;">-->
<div class="container" id="minhaDivs">
<div id='padding'>
<form method="post" action="licitacao_crud.php?var_acao=cadastrar_item_prg">
<input type='hidden' class='form-control' name='cod_item' value="<?=$cod_for?>"/>
<input type='hidden' class='form-control' name='cod_contrato' value="<?=$cod_prd?>"/>
<input type='hidden' class='form-control' name='cod_for' value="<?=$cod_for?>"/>
<input type='hidden' class='form-control' name='id_prod' value="<?=$id_prod?>"/>
<input type='hidden' class='form-control' name='forn' value="<?=$forn?>"/>
<div class='panel panel-primary filterable'>
<div class="panel-body">
<div class="tab-pane" id="itens">
<div class="">
<div class="col-md-6 col-xs-6 col-lg-6">
Programa
<select name="txt_programa" class="form-control">
<option value="999" selected>Selecione uma opção</option>
<?php while ($_prg = mysql_fetch_array($prg)) { ?>
<option value="<?=$_prg['prg_id']?>"><?=utf8_encode($_prg['prg_programa'])?></option>
<?php } ?>
</select>
</div>
<div class="col-xs-4 col-sm-4 com-md-4 col-lg-4">
<lable for='qtd_item'>Quant.</lable>
<input class="form-control" type="text" name="qtd_item" required>
</div>
<div class="col-xs-2 col-sm-2 com-md-2 col-lg-2">
<lable>.</lable>
<br>
<button class="" title="salvar" type='submit'><i class="fa fa-plus"></i></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class='panel panel-primary'>
<table class='table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead id='tr_color'>
<th class="esquerda">ID</th>
<th class="esquerda">Programa</th>
<th class="direita">quantidade</th>
<th class="direita"></th>
</thead>
<tbody>
<?php
$total = 0;
while ($l = mysql_fetch_array($itemprg)) {
echo "<tr>";
echo "<td class='esquerda'><b>" . $l['pip_id'] . "</b></td>";
echo "<td class='esquerda'><b>" . $l['prg_programa'] . ' (' . $l['pip_prg'] . ')' . "</b></td>";
echo "<td class='direita'><b>" . number_format($l['pip_qtd'], 2, ',', '.') . "</b></td>";
$total += $l['pip_qtd'];
$id = $l['pip_id'];
echo "<td width='2%'>
<a title='excluir programa' href='licitacao_crud.php?var_acao=excluir_prod_prg&id=$id&cod_for=$cod_for&id_prd=$id_prod&cod_prd=$cod_prd&forn=$forn'>
<span class='glyphicon glyphicon-trash text-red'></span>
</a>
</td>
";
echo "</tr>";
}
?>
</tbody>
<tfoot>
<th class="esquerda"></th>
<th class="direita" style="font-size: 14px;">TOTAL</th>
<th class="direita" style="font-size: 14px;"><?php echo number_format($total, 0, ',', '.') ?></th>
<th class="direita"></th>
</tfoot>
</table>
</div>
<div style="font-size: 14px;" class="direita">
<?php
if ($total != $valor) {
echo '<div class="centro notice notice-warning">';
echo '<div style="color: black;" class="centro label-warning_amarelo">Quantidade distribuída diferente da quantidade do contrato</div>';
echo '<div>contrato: ' . number_format($valor, 0, ',', '.') . ' | ';
echo 'distribuição: ' . number_format($total, 0, ',', '.') . ' | ';
$tot = ($p['pli_pro_qtd'] - $total);
echo 'diferença: ' . number_format($tot, 0, ',', '.') . ' </div>';
echo '</div>';
}
if ($total==$valor) {
echo '<div class="notice notice-success">';
echo '<div style="color: white;" class="centro label-success col-lg-2">Quantidades da distribuição por programas OK!</div>';
echo '</div>';
}
?>
<div id='' class="centro">
<!-- <span style="cursor: hand; color: #337ab6; font-size: 25px;" onClick="history.go(-1)" class="glyphicon glyphicon-arrow-left" title="voltar"/>-->
<button id="#sign-up" name="" class="btn" onClick="location.href='licitacao_forn_prd.php?id=<?php echo $cod_for ?>&forn=<?php echo $forn ?>'">
<span class="glyphicon glyphicon-arrow-left" title="voltar"/>
</button>
</div>
</div>
</div>