This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
def run | |
print 'n: ' | |
n = gets.to_i | |
print 'r: ' | |
r = gets.to_i | |
raise 'n deve ser maior que 2' if n < 2 | |
raise 'r deve ser maior que 1' if r <= 1 | |
raise 'r deve ser menor ou igual a n' if r > n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure criarDataSet(dsOrigem: TDataSet; cdsDest: TClientDataSet); | |
var | |
Provider: TDataSetProvider; | |
begin | |
Provider := TDataSetProvider.Create(nil); | |
try | |
Provider.DataSet := dsOrigem; | |
criarDataSet(Provider, cdsDest); | |
finally | |
FreeAndNil(Provider); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Você deve definir isso globalmente para sua aplicação | |
$SERVER = "http://producao.acrasnfe.acras.com.br"; | |
$TOKEN = "token_recebido_do_suporte"; | |
$nfse = array( | |
"natureza_operacao" => 'Remessa de Produtos', | |
"forma_pagamento" => 0, | |
"data_emissao" => '2013-05-31T12:00:00-03:00', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nome_destinatario":"NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL", | |
"cpf_destinatario":"49996287912", | |
"informacoes_adicionais_contribuinte":"RETIRADA POR CONTA DO DESTINATÁRIO", | |
"valor_produtos":"250.10", | |
"valor_desconto":"0.00", | |
"valor_total":"250.10", | |
"forma_pagamento":"1", | |
"icms_valor_total":"0", | |
"items":[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cnpj_emitente":13555994000154, | |
"nome_destinatario":"NF-E EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL", | |
"cnpj_destinatario":10812933000137, | |
"inscricao_estadual_destinatario":"ISENTO", | |
"telefone_destinatario":6132332933, | |
"logradouro_destinatario":"SMAS 6580 PARKSHOPPING", | |
"numero_destinatario":134, | |
"bairro_destinatario":"Zona Industrial (Guará)", | |
"municipio_destinatario":"Brasilia", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import json | |
import requests | |
import ast | |
########################################################################################## | |
# Exemplo de envio de NFSe no município de Sâo Paulo pela API do Focus NFe | |
# | |
# https://focusnfe.com.br/api | |
# Documentação: https://focusnfe.com.br/api-documentacao |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import json | |
import requests | |
########################################################################################## | |
# Exemplo de consulta de NFSe no município de Sâo Paulo pela API do Focus NFe | |
# | |
# https://focusnfe.com.br/api | |
# Documentação: https://focusnfe.com.br/api-documentacao | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status":"autorizado", | |
"status_sefaz":"100", | |
"mensagem_sefaz":"Autorizado o uso da NF-e", | |
"chave_nfe":"NFe41150876497338001649650010000005351770691965", | |
"numero":"535", | |
"serie":"1", | |
"caminho_xml_nota_fiscal":"/arquivos/76497338001649/201508/XMLs/41150876497338001649650010000005351770691965-nfe.xml", | |
"caminho_danfe":"/notas_fiscais_consumidor/NFe41150876497338001649650010000005351770691965.html", | |
"requisicao_nota_fiscal": "OMITIDO", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Você deve definir isso globalmente para sua aplicação | |
// Servidor de homologação | |
$SERVER = "http://homologacao.acrasnfe.acras.com.br"; | |
// Servidor de produção | |
//$SERVER = "http://producao.acrasnfe.acras.com.br"; | |
$TOKEN = "token_recebido_do_suporte"; | |
$nfe = array( |
OlderNewer