Páginas filhas
  • DSERTSS3-3542 - DT TRANSMITE - Importação Manual - Município de Duque de Caxias

01. DADOS GERAIS

Produto:TOTVS Transmite
Linha de Produto:

Linha Protheus

Segmento:

Backoffice

Módulo:

TOTVS Transmite

Função:Não Há
País:Brasil
Ticket:Não Há
Requisito/Story/Issue (informe o requisito relacionado) :DSERTSS3-3542

02. SITUAÇÃO/REQUISITO

Nesta estória deve-se realizar a sincronização automática de NFS-e, perante o município de Duque de Caxias/RJ. Caso não exista um serviço WS que forneça a possibilidade de sincronização, deve-se nesta tarefa implementar e/ou validar a importação das NFS-e deste município com a solução TOTVS Transmite. Ainda é requerido, além da importação, que as funcionalidades de detalhamento, impressão, exportação e envio de e-mail, em cima de tais notas funcionem normalmente..

03. SOLUÇÃO

Foram desenvolvidos os seguintes templates para resolução da demanda:

GETMUNICICPIO
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd" xmlns:ns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eis="http://schemas.datacontract.org/2004/07/Eissnfe.Negocio.WebServices.Mensagem" xmlns:eis1="http://schemas.datacontract.org/2004/07/Eissnfe.Dominio.DataTransferObject.Prestador" xmlns:ns2="http://www.abrasf.org.br/nfse.xsd" xmlns:ns4="http://www.giss.com.br/tipos-v2_04.xsd" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/>
	<xsl:template match="/">
		<xsl:choose>
			<xsl:when test="//PrestadorServico/Endereco/CodigoMunicipio|//Servico/CodigoMunicipio">
				<Municipio>
					<Codigo>
						<xsl:value-of select="//PrestadorServico/Endereco/CodigoMunicipio|//Servico/CodigoMunicipio"/>
					</Codigo>
					<Modelo>ABRASF</Modelo>
					<Versao>1.00</Versao>
					<Versao>2.00</Versao>
					<Versao>2.01</Versao>
					<Versao>2.02</Versao>
					<Versao>2.03</Versao>
					<Versao>2.04</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//EnderecoPrestadorServico/CodigoMunicipio|//Servico/CodigoMunicipio">
				<Municipio>
					<Codigo>
						<xsl:value-of select="//EnderecoPrestadorServico/CodigoMunicipio|//Servico/CodigoMunicipio"/>
					</Codigo>
					<Modelo>ABRASF</Modelo>
					<Versao>1.00</Versao>
					<Versao>2.00</Versao>
					<Versao>2.01</Versao>
					<Versao>2.02</Versao>
					<Versao>2.03</Versao>
					<Versao>2.04</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//Servico/MunicipioPrestacaoServico|//tc:Servico/tc:MunicipioPrestacaoServico">
				<Municipio>
					<Codigo>
						<xsl:value-of select="//Servico/MunicipioPrestacaoServico|//tc:Servico/tc:MunicipioPrestacaoServico"/>
					</Codigo>
					<Modelo>ABRASF</Modelo>
					<Versao>1.00</Versao>
					<Versao>2.00</Versao>
					<Versao>2.01</Versao>
					<Versao>2.02</Versao>
					<Versao>2.03</Versao>
					<Versao>2.04</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//TimbrePrefeituraLinha1 = 'PREFEITURA DA SERRA'">
				<Municipio>
					<Codigo>
						<xsl:text>3205002</xsl:text>
					</Codigo>
					<Modelo>ISSWEB</Modelo>
					<Versao>1.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//EnderecoPrestador/Cidade">
				<Municipio>
					<Codigo>
						<xsl:value-of select="//EnderecoPrestador/Cidade"/>
					</Codigo>
					<Modelo>Proprio</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'VARGINHA'">
				<Municipio>
					<Codigo>
						<xsl:text>3170701</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'TABOAO DA SERRA'">
				<Municipio>
					<Codigo>
						<xsl:text>3552809</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'BEBEDOURO'">
				<Municipio>
					<Codigo>
						<xsl:text>3506102</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'ITAPECERICADASERRA'">
				<Municipio>
					<Codigo>
						<xsl:text>3522208</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'ITAPEVA'">
				<Municipio>
					<Codigo>
						<xsl:text>3522406</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>2.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//MunPre = 'JAU' or //MunPre='JAHU'">
				<Municipio>
					<Codigo>
						<xsl:text>3525300</xsl:text>
					</Codigo>
					<Modelo>ETRANSPARENCIA</Modelo>
					<Versao>1.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="/NFE/NotaFiscalRelatorioDTO/Prestador/Endereco/Cidade = 'Osasco' or /NFE/NotaFiscalRelatorioDTO/Prestador/Endereco/Cidade = 'OSASCO' or /NFE/NotaFiscalRelatorioDTO/Prestador/Endereco/Cidade = 'osasco' ">
				<Municipio>
					<Codigo>
						<xsl:text>3534401</xsl:text>
					</Codigo>
					<Modelo>Egoverne</Modelo>
					<Versao>1.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//Servico/CodigoMunicipio">
				<Municipio>
					<Codigo>
						<xsl:text>2910727</xsl:text>
					</Codigo>
					<Modelo>Sudoeste Informatica</Modelo>
					<Versao>2.02</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//Servico/CodigoMunicipio">
				<Municipio>
					<Codigo>
						<xsl:text>1702109</xsl:text>
					</Codigo>
					<Modelo>WebISS</Modelo>
					<Versao>2.02</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//CompNfe/Nfe/InfNFe/PrestadorServico/Endereco/Cidade = 'BARUERI' or //CompNfe/Nfe/InfNFe/PrestadorServico/Endereco/Cidade = 'Barueri' or //CompNfe/Nfe/InfNFe/PrestadorServico/Endereco/Cidade = 'barueri'">
				<Municipio>
					<Codigo>
						<xsl:text>3505708</xsl:text>
					</Codigo>
					<Modelo>proprio</Modelo>
					<Versao>1.00</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//ns2:Servico/ns2:CodigoMunicipio = 3122306">
				<Municipio>
					<Codigo>
						<xsl:text>3122306</xsl:text>
					</Codigo>
					<Modelo>ABRASF</Modelo>
					<Versao>2.01</Versao>
				</Municipio>
			</xsl:when>
			<xsl:when test="//ns4:PrestadorServico/ns4:Endereco/ns4:CodigoMunicipio = 2704302">
				<Municipio>
					<Codigo>
						<xsl:text>2704302</xsl:text>
					</Codigo>
					<Modelo>ABRASF</Modelo>
					<Versao>2.04</Versao>
					<PROVEDOR>GISS</PROVEDOR>
				</Municipio>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>
