# Manual TaaS

# Introdução

Este documento tem por objetivo explicar a forma de funcionamento da solução Systax TaaS, bem como exemplifica a forma de de-para dos dados utilizados na integração SAP-S4/HANA e Motor de Cálculos Systax.

# Acesso

# Configurações, URL e Autenticação

Para utilizar o serviço de cálculo externo direto do SAP, siga este procedimento:

1. Crie um destino HTTP para Partner Service Framework.

Para criar o destino HTTP, você deve fornecer dados que obtém da SAP e da Systax. Veja abaixo quais são esses dados:

**Dados determinados pela SAP**

No campo *Name*, use o nome de destino do serviço de parceiro que você obtém ao enviar um HTTP GET. Esta solicitação deve ser para a URL: https://&lt;TaxConfigurationURL&gt;/AvailableConfiguration.svc/ Destinations(‘&lt;countryISO&gt;’)

**Dados determinados pela Systax**

<table cellspacing="0" class="MsoTableGrid" id="bkmrk-campo-dado-type-esco"><tbody><tr><td>**Campo**

</td><td>**Dado**

</td></tr><tr><td>*Type*

</td><td>Escolher ***HTTP***

</td></tr><tr><td>*URL*

</td><td>[http://wscockpit.systax.com.br/TaaSPD/api/tax/calculation](http://wscockpit.systax.com.br/TaaSPD/api/tax/calculation)

</td></tr><tr><td>*Proxy Type*

</td><td>Escolher ***Internet***

</td></tr><tr><td>*Authentication*

</td><td>Utilizar usuário e senha fornecidos pela Systax

</td></tr></tbody></table>

 2. Configure o Partner Service Framework.

# Parâmetros

# Chamada e Resposta

**Para acessar a coleção de chamadas**

De acordo com a transação realizada (exemplo: compra, venda, transferência, etc.) e os dados mestres do cadastro de fornecedor, planta recebedora ou vendedora, filiais e dados mestres de materiais será feita a conversão para que o Motor Systax entenda para qual produto e operação está sendo requisitado o cálculo.

Abaixo exemplo de requisição e retorno onde os dados definem uma operação de compra de um varejista, para revenda, de SP para SP, de um fornecedor industrial que produziu a mercadoria.

**Cenário Systax: SP-SP-120-1-140–569 Compra para revenda\_Indústria\_Varejo**

Na chamada exemplo abaixo:

- A operação de compra é identificada pelos campos “operationNatureCode” e “saleorPurchase” igual a “P”;
- Para determinar a UFs (SP-SP)– consideramos os campos “state” do Ship From e Ship To, do bloco “Locations”;
- Para determinar a operação e perfil do fornecedor/remetente (120-Venda de Produção do Estabelecimento e 1-Indústria) – consideramos os campos “materialOrigin” e “cnae” do Ship From.
- Para determinar o perfil do destinatário (140-Varejista) – consideramos o campo “cnae” do Ship To.

<table cellspacing="0" class="MsoTableGrid" id="bkmrk-chamada-retorno-%7B-%C2%A0%C2%A0" style="width: 100%;"><tbody><tr><td style="width: 47.6543%;">**Chamada**

</td><td style="width: 52.306%;">**Retorno**

</td></tr><tr><td style="width: 47.6543%;">{

 "id": "02E7B3F979971EED93E6ACEAC7A51EB9",

 "date": "2022-10-18T19:37:10.000Z",

 "companyId": "1410",

 "saleorPurchase": "P",

 "operationNatureCode": "P",

 "grossOrNet": "g",

 "currency": "BRL",

 "Items": \[

 {

 "id": "000010",

 "itemCode": "TBD",

 "itemType": "M",

 "quantity": "1.000",

 "unitPrice": "50.2000",

 "itemClassifications": \[

 {

 "itemStandardClassificationSystemCode": "cest",

 "itemStandardClassificationCode": ""

 },

 {

 "itemStandardClassificationSystemCode": "ncm",

 "itemStandardClassificationCode": "12060010"

 }

 \],

 "additionalItemInformation": \[

 {

 "type": "materialOrigin",

 "information": "0"

 },

 {

 "type": "usage",

 "information": "R"

 }

 \]

 }

 \],

 "Locations": \[

 {

 "type": "SHIP\_FROM",

 "addressLine1": "Rua Pamplona 145, 11 andar",

 "zipCode": "01405000",

 "city": "São Paulo",

 "state": "SP",

 "country": "BR"

 },

 {

 "type": "SHIP\_TO",

 "addressLine1": "Av. Ipanema 165",

 "zipCode": "03015000",

 "city": "São Paulo",

 "state": "SP",

 "country": "BR"

 }

 \],

 "Party": \[

 {

 "id": "1",

 "role": "SHIP\_FROM",

 "taxRegistration": \[

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "112240",

 "taxNumberTypeCode": "CNAE"

 },

{

 "locationType": "SHIP\_FROM",

 "taxNumber": "0000000000100",

 "taxNumberTypeCode": "CNPJ"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Y",

 "taxNumberTypeCode": "COFINSContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "3304557",

 "taxNumberTypeCode": "IBGECode"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Y",

 "taxNumberTypeCode": "ICMSContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Y",

 "taxNumberTypeCode": "ICMSSTContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Y",

 "taxNumberTypeCode": "IPIContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "N",

 "taxNumberTypeCode": "ISSContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Presumed Profit",

 "taxNumberTypeCode": "taxDeclarationType"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "Y",

 "taxNumberTypeCode": "PISContributor"

 },

 {

 "locationType": "SHIP\_FROM",

 "taxNumber": "",

 "taxNumberTypeCode": "taxRegimenCode"

 }

 \]

 },

 {

 "id": "2",

 "role": "SHIP\_TO",

 "taxRegistration": \[

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "4711302",

 "taxNumberTypeCode": "CNAE"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "74544297000192",

 "taxNumberTypeCode": "CNPJ"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Y",

 "taxNumberTypeCode": "COFINSContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "3304557",

 "taxNumberTypeCode": "IBGECode"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Y",

 "taxNumberTypeCode": "ICMSContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Y",

 "taxNumberTypeCode": "ICMSSTContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "956224310481",

 "taxNumberTypeCode": "IE"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "N",

 "taxNumberTypeCode": "IPIContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Y",

 "taxNumberTypeCode": "ISSContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "2062",

 "taxNumberTypeCode": "legalNature"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Y",

 "taxNumberTypeCode": "PISContributor"

 },

 {

 "locationType": "SHIP\_TO",

 "taxNumber": "Real Profit",

 "taxNumberTypeCode": "taxDeclarationType"

 }

 \]

 }

 \]

}

