/**
  * Crea e restitutisce un metodo di pagamento 
  * a partire da una riga di DB
  * @param type $row
  * @return Pagamento
  */
 public function creaPagamentoDaArray($row)
 {
     $pagamento = new Pagamento();
     $pagamento->setId($row['id']);
     $pagamento->setSaldo($row['saldo']);
     $pagamento->setNumeroCarta($row['num_carta']);
     $pagamento->setCodiceCarta($row['cod_carta']);
     $pagamento->setScadenzaCarta($row['scadenza_carta']);
     $pagamento->setTitolareCarta($row['titolare_carta']);
     $pagamento->setTipoCarta($row['tipo_carta']);
     return $pagamento;
 }
Example #2
0
<?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();