IMPORTAÇÃO
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:ns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes"/>
	<xsl:template match="/">
		<xsl:text>{</xsl:text>
		<xsl:text>"ChaveNFSe":"</xsl:text>
		<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj|//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf, '.|/|-', '')"/>
		<xsl:value-of select="//tc:Numero"/>
		<xsl:value-of select="translate(//tc:DataEmissao, '-:T', '')"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"SerieRps":"</xsl:text>
		<xsl:value-of select="//tc:IdentificacaoRps/tc:Serie"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"Rps":"</xsl:text>
		<xsl:value-of select="//tc:IdentificacaoRps/tc:Numero"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"Nfse":"</xsl:text>
		<xsl:value-of select="//tc:Numero"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"CancNfse":{"DataCancelamento":"</xsl:text>
		<xsl:value-of select="//tc:DataHoraCancelamento|//tc:NfseCancelamento/tc:Confirmacao/tc:InfConfirmacaoCancelamento/tc:DataHora"/>
		<xsl:text>"},</xsl:text>
		<xsl:text>"Status":"</xsl:text>
		<xsl:choose>
			<xsl:when test="//tc:NfseCancelamento">
				<xsl:text>Cancelada</xsl:text>
			</xsl:when>
			<xsl:when test="//tc:NfseSubstituicao">
				<xsl:text>Substituida</xsl:text>
			</xsl:when>
			<xsl:when test="//tc:Nfse">
				<xsl:text>Normal</xsl:text>
			</xsl:when>
		</xsl:choose>
		<xsl:text>",</xsl:text>
		<xsl:text>"CnpjCpfTomador":"</xsl:text>
		<xsl:value-of select="translate(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj|//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf|//tc:IdentificacaoTomador/tc:Cnpj|//tc:IdentificacaoTomador/tc:Cpf, '.|/|-', '')"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"CnpjCpfPrestador":"</xsl:text>
		<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj|//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf|//tc:IdentificacaoPrestador/tc:Cnpj|//tc:IdentificacaoPrestador/tc:Cpf, '.|/|-', '')"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"RazaoSocialPrestador":"</xsl:text>
		<xsl:value-of select="//tc:PrestadorServico/tc:RazaoSocial"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"ValorServicos":"</xsl:text>
		<xsl:value-of select="//tc:ValorServicos"/>
		<xsl:text>",</xsl:text>
		<xsl:text>"DataEmissao":"</xsl:text>
		<xsl:value-of select="//tc:DataEmissao"/>
		<xsl:text>"}</xsl:text>
	</xsl:template>
</xsl:stylesheet>
DETALHES
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY ocirc "ô">
<!ENTITY uacute "ú">
<!ENTITY atilde "ã">
<!ENTITY ccedil "ç">
<!ENTITY agrave "à">
<!ENTITY nbsp "­">
<!ENTITY eacute "é">
<!ENTITY nbsp "­">]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd" version="1.0">
	<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="PUBLIC"/>
	<xsl:decimal-format name="brazil" decimal-separator="."/>
	<xsl:decimal-format name="Cz2" grouping-separator=" " decimal-separator=","/>
	<xsl:template match="/">
		<div class="nfse-details">
			<xsl:if test="//tc:IdentificacaoRps">
				<div class="po-font-subtitle po-row po-mt-5">
					<div class="po-sm-12">Identificação do RPS</div>
</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Série</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:IdentificacaoRps/tc:Serie"/>
						</div>
					</div>
					<div class="po-sm-3">
						<div class="po-font-text-bold">Tipo</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:choose>
								<xsl:when test="//tc:IdentificacaoRps/tc:Tipo  = 1">
									<xsl:text>RPS</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:IdentificacaoRps/tc:Tipo = 2">
									<xsl:text>Nota Fiscal Conjugada</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:IdentificacaoRps/tc:Tipo = 3">
									<xsl:text>Cupom</xsl:text>
								</xsl:when>
							</xsl:choose>
						</div>
					</div>
					<div class="po-sm-2">
						<div class="po-font-text-bold">Número</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:IdentificacaoRps/tc:Numero"/>
						</div>
					</div>
				</div>
			</xsl:if>
			<div class="po-row po-mt-3">
				<div class="po-sm-3">
					<div class="po-font-text-bold">Natureza da Operação</div>
					<div class="po-mt-1 po-font-text-large">
						<xsl:choose>
							<xsl:when test="//tc:NaturezaOperacao = 1">
								<xsl:text>01 – Tributação no município</xsl:text>
							</xsl:when>
							<xsl:when test="//tc:NaturezaOperacao = 2">
								<xsl:text>02 – Tributação fora do município</xsl:text>
							</xsl:when>
							<xsl:when test="//tc:NaturezaOperacao = 3">
								<xsl:text>03– Isenção</xsl:text>
							</xsl:when>
							<xsl:when test="//tc:NaturezaOperacao = 4">
								<xsl:text>04 – Imune</xsl:text>
							</xsl:when>
							<xsl:when test="//tc:NaturezaOperacao = 5">
								<xsl:text>05 – Exigibilidade suspensa por decisão judicial</xsl:text>
							</xsl:when>
							<xsl:when test="//tc:NaturezaOperacao = 6">
								<xsl:text>06 – Exigibilidade suspensa por procedimento administrativo</xsl:text>
							</xsl:when>
						</xsl:choose>
					</div>
				</div>
				<xsl:if test="//tc:RegimeEspecialTributacao">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Regime Especial Tributação</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:choose>
								<xsl:when test="//tc:RegimeEspecialTributacao = 1">
									<xsl:text>1 – Microempresa municipal</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:RegimeEspecialTributacao = 2">
									<xsl:text>2 – Estimativa</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:RegimeEspecialTributacao = 3">
									<xsl:text>3 – Sociedade de profissionais</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:RegimeEspecialTributacao = 4">
									<xsl:text>4 – Cooperativa</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:RegimeEspecialTributacao = 5">
									<xsl:text>5 – Microempresário Individual (MEI)</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:RegimeEspecialTributacao = 6">
									<xsl:text>6 – Microempresário e Empresa de Pequeno Porte(ME EPP)</xsl:text>
								</xsl:when>
							</xsl:choose>
						</div>
					</div>
				</xsl:if>
				<xsl:if test="//tc:OptanteSimplesNacional">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Optante pelo Simples Nacional</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:choose>
								<xsl:when test="//tc:OptanteSimplesNacional = 1">
									<xsl:text>Sim</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:OptanteSimplesNacional = 2">
									<xsl:text>Não</xsl:text>
								</xsl:when>
							</xsl:choose>
						</div>
					</div>
				</xsl:if>
				<xsl:if test="//tc:IncentivadorCultural">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Incentivador Cultural</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:choose>
								<xsl:when test="//tc:IncentivadorCultural = 1">
									<xsl:text>Sim</xsl:text>
								</xsl:when>
								<xsl:when test="//tc:IncentivadorCultural = 2">
									<xsl:text>Não</xsl:text>
								</xsl:when>
							</xsl:choose>
						</div>
					</div>
				</xsl:if>
			</div>
			<div class="po-row po-mt-3">
				<xsl:if test="//tc:RpsSubstituido">
					<div class="po-font-subtitle po-row po-mt-5">
						<div class="po-sm-12">RPS Substituído</div>
</div>
					<div class="po-row po-mt-3">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Série</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:value-of select="//tc:RpsSubstituido/tc:Serie"/>
							</div>
						</div>
						<div class="po-sm-3">
							<div class="po-font-text-bold">Tipo</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:choose>
									<xsl:when test="//tc:RpsSubstituido/tc:Tipo  = 1">
										<xsl:text>RPS</xsl:text>
									</xsl:when>
									<xsl:when test="//tc:RpsSubstituido/tc:Tipo = 2">
										<xsl:text>Nota Fiscal Conjugada</xsl:text>
									</xsl:when>
									<xsl:when test="//tc:RpsSubstituido/tc:Tipo = 3">
										<xsl:text>Cupom</xsl:text>
									</xsl:when>
								</xsl:choose>
							</div>
						</div>
						<div class="po-sm-2">
							<div class="po-font-text-bold">Número</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:value-of select="//tc:RpsSubstituido/tc:Numero"/>
							</div>
						</div>
					</div>
				</xsl:if>
				<div class="po-font-subtitle po-row po-mt-5">
					<div class="po-sm-12">Serviço</div>
</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-12">
						<div class="po-font-text-bold">Discriminação</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:Servico/tc:Discriminacao"/>
						</div>
					</div>
				</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Valor dos Serviços</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:text>R$</xsl:text>
							<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorServicos"/>
						</div>
					</div>
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorDeducoes">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor das Deduções</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorDeducoes"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorPis">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor do Pis</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorPis"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorCofins">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor do Cofins</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorCofins"/>
							</div>
						</div>
					</xsl:if>
				</div>
				<div class="po-row po-mt-3">
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorIss">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor do ISS</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorIss"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorIssRetido">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor do Iss Retido</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorIssRetido"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:OutrasRetencoes">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Outras Retenções</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:OutrasRetencoes"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:BaseCalculo">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Base de Cálculo</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:BaseCalculo"/>
							</div>
						</div>
					</xsl:if>
				</div>
				<div class="po-row po-mt-3">
					<xsl:if test="//tc:Servico/tc:Valores/tc:Aliquota">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Alíquota</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:Aliquota"/>
								<xsl:text>%</xsl:text>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:ValorLiquidoNfse">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Valor Líquido da Nfse</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:ValorLiquidoNfse"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:DescontoIncondicionado">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Desconto Incondicionado</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:DescontoIncondicionado"/>
							</div>
						</div>
					</xsl:if>
					<xsl:if test="//tc:Servico/tc:Valores/tc:DescontoCondicionado">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Desconto Condicionado</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:text>R$</xsl:text>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:DescontoCondicionado"/>
							</div>
						</div>
					</xsl:if>
				</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Item da Lista de Serviços</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:Servico/tc:ItemListaServico"/>
						</div>
					</div>
					<xsl:if test="//tc:Servico/tc:CodigoCnae">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Código Cnae</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:value-of select="//tc:Servico/tc:CodigoCnae"/>
							</div>
						</div>
					</xsl:if>
					<div class="po-sm-3">
						<div class="po-font-text-bold">Código da Tributação do Município</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:Servico/tc:CodigoTributacaoMunicipio"/>
						</div>
					</div>
					<div class="po-sm-3">
						<div class="po-font-text-bold">Código do Município</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:Servico/tc:MunicipioPrestacaoServico"/>
						</div>
					</div>
				</div>
			</div>
			<div class="po-font-subtitle po-row po-mt-5">
				<div class="po-sm-12">Prestador</div>
</div>
			<div class="po-row po-mt-3">
				<div class="po-sm-3">
					<xsl:choose>
						<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
							<div class="po-font-text-bold">CNPJ</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:choose>
									<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
										<xsl:value-of select="concat(substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
									</xsl:when>
								</xsl:choose>
							</div>
						</xsl:when>
						<xsl:otherwise>
							<div class="po-font-text-bold">CPF</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:choose>
									<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf">
										<xsl:value-of select="concat(substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,1,3),'.',substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,4,3),'.',substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,7,3),'-',substring(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,10,2))"/>
									</xsl:when>
								</xsl:choose>
							</div>
						</xsl:otherwise>
					</xsl:choose>
				</div>
				<xsl:if test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
					<div class="po-sm-3">
						<div class="po-font-text-bold">Inscrição Municipal</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:choose>
								<xsl:when test="//tc:IdentificacaoPrestador/tc:InscricaoMunicipal">
									<xsl:value-of select="//tc:IdentificacaoPrestador/tc:InscricaoMunicipal"/>
								</xsl:when>
							</xsl:choose>
						</div>
					</div>
				</xsl:if>
				<div class="po-sm-6">
					<xsl:choose>
						<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
							<div class="po-font-text-bold">Razão Social</div>
						</xsl:when>
						<xsl:otherwise>
							<div class="po-font-text-bold">Nome</div>
						</xsl:otherwise>
					</xsl:choose>
					<div class="po-mt-1 po-font-text-large">
						<xsl:value-of select="//tc:PrestadorServico/tc:RazaoSocial|//tc:PrestadorServico/tc:RazaoSocial"/>
					</div>
				</div>
			</div>
			<xsl:if test="//tc:IdentificacaoTomador">
				<div class="po-font-subtitle po-row po-mt-5">
					<div class="po-sm-12">Tomador</div>
</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-3">
						<xsl:choose>
							<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
								<div class="po-font-text-bold">CNPJ</div>
								<div class="po-mt-1 po-font-text-large">
									<xsl:choose>
										<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
											<xsl:value-of select="concat(substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
										</xsl:when>
									</xsl:choose>
								</div>
							</xsl:when>
							<xsl:otherwise>
								<div class="po-font-text-bold">CPF</div>
								<div class="po-mt-1 po-font-text-large">
									<xsl:choose>
										<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf">
											<xsl:value-of select="concat(substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf,1,3),'.',substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf,4,3),'.',substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf,7,3),'-',substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf,10,2))"/>
										</xsl:when>
									</xsl:choose>
								</div>
							</xsl:otherwise>
						</xsl:choose>
					</div>
					<xsl:if test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Inscrição Municipal</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:choose>
									<xsl:when test="//tc:IdentificacaoTomador/tc:InscricaoMunicipal">
										<xsl:value-of select="//tc:IdentificacaoTomador/tc:InscricaoMunicipal"/>
									</xsl:when>
								</xsl:choose>
							</div>
						</div>
					</xsl:if>
					<div class="po-sm-6">
						<xsl:choose>
							<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
								<div class="po-font-text-bold">Razão Social</div>
							</xsl:when>
							<xsl:otherwise>
								<div class="po-font-text-bold">Nome</div>
							</xsl:otherwise>
						</xsl:choose>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:TomadorServico/tc:RazaoSocial|//tc:TomadorServico/tc:RazaoSocial"/>
						</div>
					</div>
				</div>
			</xsl:if>
			<xsl:if test="//tc:IntermediarioServico">
				<div class="po-font-subtitle po-row po-mt-5">
					<div class="po-sm-12">Intermediador</div>
</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-3">
						<xsl:choose>
							<xsl:when test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj">
								<div class="po-font-text-bold">CNPJ</div>
								<div class="po-mt-1 po-font-text-large">
									<xsl:choose>
										<xsl:when test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj">
											<xsl:value-of select="concat(substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
										</xsl:when>
									</xsl:choose>
								</div>
							</xsl:when>
							<xsl:otherwise>
								<div class="po-font-text-bold">CPF</div>
								<div class="po-mt-1 po-font-text-large">
									<xsl:choose>
										<xsl:when test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf">
											<xsl:value-of select="concat(substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf,1,3),'.',substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf,4,3),'.',substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf,7,3),'-',substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf,10,2))"/>
										</xsl:when>
									</xsl:choose>
								</div>
							</xsl:otherwise>
						</xsl:choose>
					</div>
					<xsl:if test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj">
						<div class="po-sm-3">
							<div class="po-font-text-bold">Inscrição Municipal</div>
							<div class="po-mt-1 po-font-text-large">
								<xsl:choose>
									<xsl:when test="//tc:IntermediarioServico/tc:InscricaoMunicipal">
										<xsl:value-of select="//tc:IntermediarioServico/tc:InscricaoMunicipal"/>
									</xsl:when>
								</xsl:choose>
							</div>
						</div>
					</xsl:if>
					<div class="po-sm-6">
						<xsl:choose>
							<xsl:when test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj">
								<div class="po-font-text-bold">Razão Social</div>
							</xsl:when>
							<xsl:otherwise>
								<div class="po-font-text-bold">Nome</div>
							</xsl:otherwise>
						</xsl:choose>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:IntermediarioServico/tc:RazaoSocial|//tc:IntermediarioServico/tc:RazaoSocial"/>
						</div>
					</div>
				</div>
			</xsl:if>
			<xsl:if test="//tc:ContrucaoCivil|//tc:ConstrucaoCivil">
				<div class="po-font-subtitle po-row po-mt-5">
					<div class="po-sm-12">Construção Civil</div>
</div>
				<div class="po-row po-mt-3">
					<div class="po-sm-6">
						<div class="po-font-text-bold">Código da Obra</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:ContrucaoCivil/tc:CodigoObra|//tc:ConstrucaoCivil/tc:CodigoObra"/>
						</div>
					</div>
					<div class="po-sm-6">
						<div class="po-font-text-bold">Art</div>
						<div class="po-mt-1 po-font-text-large">
							<xsl:value-of select="//tc:ConstrucaoCivil/tc:Art|//tc:ContrucaoCivil/tc:Art"/>
						</div>
					</div>
				</div>
			</xsl:if>
		</div>
	</xsl:template>
</xsl:stylesheet>
IMPRESSÃO
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY ocirc "ô">
<!ENTITY uacute "ú">
<!ENTITY atilde "ã">
<!ENTITY ccedil "ç">
<!ENTITY agrave "à">
<!ENTITY nbsp "­">
<!ENTITY eacute "é">
<!ENTITY nbsp "­">]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd" version="2.0">
	<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="PUBLIC"/>
	<xsl:decimal-format name="brazil" decimal-separator="."/>
	<xsl:decimal-format name="Cz2" grouping-separator=" " decimal-separator=","/>
	<xsl:template match="/">
		<html>
			<head>
				<style>.tg {border-collapse:collapse;border-spacing:0;} .tg td{border-color:black;border-style:solid;border-width:1.5px;font-family:Arial, sans-serif;font-size:14px; overflow:hidden;padding:10px 5px;word-break:normal;} .tg th{border-color:black;border-style:solid;border-width:1.5px;font-family:Arial, sans-serif;font-size:14px; font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;} .tg .tg-9wq8{border-color:inherit;text-align:center;vertical-align:middle} .tg .tg-p1nr{border-color:inherit;font-size:11px;text-align:left;vertical-align:top} .tg .tg-c3ow{border-color:inherit;text-align:center;vertical-align:top;font-weight:bold;} .tg .tg-l6li{border-color:inherit;font-size:10px;text-align:left;vertical-align:top} .tg .tg-azew{border-color:inherit;font-size:10px;text-align:center;vertical-align:middle} .tg .tg-uzvj{border-color:inherit;font-weight:bold;text-align:center;vertical-align:middle} .tg .tg-7btt{border-bottom: none;border-color:inherit;font-weight:bold;text-align:center;vertical-align:top} .tg .tg-0pky{border-top: none;border-color:inherit;text-align:left;vertical-align:top}</style>
			</head>
			<body>
				<table class="tg">
					<thead>
						<tr>
							<th class="tg-9wq8" rowspan="3">
								<img src="data:image/png;base64,{logoPrefeitura}" alt="logo"/>
							</th>
							<th class="tg-uzvj" colspan="4" rowspan="3">Prefeitura do Município de {municipio}
								<br/>
								<br/>
								Secretaria Municipal de Finanças
								<br/>
								<br/>
								Nota Fiscal de Serviço Eletrônica NFS-e
							</th>
							<th class="tg-l6li">
								<b>Número</b>
								<br/>
								<xsl:value-of select="//tc:InfNfse/tc:Numero"/>
							</th>
						</tr>
						<tr>
							<th class="tg-l6li">
								<b>Emissão</b>
								<br/>
								<xsl:value-of select="ms:format-date(//tc:InfNfse/tc:DataEmissao, 'dd-MM-yyyy hh:mm:ss')"/>
							</th>
						</tr>
						<tr>
							<th class="tg-l6li">
								<b>Código Verificação</b>
								<br/>
								<xsl:value-of select="//tc:InfNfse/tc:CodigoVerificacao"/>
							</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="tg-azew" colspan="6">
								<b>Rps Número  </b>
								<xsl:value-of select="//tc:InfNfse/tc:IdentificacaoRps/tc:Numero"/>
								<b>  Série  </b>
								<xsl:value-of select="//tc:InfNfse/tc:IdentificacaoRps/tc:Serie"/>
								<b>  emitido em  </b>
								<xsl:value-of select="ms:format-date(//tc:InfNfse/tc:DataEmissaoRps, 'dd-MM-yyyy hh:mm:ss')"/>
							</td>
						</tr>
						<tr>
							<td class="tg-7btt" colspan="6">PRESTADOR DE SERVIÇOS</td>
						</tr>
						<tr>
							<td class="tg-0pky" colspan="6">
								<xsl:choose>
									<xsl:when test="//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
										<b>CNPJ:  </b>
										<xsl:value-of select="concat(substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
										<br/>
										<b>Inscrição Municipal:  </b>
										<xsl:value-of select="//tc:InfNfse/tc:PrestadorServico/tc:IdentificacaoPrestador/tc:InscricaoMunicipal"/>
										<br/>
										<b>Razão Social:  </b>
									</xsl:when>
									<xsl:otherwise>
										<b>CPF:  </b>
										<xsl:value-of select="concat(substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf, 1, 3), '.', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf, 4, 3), '.', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf, 7, 3), '-', substring(//tc:PrestadorServico/tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf, 10, 2))"/>
										<br/>
										<b>Nome:  </b>
									</xsl:otherwise>
								</xsl:choose>
								<xsl:value-of select="//tc:InfNfse/tc:PrestadorServico/tc:RazaoSocial"/>
								<br/>
								<b>Endereço:  </b>
								<xsl:value-of select="//tc:InfNfse/tc:PrestadorServico/tc:Endereco/tc:Endereco"/>
								<br/>
								<b>Município:  </b>
								<xsl:value-of select="//tc:InfNfse/tc:PrestadorServico/tc:Endereco/tc:Cidade"/>
								<br/>
								<b>UF:  </b>
								<xsl:value-of select="//tc:InfNfse/tc:PrestadorServico/tc:Endereco/tc:Estado"/>
							</td>
						</tr>
						<xsl:if test="//tc:InfNfse/tc:TomadorServico">
							<tr>
								<td class="tg-7btt" colspan="6">
									<span style="font-style:normal">TOMADOR DOS SERVIÇOS</span>
								</td>
							</tr>
							<tr>
								<td class="tg-0pky" colspan="6">
									<xsl:choose>
										<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
											<b>CNPJ:  </b>
											<xsl:value-of select="concat(substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
											<br/>
											<b>Inscrição Municipal:  </b>
											<xsl:value-of select="//tc:IdentificacaoTomador/tc:InscricaoMunicipal"/>
											<br/>
											<b>Razão Social:  </b>
										</xsl:when>
										<xsl:otherwise>
											<b>CPF:  </b>
											<xsl:value-of select="concat(substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf, 1, 3), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf, 4, 3), '.', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf, 7, 3), '-', substring(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf, 10, 2))"/>
											<br/>
											<b>Nome:  </b>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:value-of select="//tc:TomadorServico/tc:RazaoSocial"/>
									<br/>
									<b>Endereço:  </b>
									<xsl:value-of select="//tc:InfNfse/tc:TomadorServico/tc:Endereco/tc:Endereco"/>
									<br/>
									<b>Município:  </b>
									<xsl:value-of select="//tc:InfNfse/tc:TomadorServico/tc:Endereco/tc:Cidade"/>
									<br/>
									<b>UF:  </b>
									<xsl:value-of select="//tc:InfNfse/tc:TomadorServico/tc:Endereco/tc:Estado"/>
								</td>
							</tr>
						</xsl:if>
						<xsl:if test="//tc:InfNfse/tc:IntermediarioServico">
							<tr>
								<td class="tg-7btt" colspan="6">
									<span style="font-style:normal">INTERMEDIÁRIO</span>
								</td>
							</tr>
							<tr>
								<td class="tg-0pky" colspan="6">
									<xsl:choose>
										<xsl:when test="//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj">
											<b>CNPJ:  </b>
											<xsl:value-of select="concat(substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 1, 2), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 3, 3), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 6, 3), '/', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 9, 4), '-', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cnpj, 13, 2))"/>
											<br/>
											<b>Inscrição Municipal:  </b>
											<xsl:value-of select="//tc:IntermediarioServico/tc:InscricaoMunicipal"/>
											<br/>
											<b>Razão Social:  </b>
										</xsl:when>
										<xsl:otherwise>
											<b>CPF:  </b>
											<xsl:value-of select="concat(substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf, 1, 3), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf, 4, 3), '.', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf, 7, 3), '-', substring(//tc:IntermediarioServico/tc:CpfCnpj/tc:Cpf, 10, 2))"/>
											<br/>
											<b>Nome:  </b>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:value-of select="//tc:IntermediarioServico/tc:RazaoSocial"/>
								</td>
							</tr>
						</xsl:if>
						<tr>
							<td class="tg-7btt" colspan="6">DISCRIMINAÇÃO</td>
						</tr>
						<tr>
							<td class="tg-0pky" colspan="6">
								<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Discriminacao"/>
							</td>
						</tr>
						<tr>
							<td class="tg-c3ow" colspan="6">VALOR TOTAL DA NOTA: R$
								<xsl:value-of select="format-number(//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorServicos, '# ###0,00', 'Cz2')"/>
							</td>
						</tr>
						<tr>
							<td class="tg-0pky" colspan="6">
								<b>Codigo serviço:  </b>
								<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:ItemListaServico"/>
							</td>
						</tr>
						<tr>
							<td class="tg-l6li">
								<b>Valor Total das Deduções(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorDeducoes > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorDeducoes"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Base de cálculo(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:BaseCalculo > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:BaseCalculo"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Descontos(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:DescontoIncondicionado > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:DescontoIncondicionado"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Alíquota</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:Aliquota > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:Aliquota"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do ISS(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIss > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIss"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do Crédito(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:ValorCredito > 0">
										<xsl:value-of select="//tc:InfNfse/tc:ValorCredito"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
						</tr>
						<tr>
							<td class="tg-l6li">
								<b>Valor do PIS(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorPis > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorPis"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-p1nr">
								<b>Valor do COFINS(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorCofins > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorCofins"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do INSS(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorInss > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorInss"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do IR(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIr > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIr"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do CSLL(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorCsll > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorCsll"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
							<td class="tg-l6li">
								<b>Valor do ISS(R$)</b>
								<br/>
								<xsl:choose>
									<xsl:when test="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIss > 0">
										<xsl:value-of select="//tc:InfNfse/tc:Servico/tc:Valores/tc:ValorIss"/>
									</xsl:when>
									<xsl:otherwise>0.00</xsl:otherwise>
								</xsl:choose>
							</td>
						</tr>
						<tr>
							<td class="tg-7btt" colspan="6">OUTRAS INFORMAÇÕES</td>
						</tr>
						<tr>
							<td class="tg-0pky" colspan="6">
								<xsl:value-of select="//tc:InfNfse/tc:OutrasInformacoes"/>
							</td>
						</tr>
					</tbody>
				</table>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
EXPORTAÇÃO
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd">
	<xsl:output omit-xml-declaration="yes"/>
	<xsl:template match="/">
		<procTransmiteNFSe tpMsg="retNFSe" versao="1.00">
			<Transmite>
				<TransmiteRPS tpMsg="retNFSe" versao="1.00">
					<RPS>
						<nRPS>
							<xsl:value-of select="//tc:IdentificacaoRps/tc:Numero"/>
						</nRPS>
						<nSerieRPS>
							<xsl:value-of select="//tc:Serie"/>
						</nSerieRPS>
						<seriePrestacao/>
						<tpRPS>
							<xsl:value-of select="//tc:Tipo"/>
						</tpRPS>
						<dtEmis>
							<xsl:value-of select="substring(//tc:DataEmissao | //tc:DataEmissaoRps , 0, 20)"/>
						</dtEmis>
						<natOp>
							<xsl:value-of select="//tc:NaturezaOperacao"/>
						</natOp>
						<regEspTribut>
							<xsl:value-of select="//tc:RegimeEspecialTributacao"/>
						</regEspTribut>
						<simplesNac>
							<xsl:value-of select="//tc:OptanteSimplesNacional"/>
						</simplesNac>
						<incentCult>
							<xsl:value-of select="//tc:IncentivadorCultural"/>
						</incentCult>
						<statusRPS>
							<xsl:value-of select="//tc:Status"/>
						</statusRPS>
						<idERP>
							<xsl:value-of select="//tc:Numero"/>
						</idERP>
						<dtCompetencia>
							<xsl:value-of select="substring(//tc:Competencia , 0, 20)"/>
						</dtCompetencia>
						<incentFiscal/>
						<item>
							<vlItem>
								<xsl:value-of select="//tc:ValorServicos"/>
							</vlItem>
							<qtde>
								<xsl:text>1</xsl:text>
							</qtde>
							<vlUnit>
								<xsl:value-of select="//tc:ValorServicos"/>
							</vlUnit>
							<disServ>
								<xsl:value-of select="//tc:Discriminacao"/>
							</disServ>
							<CodigoItemListaServico>
								<xsl:value-of select="//tc:ItemListaServico"/>
							</CodigoItemListaServico>
							<cTribut>
								<xsl:value-of select="//tc:CodigoTributacaoMunicipio"/>
							</cTribut>
							<vlISSRet/>
							<cMunPrest>
								<xsl:value-of select="//tc:Servico/tc:CodigoMunicipio"/>
							</cMunPrest>
							<alItemListaServico>
								<xsl:value-of select="//tc:Servico/tc:Valores/tc:Aliquota"/>
							</alItemListaServico>
							<unItemListaServico/>
							<cItemListaServico/>
							<vlBaseCalculo>
								<xsl:value-of select="//tc:BaseCalculo"/>
							</vlBaseCalculo>
							<vlISS>
								<xsl:value-of select="//tc:ValorIss"/>
							</vlISS>
							<cTributMun>
								<xsl:value-of select="//tc:CodigoTributacaoMunicipio"/>
							</cTributMun>
						</item>
						<prestador>
							<xsl:choose>
								<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
									<cnpjPrest>
										<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj,'.|/|-','')"/>
									</cnpjPrest>
								</xsl:when>
								<xsl:otherwise>
									<cnpjPrest>
										<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,'.|/|-','')"/>
									</cnpjPrest>
								</xsl:otherwise>
							</xsl:choose>
							<inMunPrest>
								<xsl:value-of select="//tc:IdentificacaoPrestador/tc:InscricaoMunicipal"/>
							</inMunPrest>
							<rSocialPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:RazaoSocial"/>
							</rSocialPrest>
							<nFantasiaPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:NomeFantasia"/>
							</nFantasiaPrest>
							<endPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Endereco"/>
							</endPrest>
							<nPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Numero"/>
							</nPrest>
							<cPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Complemento"/>
							</cPrest>
							<bPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Bairro"/>
							</bPrest>
							<cMunPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Cidade"/>
							</cMunPrest>
							<ufPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Estado"/>
							</ufPrest>
							<cepPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Endereco/tc:Cep"/>
							</cepPrest>
							<dddPrest/>
							<telPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Contato/tc:Telefone"/>
							</telPrest>
							<emailPrest>
								<xsl:value-of select="//tc:PrestadorServico/tc:Contato/tc:Email"/>
							</emailPrest>
							<cAEDF/>
							<cIE/>
							<tpLogrPrest>
								<xsl:value-of select="//tc:EnderecoPrestadorServico/tc:TipoLogradouro | //tc:EnderecoPrestador/tc:TipoLogradouro"/>
							</tpLogrPrest>
						</prestador>
						<tomador>
							<xsl:choose>
								<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj">
									<cnpjTom>
										<xsl:value-of select="translate(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cnpj,'.|/|-','')"/>
									</cnpjTom>
								</xsl:when>
								<xsl:when test="//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf">
									<cnpjTom>
										<xsl:value-of select="translate(//tc:IdentificacaoTomador/tc:CpfCnpj/tc:Cpf,'.|/|-','')"/>
									</cnpjTom>
								</xsl:when>
							</xsl:choose>
							<rSocialTom>
								<xsl:value-of select="//tc:TomadorServico/tc:RazaoSocial"/>
							</rSocialTom>
							<tpLogrTom>
								<xsl:value-of select="//tc:Tomador/tc:Endereco/tc:TipoLogradouro | //tc:TomadorServico/tc:Endereco/tc:TipoLogradouro"/>
							</tpLogrTom>
							<endTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:Endereco"/>
							</endTom>
							<nTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:Numero"/>
							</nTom>
							<cTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:Complemento"/>
							</cTom>
							<bTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:Bairro"/>
							</bTom>
							<tpBTom/>
							<cMunTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:CodigoMunicipio"/>
							</cMunTom>
							<dMunTom/>
							<ufTom>
								<xsl:value-of select="//tc:TomadorServico/tc:Endereco/tc:Estado"/>
							</ufTom>
							<cepTom>
								<xsl:value-of select="//Tomador/Endereco/Cep | //tc:TomadorServico/tc:Endereco/tc:Cep"/>
							</cepTom>
							<emailTom>
								<xsl:value-of select="//Tomador/Contato/Email | //tc:TomadorServico/tc:Contato/tc:Email"/>
							</emailTom>
							<cSituacaoEspTom/>
							<cTomEstrangeiro/>
							<cPais>
								<xsl:value-of select="//tc:Tomador/tc:Endereco/tc:CodigoPais | //tc:TomadorServico/tc:Endereco/tc:CodigoPais"/>
							</cPais>
							<cSiglaPais/>
						</tomador>
						<servico>
							<vlServicos>
								<xsl:value-of select="//tc:ValorServicos"/>
							</vlServicos>
							<vlDeducoes>
								<xsl:value-of select="//tc:ValorDeducoes"/>
							</vlDeducoes>
							<vlPIS>
								<xsl:value-of select="//tc:ValorPis"/>
							</vlPIS>
							<vlCOFINS>
								<xsl:value-of select="//tc:ValorCofins"/>
							</vlCOFINS>
							<vlINSS>
								<xsl:value-of select="//tc:ValorInss"/>
							</vlINSS>
							<vlIR>
								<xsl:value-of select="//tc:ValorIr"/>
							</vlIR>
							<vICSLL>
								<xsl:value-of select="//tc:ValorCsll"/>
							</vICSLL>
							<xsl:choose>
								<xsl:when test="//tc:IssRetido = 'true'">
									<issRet>
										<xsl:text>1</xsl:text>
									</issRet>
								</xsl:when>
								<xsl:when test="//tc:IssRetido = 'false'">
									<issRet>
										<xsl:text>2</xsl:text>
									</issRet>
								</xsl:when>
								<xsl:otherwise>
									<issRet>
										<xsl:value-of select="//tc:IssRetido"/>
									</issRet>
								</xsl:otherwise>
							</xsl:choose>
							<vlISS>
								<xsl:value-of select="//tc:ValorIss"/>
							</vlISS>
							<vlISSRet>
								<xsl:value-of select="//tc:IssRetido"/>
							</vlISSRet>
							<outrasRet>
								<xsl:value-of select="//tc:OutrasRetencoes"/>
							</outrasRet>
							<baseCalculo>
								<xsl:value-of select="//tc:BaseCalculo"/>
							</baseCalculo>
							<vliquiNFSe>
								<xsl:value-of select="//tc:ValorLiquidoNfse"/>
							</vliquiNFSe>
							<descIncond>
								<xsl:value-of select="//tc:DescontoIncondicionado"/>
							</descIncond>
							<descCond>
								<xsl:value-of select="//tc:DescontoCondicionado"/>
							</descCond>
							<itemListaServ>
								<xsl:value-of select="//tc:CodigoServico"/>
							</itemListaServ>
							<cnae>
								<xsl:value-of select="//tc:CodigoCnae"/>
							</cnae>
							<cTributMun>
								<xsl:value-of select="//tc:CodigoTributacaoMunicipio"/>
							</cTributMun>
							<cMunServ>
								<xsl:value-of select="//tc:MunicipioPrestacaoServico"/>
							</cMunServ>
							<alISS>
								<xsl:value-of select="//tc:Aliquota"/>
							</alISS>
							<tribut>
								<xsl:value-of select="//tc:TributacaoNFe"/>
							</tribut>
							<alPIS/>
							<alCOFINS/>
							<alIR/>
							<alCSLL/>
							<alINSS/>
							<CodigoCfps>
								<xsl:value-of select="//tc:CodigoServico"/>
							</CodigoCfps>
							<dMunServ/>
							<cTipoLancamento/>
							<cPais/>
							<cExISS/>
							<cMunIncidencia/>
							<endPrest/>
							<nPrest/>
							<cPrest/>
							<bPrest/>
							<cMunPrest/>
							<cUF/>
							<cCep/>
						</servico>
						<descricao>
							<desRPS>
								<xsl:value-of select="//tc:Discriminacao"/>
							</desRPS>
						</descricao>
					</RPS>
				</TransmiteRPS>
				<retTransmiteNFSe>
					<nRPS>
						<xsl:value-of select="//tc:Numero"/>
					</nRPS>
					<nSerieRPS>
						<xsl:value-of select="//tc:Serie"/>
					</nSerieRPS>
					<xsl:choose>
						<xsl:when test="//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj">
							<cnpjPrest>
								<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cnpj,'.|/|-','')"/>
							</cnpjPrest>
						</xsl:when>
						<xsl:otherwise>
							<cpfPrest>
								<xsl:value-of select="translate(//tc:IdentificacaoPrestador/tc:CpfCnpj/tc:Cpf,'.|/|-','')"/>
							</cpfPrest>
						</xsl:otherwise>
					</xsl:choose>
					<nNFSe>
						<xsl:value-of select="//tc:IdentificacaoRps/tc:Numero"/>
					</nNFSe>
					<cVerificaNFSe>
						<xsl:value-of select="//tc:CodigoVerificacao"/>
					</cVerificaNFSe>
					<dtEmisNFSe>
						<xsl:if test="//tc:DataEmissao | //tc:DataEmissaoRps">
							<xsl:value-of select="substring(//tc:DataEmissao | //tc:DataEmissaoRps , 0, 20)"/>
						</xsl:if>
					</dtEmisNFSe>
					<xsl:choose>
						<xsl:when test="//tc:StatusNFe = 'N'">
							<cStat>
								<xsl:text>1</xsl:text>
							</cStat>
							<xMotivo>
								<xsl:text>Autorizado uso da NFS-e</xsl:text>
							</xMotivo>
						</xsl:when>
						<xsl:when test="//tc:StatusNFe = 'C'">
							<cStat>
								<xsl:text>2</xsl:text>
							</cStat>
							<xMotivo>
								<xsl:text>NFS-e Cancelada</xsl:text>
							</xMotivo>
						</xsl:when>
						<xsl:when test="//tc:StatusNFe = 'E'">
							<cStat>
								<xsl:text>3</xsl:text>
							</cStat>
							<xMotivo>
								<xsl:text>NFS-e Extraviada</xsl:text>
							</xMotivo>
						</xsl:when>
					</xsl:choose>
					<tpRPS>
						<xsl:value-of select="//tc:Tipo"/>
					</tpRPS>
				</retTransmiteNFSe>
			</Transmite>
			<prefeitura>
				<NFSe>
					<xsl:copy-of select="//CompNfse"/>
				</NFSe>
			</prefeitura>
		</procTransmiteNFSe>
	</xsl:template>
</xsl:stylesheet>
EMAIL
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY ocirc "ô">
<!ENTITY uacute "ú">
<!ENTITY atilde "ã">
<!ENTITY ccedil "ç">
<!ENTITY agrave "à">
<!ENTITY nbsp "­">
<!ENTITY eacute "é">]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tc="http://www.issnetonline.com.br/webserviceabrasf/vsd/tipos_complexos.xsd" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:dt="urn:schemas-microsoft-com:datatypes" version="1.0">
	<xsl:output method="html" encoding="utf-8" indent="yes" doctype-public="PUBLIC"/>
	<xsl:decimal-format name="brazil" decimal-separator="."/>
	<xsl:template match="xml">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
				<title>NFS-e</title>
			</head>
			<body>
				<table style="background-color: rgb(240, 240, 240); width: 500px; text-align: left; margin-left: auto; margin-right: auto;" id="total" border="0" cellpadding="12">
					<tbody>
						<tr>
							<td colspan="2">
								<p class="style1">Esta mensagem refere-se a Nota Fiscal de Serviço Eletrônica emitida por:</p>
							</td>
						</tr>
						<tr>
							<td style="white-space: nowrap;">
								<p class="style1">NFSE:
									<br/>
									RPS:
									<br/>
									Série:
									<br/>
								</p>
							</td>
							<td>
								<span class="style1">
									<xsl:value-of select="//tc:nfse"/>
									<br/>
									<xsl:value-of select="//tc:rps"/>
									<br/>
									<xsl:value-of select="//tc:serie"/>
									<br/>
								</span>
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<p class="style1">Este e-mail foi enviado automaticamente pelo Sistema de Nota Fiscal de Serviço Eletrônica.</p>
							</td>
						</tr>
						<tr>
							<td colspan="2" class="style4">
								<span class="style5">
									<em>
										<span style="text-decoration: underline;">powered by Totvs Services - Totvs S/A</span>
									</em>
</span>
							</td>
						</tr>
					</tbody>
				</table>
				<p class="style1"> </p>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

04. DEMAIS INFORMAÇÕES

  • Não Há.

05. ASSUNTOS RELACIONADOS

  • Não Há.