</td><td style="width: 52.306%;">{

 "total": "50.200000000000",

 "subTotal": "50.200000000000",

 "totalTax": "50.200000000000",

 "taxLines": \[

 {

 "id": "000010",

 "totalTax": "15.511800000000",

 "taxcode": "1102",

 "taxValues": \[

 {

 "rate": "0.0000",

 "taxable": "0.000000000000",

 "name": "Imposto sobre Produtos   
Industrializados",

 "value": "0.000000000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "50.200000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "IPI",

 "taxAttributes": \[

 {

 "attributeType": "CENQ",

 "attributeValue": "999"

 },

 {

 "attributeType": "CST",

 "attributeValue": "03"

 },

 {

 "attributeType": "legalProvision1",

 "attributeValue": "Art. 226 do RIPI/2010"

 },

 {

 "attributeType": "legalPCode1",

 "attributeValue": "210059"

 }

 \]

 },

 {

 "rate": "18.0000",

 "taxable": "50.200000000000",

 "name": "Imposto sobre Comercialização  
de Mercadorias e Serviços",

 "value": "9.036000000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "0.000000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "ICMS",

 "taxAttributes": \[

 {

 "attributeType": "CST",

 "attributeValue": "00"

 },

 {

 "attributeType": "baseDetermination",

 "attributeValue": "3"

 }

 \]

 },

 {

 "rate": "1.6500",

 "taxable": "50.200000000000",

 "name": "Programa de Integração Social",

 "value": "0.828300000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "0.000000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "PIS",

 "taxAttributes": \[

 {

 "attributeType": "CST",

 "attributeValue": "50"

 }

 \]

 },

 {

 "rate": "0.6500",

 "taxable": "50.200000000000",

 "name": "PIS from supplier",

 "value": "0.326300000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "0.000000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "PIS-SUP",

 "taxAttributes": \[

 {

 "attributeType": "CST",

 "attributeValue": "01"

 }

 \]

 },

 {

 "rate": "7.6000",

 "taxable": "50.200000000000",

 "name": "Contribuição para o   
Financiamento da   
 Seguridade Social",

 "value": "3.815200000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "0.000000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "COFINS",

 "taxAttributes": \[

 {

 "attributeType": "CST",

 "attributeValue": "50"

 }

 \]

 },

 {

 "rate": "3.0000",

 "taxable": "50.200000000000",

 "name": "COFINS from supplier",

 "value": "1.506000000000",

 "exemptedBasePercent": "0.0000",

 "exemptedBaseAmount": "0.000000000000",

 "otherBaseAmount": "0.000000000000",

 "taxTypeCode": "COFINS-SUP",

 "taxAttributes": \[

 {

 "attributeType": "CST",

 "attributeValue": "01"

 }

 \]

 }

 \]

 }

 \],

 "date": "2023-05-19T18:02:59.26442-03:00",

 "genericInfo": "busca=NCMD|codProd=NCM\_12060010-0|orig=1|CFOP\_ENTRADA=1102|UFO=sp|UFD=sp|natOp=120|

perfilorig=1|perfildest=140|finalidade=569  
|versao=6.07|",

 "partnerName": "Systax versao=6.07"

}

