sefazInutiliza() public method

sefazInutiliza Solicita a inutilização de uma ou uma sequencia de NFe de uma determinada série
public sefazInutiliza ( integer $nSerie = 1, integer $nIni, integer $nFin, string $xJust = '', string $tpAmb = '2', array &$aRetorno = [], $salvarMensagens = true ) : string
$nSerie integer
$nIni integer
$nFin integer
$xJust string
$tpAmb string
$aRetorno array
return string
Exemplo n.º 1
0
                //EFETUA O DOWNLOAD
                header('Content-Disposition: attachment; filename="' . $nome_arquivo . '"');
                echo $string;
            } else {
                echo "Falha na inserção da nota no banco de dados. Contate o programador";
            }
        }
    }
    ######################################### FIM TRANSMISSÃO #########################################################################################
    ##################################################### INUTILIZAÇÃO ##############################################################################333
    if (isset($_POST['function']) && $_POST['function'] == "inutilizacao") {
        //SE FOR inutilização DE NOTA FISCAL
        $aResposta = array();
        $nSerie = $_POST['serie'];
        $nIni = $_POST['ininmr'];
        $nFin = $_POST['fimnmr'];
        $xJust = $_POST['justificativa'];
        $tpAmb = '2';
        $xml = $nfe->sefazInutiliza($nSerie, $nIni, $nFin, $xJust, $tpAmb, $aResposta);
        echo '<br><br><PRE>';
        echo htmlspecialchars($nfe->soapDebug);
        echo '</PRE><BR>';
        print_r($aResposta);
        echo "<br>";
    }
    ##########################################3# FIM INUTILIZAÇÃO ###############################################################################
    ############################################ CANCELAMENTO ####################################################################################
    ############################################ FIM CANCELAMENTO #############################################################################
} else {
    echo "Possível ataque de upload de arquivo!\n";
}