$xml = ""; $id = isset($_REQUEST["id"]) ? get_request("id") : ""; $isPaga = isset($_REQUEST["isPaga"]) ? $_REQUEST["isPaga"] : ""; $data = isset($_REQUEST["data"]) ? $_REQUEST["data"] : ""; $descricao = isset($_REQUEST["descricao"]) ? get_request("descricao") : ""; $valor = isset($_REQUEST["valor"]) ? get_request("valor") : ""; $dataConta = new DateTime(); list($day, $month, $year) = explode("/", $data); $dataConta->setDate($year, $month, $day); $FormaPagamento = get_request("formaPagamento"); $banco = get_request("banco"); $agencia = get_request("agencia"); $numeroCheque = get_request("numeroCheque"); $c = $em->find("Entities\\ContaPagar", $id); if (empty($c)) { $c = new ContaPagar(); } $c->setDescricao($descricao); $c->setValor($valor); $c->setData($dataConta); $c->setDataPagamento($dataConta); $c->setIsPaga(1); $c->setFormaPagamento($FormaPagamento); $c->setBanco($banco); $c->setAgencia($agencia); $c->setNumeroCheque($numeroCheque); $c->setIsDelete(0); $em->persist($c); $erro = 0; $descricaoErro = ""; try {
<?php use Entities\ContaPagar; include_once '../templates/topo.php'; $permissoesPagina = array(MENUCONTASPAGAR); verificaPermissao($permissoesPagina); $id = ''; if (isset($_REQUEST['id'])) { $id = $_REQUEST['id']; } $contaPagar = $em->find("Entities\\ContaPagar", $id); if (empty($contaPagar)) { $contaPagar = new ContaPagar(); } ?> <script> //contaPagar = new ContaPagar(); </script> <?php $id = $contaPagar->getId(); ?> <div class="tabs center"> <ul> <li><a href="#tabs-1">Conta a pagar</a></li> </ul> <div id="tabs-1"> <div cols='3'> <div class='field' > <label>Descricao da conta</label> <input type="hidden" value="<?php echo $id;