</td></tr></tbody></table>

# Blocos retornados no response

# Blocos retornados no response

<span lang="PT-BR" style="mso-ansi-language: PT-BR;">Após a chamada, caso todos os parâmetros estejam corretos, o TaaS retorna os cálculos organizados em blocos de tributos conforme as definições e estrutura da SAP.</span>

<span lang="PT-BR" style="mso-ansi-language: PT-BR;">Abaixo estão os blocos retornados e suas descrições.</span>

- **ICMS:** Imposto sobre Circulação de Mercadoria e Serviços
- **ICMS-ST:** ICMS com Substituição Tributária
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-FCP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Fundo de Combate à Pobreza sobre o ICMS </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-ST-FCP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Fundo de Combate à Pobreza para ICMS com Substituição Tributária </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-DP: </span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;">EC 87/15 – Partilha de ICMS devido ao estado de destino </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-D-FCP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> EC 87/15 - Partilha de ICMS relativo ao Fundo de Combate à Pobreza (FCP) do estado de destino </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-DIFAL:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> ICMS com Diferencial de Alíquota </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-DIFAL-FCP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Fundo de Combate à Pobreza para ICMS com Diferencial de Alíquota </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ICMS-</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;">FTZ: ICMS desonerado Zona Franca de Manaus </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">IPI:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto sobre Produtos Industrializados </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">PIS:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Programa de Integração Social </span>
- **PIS-WHT:** PIS a ser retido no momento do pagamento
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">PIS-SUP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> PIS calculado pelo fornecedor num processo de compra </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">COFINS:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Contribuição para Financiamento da Seguridade Social</span>
- **COFINS-WHT:** COFINS a ser retido no momento do pagamento
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">COFINS-SUP:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> COFINS calculado pelo fornecedor num processo de compra </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ISS-PROV:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto Sobre Serviço devido ao município do provedor - Recolhido pelo Provedor </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ISS-PROV-WHT:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto Sobre Serviço devido ao município do provedor - retido pelo tomador </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ISS-EXEC:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto Sobre Serviço devido ao município da prestação do serviço - recolhido pelo provedor </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">ISS-EXEC-WHT:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto Sobre Serviço devido ao município da prestação do serviço - retido pelo tomador </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">CSLL-WHT:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Contribuição Social sobre o Lucro Líquido a ser retido no momento do pagamento </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">IR-WHT:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto de Renda a ser retido no momento do pagamento </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">IR-WHT-INVOICE:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Imposto de Renda a ser retido no momento da fatura </span>
- **<span lang="PT-BR" style="mso-ansi-language: PT-BR;">INSS-WHT:</span>**<span lang="PT-BR" style="mso-ansi-language: PT-BR;"> Instituto Nacional do Seguro Social a ser retido no momento da fatura </span>
- **INSS-CPRB:** Contribuição previdenciária sobre a receita bruta a recolher
- <span style="font-size: 10.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;"><span style="font: 7.0pt 'Times New Roman';"> </span></span></span>**CONSOLIDATED-PCC-WHT:** PIS, COFINS e CSLL a serem retidos no momento do pagamento

