示例#1
0
                    </div>

                </form>
                <div style="clear: both"><br />
                    <a href="pagamento_add.php">
                        <h3><img src="../images/botao_add.png" border="0" /> Adicionar novo registro</h3>
                    </a>
                </div>
                <?php 
$b->busca = $busca;
$b->id_departamento = $id_departamento;
$b->situacao = $situacao;
$b->id_forma_pagamento = $id_forma_pagamento;
$b->data_i = $busca_data_i != "" ? invert($busca_data_i, '-', 'SQL') : '';
$b->data_f = $busca_data_f != "" ? invert($busca_data_f, '-', 'SQL') : '';
$pagamentoDAO = new PagamentoDAO();
$pagamentos = $pagamentoDAO->busca($b, $controle_id_empresa, $pagina);
$p_valor = "";
?>
 
                <br />
                <table width="100%" cellpadding="4" cellspacing="1"
                       class="result_tabela">
                    <tr>
                        <td colspan="13" class="barra_busca">
                        <?php 
$pagamentoDAO->QTDPagina();
?>
                        </td>
                    </tr>
                    <tr>
示例#2
0
文件: index.php 项目: hexti/troncal
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PagamentoDAO.php';
include_once '../Pagamento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$DAO = new PagamentoDAO();
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Deletar($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Registro removido com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        print_r($retorno);
    }
}
?>
	<!-- topbar ends -->
		<div class="container-fluid">
		<div class="row-fluid">
				
			<!-- left menu starts -->
			<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
			</div><!--/span-->
			<!-- left menu ends -->
<?php

require "../includes/verifica_logado_ajax.inc.php";
require "../includes/funcoes.php";
require "../includes/global.inc.php";
require "../includes/geraexcel/excelwriter.inc.php";
$arquivoDiretorio = "./exporta/" . $controle_id_usuario . ".xls";
$nomeArquivo = $controle_id_usuario . ".xls";
$excel = new ExcelWriter($arquivoDiretorio);
if ($excel == false) {
    echo $excel->error;
    exit;
}
$pagamentoDAO = new PagamentoDAO();
//Escreve o nome dos campos de uma tabela
$linha_arq = 'ID;Favorecido;Descrição;Forma;Vencimento;Valor;Desconto;Multa/Juros;Valor Pg;';
$myArr = explode(';', $linha_arq);
$excel->writeLine($myArr);
$lista = $pagamentoDAO->execSession('pgto');
foreach ($lista as $l) {
    $linha_arq = $l->id_pagamento . ';' . $l->favorecido . ';' . $l->descricao . ';' . $l->forma_pagamento . ';' . invert($l->dt_vencimento, '/', 'PHP') . ';' . $l->valor . ';' . $l->desconto . ';' . $p->vlr_multa . ';' . $l->valor_pg;
    $myArr = explode(';', $linha_arq);
    $excel->writeLine($myArr);
}
header("Content-type: octet/stream");
header("Content-disposition: attachment; filename=exporta/" . $nomeArquivo . ";");
header("Content-Length: " . filesize($arquivoDiretorio));
readfile($arquivoDiretorio);
#Colocar aqui o script para download do arquivo
示例#4
0
文件: new.php 项目: hexti/troncal
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PagamentoDAO.php';
include_once '../Pagamento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(7, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$pagamento = new Pagamento();
$DAO = new PagamentoDAO();
//Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $pagamento->setTaxa($_POST['taxa']);
    $pagamento->setCmat_real($_POST['cmat_real']);
    $pagamento->setVetec_real($_POST['Vetec_real']);
    $pagamento->setCmat_iene($_POST['cmat_iene']);
    $pagamento->setVetec_iene($_POST['Vetec_iene']);
    $pagamento->setCmat_fiscal($_POST['cmat_fiscal']);
    $pagamento->setVetec_fiscal($_POST['Vetec_fiscal']);
    $pagamento->setCmat_pgmt($_POST['cmat_pgmt']);
    $pagamento->setVetec_pgmt($_POST['Vetec_pgmt']);
    $pagamento->setChodai_iene($_POST['chodai_iene']);
    $pagamento->setYec_iene($_POST['yec_iene']);
    $pagamento->setChodai_invoice($_POST['chodai_invoice']);
    $pagamento->setYec_invoice($_POST['yec_invoice']);
    $resultado = $DAO->Gravar($pagamento);
    if ($resultado != 0) {
        echo '<script language= "JavaScript">alert("Registro cadastrado com sucesso");</script>';
<?php

header("Content-Type: text/html; charset=ISO-8859-1", true);
require "../includes/verifica_logado_ajax.inc.php";
require "../includes/funcoes.php";
require "../includes/global.inc.php";
pt_register('GET', 'id_pagamento');
$pagamentoDAO = new PagamentoDAO();
$pagamento = $pagamentoDAO->deletaPagamento($id_pagamento, $controle_id_empresa);
if ($pagamento != 0) {
    echo 'Excluído';
}
示例#6
0
文件: edit.php 项目: hexti/troncal
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PagamentoDAO.php';
include_once '../Pagamento.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
if (!in_array(76, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$pagamento = new Pagamento();
$DAO = new PagamentoDAO();
$pagamento->setId(limpaTexto($_GET['id']));
// Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'editar') {
    $pagamento->setId($_POST['id']);
    $pagamento->setTaxa($_POST['taxa']);
    $pagamento->setCmat_real($_POST['cmat_real']);
    $pagamento->setVetec_real($_POST['Vetec_real']);
    $pagamento->setCmat_iene($_POST['cmat_iene']);
    $pagamento->setVetec_iene($_POST['Vetec_iene']);
    $pagamento->setCmat_fiscal($_POST['cmat_fiscal']);
    $pagamento->setVetec_fiscal($_POST['Vetec_fiscal']);
    $pagamento->setCmat_pgmt($_POST['cmat_pgmt']);
    $pagamento->setVetec_pgmt($_POST['Vetec_pgmt']);
    $pagamento->setChodai_iene($_POST['chodai_iene']);
    $pagamento->setYec_iene($_POST['yec_iene']);
    $pagamento->setChodai_invoice($_POST['chodai_invoice']);
    $pagamento->setYec_invoice($_POST['yec_invoice']);
    $Cmat_real = $pagamento->getCmat_real();