<span lang="PT-BR" style="mso-ansi-language: PT-BR;">Cada bloco de tributo é retornado conforme a definição e os parâmetros de origem e destino dos campos do Tax Engine, considerando condições como o tipo de operação realizada e a regra de cálculo correspondente. O TaaS transmite vários parâmetros, incluindo a natureza da operação — por exemplo, venda, devolução, importação ou prestação de serviços — e, de acordo com a regra aplicada, identifica quais tributos devem ser calculados ou ajustados.</span>

<span lang="PT-BR" style="mso-ansi-language: PT-BR;">Quando uma operação ocorre, o TaaS envia o tipo de transação para que o motor aplique as regras fiscais a cada tributo. Em vendas de mercadorias, o ICMS segue as alíquotas estaduais e o PIS/COFINS depende do regime da empresa. Nas devoluções, os tributos são ajustados para estorno ou compensação segundo a legislação.</span>

<span lang="PT-BR" style="mso-ansi-language: PT-BR;">Cada bloco tributário é ajustado para a operação, garantindo cálculos adequados à transação, conformidade fiscal e redução de erros.</span>

# Detalhamento dos campos

# Response

<table border="0" cellpadding="0" cellspacing="0" id="bkmrk-taas-campos%C2%A0-descri%C3%A7" style="border-collapse: collapse; width: 795px; height: 1136.35px;" width="598"><colgroup><col style="width: 375px;" width="257"></col> <col style="width: 419px;" width="341"></col> </colgroup><tbody><tr style="height: 29.4583px;"><td class="xl69" height="19" style="height: 29.4583px; width: 193pt;" width="257">TaaS Campos<span style="mso-spacerun: yes;"> </span></td><td class="xl70" style="border-left: none; width: 256pt; height: 29.4583px;" width="341">Descrição</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">total</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Totalização do valor da NF</td></tr><tr style="height: 47.3229px;"><td class="xl63" height="135" style="height: 47.3229px; border-top: none;">subTotal</td><td class="xl66" style="border-top: none; border-left: none; width: 256pt; height: 47.3229px;" width="341">Cabeçalho do response  
valor unitário x quantidade</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">totalTax</td><td class="xl67" style="border-top: none; border-left: none; height: 29.4583px;">Somatório do valor unitário de todos os itens da chamada</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">id<span style="mso-spacerun: yes;"> </span></td><td class="xl67" style="border-top: none; border-left: none; height: 29.4583px;">ID do produto<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">totalTax</td><td class="xl67" style="border-top: none; border-left: none; height: 29.4583px;">Somatório de todos os tributos calculados</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">taxcode</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">CFOP da operação</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">rate</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">alíquota do ICMS</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">taxable</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Valor atribuído à coluna "Base de Cálculo "</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">name</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Nomenclatura do bloco</td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">value</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Valor do tributo calculado<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">exemptedBaseAmount</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Base de cálculo atribuído à coluna "Isento"<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">otherBaseAmount</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Base de cálculo atribuído à coluna "Outras"<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">exemptedBasePercent</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Percentual de redução da base cáculo atribuída à coluna Isento<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 29.4583px;"><td class="xl63" height="19" style="height: 29.4583px; border-top: none;">taxTypeCode</td><td class="xl65" style="border-top: none; border-left: none; height: 29.4583px;">Nomenclatura do tributo<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 77.3229px;"><td class="xl64" height="77" style="height: 77.3229px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "CST"  
taxLines/taxValues/attributeValue "XX"</td><td class="xl65" style="border-top: none; border-left: none; height: 77.3229px;">CST<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 77.3229px;"><td class="xl64" height="77" style="height: 77.3229px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "cBenef"  
taxLines/taxValues/attributeValue "XX"</td><td class="xl65" style="border-top: none; border-left: none; height: 77.3229px;">Código Cbnef se houver</td></tr><tr style="height: 77.3229px;"><td class="xl64" height="77" style="height: 77.3229px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/taxAttributes/attributeType "CENQ"  
taxLines/taxValues/taxAttributes/attributeValue "999"</td><td class="xl65" style="border-top: none; border-left: none; height: 77.3229px;">Cenq do IPI</td></tr><tr style="height: 77.3229px;"><td class="xl64" height="77" style="height: 77.3229px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "legalProvision1"  
taxLines/taxValues/attributeValue "XXXXXXXXXX"</td><td class="xl67" style="border-top: none; border-left: none; height: 77.3229px;">Dispositivo legal<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 77.3229px;"><td class="xl64" height="77" style="height: 77.3229px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "legalPCode1"  
taxLines/taxValues/attributeValue "XXXXXXXXXX"</td><td class="xl67" style="border-top: none; border-left: none; height: 77.3229px;">Código interno da legislação<span style="mso-spacerun: yes;"> </span></td></tr><tr style="height: 58px;"><td class="xl68" height="58" style="height: 58px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "vICMSDeson"  
taxLines/taxValues/attributeValue "X"</td><td class="xl65" style="border-top: none; border-left: none; height: 58px;">valor do ICMS desnoerado - ICMS</td></tr><tr style="height: 58px;"><td class="xl68" height="58" style="height: 58px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "motDesICMS"  
taxLines/taxValues/attributeValue "X"</td><td class="xl65" style="border-top: none; border-left: none; height: 58px;">Motivo desoneração - ICMS</td></tr><tr style="height: 58px;"><td class="xl68" height="58" style="height: 58px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "bcICMSDeson"  
taxLines/taxValues/attributeValue "X"</td><td class="xl65" style="border-top: none; border-left: none; height: 58px;">Base de Cálculo do ICMS Desonerado</td></tr><tr style="height: 58px;"><td class="xl64" height="58" style="height: 58px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "surchargeRate"  
taxLines/taxValues/attributeValue "XX.00"</td><td class="xl65" style="border-top: none; border-left: none; height: 58px;">Alíquota MVA aplicável à operação</td></tr><tr style="height: 58px;"><td class="xl64" height="58" style="height: 58px; border-top: none; width: 193pt;" width="257">taxLines/taxValues/attributeType "baseDetermination"  
taxLines/taxValues/attributeValue "X"</td><td class="xl65" style="border-top: none; border-left: none; height: 58px;">Informação do ModBc do calculo do ICMS / ST</td></tr></tbody></table>

# Gestão de devolução

# Gestão da devolução

<span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;">Para atender as necessidades dos clientes que realizam devolução via XML enviada no TaaS ou no motor de cálculo, criamos a tela de “Gestão de Devolução”.</span><span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;"> </span>

<span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;">Com o apoio das informações preenchidas nessa tela, permite que o cliente envie na chamada do TaaS ou do motor de cálculo, o arquivo XML da nota fiscal de venda ou compra e retona o cálculo da devolução considerando as informações do XML e realizando as trocas de CFOP e CST conforme definido na tabela de Gestão de Devolução.</span><span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;"> </span>

<span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;">O funcionamento dessa rotina consiste no seguinte fluxo:</span><span lang="PT-BR" style="font-size: 11.0pt; mso-bidi-font-size: 12.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-language: PT-BR;"> </span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: windowtext; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: windowtext; mso-fareast-language: PT-BR;">Na chamada do TaaS deve ser enviado na tag **“referenceIDXML”** ou na chamada do motor de cálculo deve ser enviado na tag “Cdata” o XML da nota fiscal original (de compra ou venda) convertido ou não em Base 64;</span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: windowtext; mso-fareast-language: PT-BR;">deverá ser enviado nas tags "itemCode" e "quantity", respectivamente, o código do item </span><span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">que será devolvido, além da quantidade (que poderá ser total ou parcial),</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Nas chamadas do TaaS também é enviado a tag **“referenceIDItem”**, essa marcação serve para indicar qual é o item da NF que está sendo devolvido. </span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">A chamada enviada pelo TaaS vai passar pela determinação e perfil e enviar a requisição para o motor de cálculo que utilizará as informações da nota fiscal para executar os cálculos e devolver o resultado;</span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">o motor receberá os campos de "cprod" e "qtrib" e considerará as informações do XML para devolução<span style="mso-tab-count: 1;"> </span>;</span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">mesmo que seja enviado um determinado valor na tag "unitPrice" o mesmo será desconsiderado no cálculo, pois será usado exclusivamente o valor unitário da NF</span>

<span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-size: 12.0pt; line-height: 107%; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Os campos de CFOP e CST serão retornados conforme a informação da tabela de “Gestão de Devolução” no cockpit;</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Para calcular os valores referente o Pis e Cofins:<span style="mso-tab-count: 2;"> </span></span>

<span lang="PT-BR" style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Quando tem o bloco de Pis e Cofins na NF:<span style="mso-tab-count: 1;"> </span></span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">- O motor utiliza o vBC/quantidade total \* quantidade devolvida</span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">- aplica as alíquotas de Pis e Cofins que também foram enviadas no documento</span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">- calcula os valores e devolve nas tags correspontes ("rate", "value" e "taxable")</span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Quando não tem o bloco de Pis e Cofins<span style="mso-spacerun: yes;"> </span>na NF:<span style="mso-tab-count: 1;"> </span></span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-spacerun: yes;"> </span>O motor de cálculo irá calcular a base de cálculo que basicamente deve ser (valor unitário x quantidade devolvida)</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">O TaaS deverá receber esse valor nas tags "otherBaseAmount" ou "exemptedBaseAmount", de acordo com o CST previsto nas definições do TaaS;</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">Ø<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Nas devoluções, o motor não considera o parâmetro "gross or net", <span style="mso-spacerun: yes;"> </span>portanto, não há diferenciação entre cálculo net ou gross.</span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"> </span>

<span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"> </span>

<span lang="PT-BR" style="font-size: 11.0pt; line-height: 107%; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Marcações no Cockpit – Configuração do Tax Engine:</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">ü<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">"**devolucaoParcialXML**" – Se estiver ativa, será retornado na chamada apenas o item que for indicado no campo itemCode ou cprod, ou seja os demais itens do XML ou base64, deverão ser desconsiderados;</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">ü<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">"**buscacProdXML**" – Se estiver ativa, deverá identificar no XML ou base64 enviado qual o cProd correspondente ao cProd enviado na chamada, devendo ignorar o ID enviado na chamada;</span>

<span lang="PT-BR" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">ü<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">"**FederalDevolucaoXML**" – Se estiver ativa, deverá buscar na tabela do Cockpit (Gestão de Devolução), um registro considerando:</span>

<span lang="PT-BR" style="font-family: 'Courier New'; mso-fareast-font-family: 'Courier New'; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">o<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">1. registro vigente e ativo na data do cálculo;</span>

<span lang="PT-BR" style="font-family: 'Courier New'; mso-fareast-font-family: 'Courier New'; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">o<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">2. Busca das linhas da tabela de acordo com as condições cadastradas;</span>

<span lang="PT-BR" style="font-family: 'Courier New'; mso-fareast-font-family: 'Courier New'; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;"><span style="mso-list: Ignore;">o<span style="font: 7.0pt 'Times New Roman';"> </span></span></span><span lang="PT-BR" style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">3. Se encontrar um registro, o retorno das tags "CFOP" e "CST" serão alterados, considerando as informações da tabela</span>

<span lang="PT-BR" style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; color: black; mso-themecolor: text1; mso-fareast-language: PT-BR;">Dessa forma o cliente tem autonomia para definir as informações de CFOP e CST na devolução.</span>