-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from neicecilio/feature/agropecuario
feat:Adicionado grupo de informações de Produtos da Agricultura, Pecuária e Produção Florestal (NT 2024.003)
- Loading branch information
Showing
6 changed files
with
268 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- edited with XMLSpy v2008 (http://www.altova.com) by [email protected] (PROCERGS) --> | ||
<!-- edited with XMLSpy v2011 sp1 (http://www.altova.com) by End User (free.org) --> | ||
<!-- PL_009 alterações de esquema decorrentes da - NT2016.002 v1.20 - 31/05/2017 13:14hs--> | ||
<!-- PL_008g alterações de esquema decorrentes da - NT2015.002 - 15/07/2015 --> | ||
<!-- PL_008h alterações de esquema decorrentes da - NT2015.003 - 17/09/2015 --> | ||
|
@@ -17,6 +17,7 @@ | |
<!-- PL_009l_NT2023_002_v100 - Alteração de Schema para evitar caracteres inválidos --> | ||
<!-- PL_009m_NT2019_001_v155 - Inclusão de campos para Crédito Presumido e Redução da base de cálculo --> | ||
<!-- PL_009m_NT2023_004_v101 - Informações de Pagamentos e Outros --> | ||
<!-- PL_009p_NT2024_003_v101 - Produtos agropecuários --> | ||
<xs:schema xmlns="http://www.portalfiscal.inf.br/nfe" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:editix="http://www.portalfiscal.inf.br/nfe" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.portalfiscal.inf.br/nfe" elementFormDefault="qualified" attributeFormDefault="unqualified"> | ||
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema_v1.01.xsd"/> | ||
<xs:include schemaLocation="tiposBasico_v4.00.xsd"/> | ||
|
@@ -6285,6 +6286,88 @@ tipo de ato concessório: | |
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element name="agropecuario" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation>Produtos Agropecurários Animais, Vegetais e Florestais</xs:documentation> | ||
</xs:annotation> | ||
<xs:complexType> | ||
<xs:choice> | ||
<xs:element name="defensivo"> | ||
<xs:annotation> | ||
<xs:documentation>Defensivo Agrícola / Agrotóxico</xs:documentation> | ||
</xs:annotation> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="nReceituario"> | ||
<xs:annotation> | ||
<xs:documentation>Número do Receituário ou Receita do Defensivo / Agrotóxico</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="20"/> | ||
<xs:minLength value="1"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="CPFRespTec" type="TCpf"> | ||
<xs:annotation> | ||
<xs:documentation>CPF do Responsável Técnico pelo receituário</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
<xs:element name="guiaTransito"> | ||
<xs:annotation> | ||
<xs:documentation>Guias De Trânsito de produtos agropecurários animais, vegetais e de origem florestal.</xs:documentation> | ||
</xs:annotation> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="tpGuia"> | ||
<xs:annotation> | ||
<xs:documentation>Tipo da Guia: 1 - GTA; 2 - TTA; 3 - DTA; 4 - ATV; 5 - PTV; 6 - GTV; 7 - Guia Florestal (DOF, SisFlora - PA e MT, SIAM - MG)</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:whiteSpace value="preserve"/> | ||
<xs:enumeration value="1"/> | ||
<xs:enumeration value="2"/> | ||
<xs:enumeration value="3"/> | ||
<xs:enumeration value="4"/> | ||
<xs:enumeration value="5"/> | ||
<xs:enumeration value="6"/> | ||
<xs:enumeration value="7"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="UFGuia" type="TUfEmi" minOccurs="0"/> | ||
<xs:element name="serieGuia" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation>Série da Guia</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="TString"> | ||
<xs:minLength value="1"/> | ||
<xs:maxLength value="9"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="nGuia"> | ||
<xs:annotation> | ||
<xs:documentation>Número da Guia</xs:documentation> | ||
</xs:annotation> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[0-9]{1,9}"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:choice> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
<xs:attribute name="versao" type="TVerNFe" use="required"> | ||
<xs:annotation> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System.ComponentModel; | ||
using System.Xml.Serialization; | ||
|
||
namespace NFe.Classes.Informacoes.Agropecuario | ||
{ | ||
/// <summary> | ||
/// Tipo da Guia | ||
/// <para>1 - GTA - Guia de Trânsito Animal</para> | ||
/// <para>2 - TTA - Termo de Trânsito Animal</para> | ||
/// <para>3 - DTA - Documento de Transferência Animal</para> | ||
/// <para>4 - ATV - Autorização de Trânsito Vegetal</para> | ||
/// <para>5 - PTV - Permissão de Trânsito Vegetal</para> | ||
/// <para>6 - GTV - Guia de Trânsito Vegetal</para> | ||
/// <para>7 - Guia Florestal (DOF, SisFlora - PA e MT ou SIAM - MG)</para> | ||
/// </summary> | ||
public enum TipoGuia | ||
{ | ||
/// <summary> | ||
/// 1 - GTA - Guia de Trânsito Animal | ||
/// </summary> | ||
[Description("GTA - Guia de Trânsito Animal")] | ||
[XmlEnum("1")] | ||
GTA = 1, | ||
|
||
/// <summary> | ||
/// 2 - TTA - Termo de Trânsito Animal | ||
/// </summary> | ||
[Description("TTA - Termo de Trânsito Animal")] | ||
[XmlEnum("2")] | ||
TTA = 2, | ||
|
||
/// <summary> | ||
/// 3 - DTA - Documento de Transferência Animal | ||
/// </summary> | ||
[Description("DTA - Documento de Transferência Animal")] | ||
[XmlEnum("3")] | ||
DTA = 3, | ||
|
||
/// <summary> | ||
/// 4 - ATV - Autorização de Trânsito Vegetal | ||
/// </summary> | ||
[Description("ATV - Autorização de Trânsito Vegetal")] | ||
[XmlEnum("4")] | ||
ATV = 4, | ||
|
||
/// <summary> | ||
/// 5 - PTV - Permissão de Trânsito Vegetal | ||
/// </summary> | ||
[Description("PTV - Permissão de Trânsito Vegetal")] | ||
[XmlEnum("5")] | ||
PTV = 5, | ||
|
||
/// <summary> | ||
/// 6 - GTV - Guia de Trânsito Vegetal | ||
/// </summary> | ||
[Description("GTV - Guia de Trânsito Vegetal")] | ||
[XmlEnum("6")] | ||
GTV = 6, | ||
|
||
/// <summary> | ||
/// 7 - Guia Florestal (DOF, SisFlora - PA e MT ou SIAM - MG) | ||
/// </summary> | ||
[Description("Guia Florestal (DOF, SisFlora - PA e MT ou SIAM - MG)")] | ||
[XmlEnum("7")] | ||
GuiaFlorestal = 7, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
namespace NFe.Classes.Informacoes.Agropecuario | ||
{ | ||
public class agropecuario | ||
{ | ||
#if NET5_0_OR_GREATER//o uso de tipos de referência anuláveis não é permitido até o C# 8.0. | ||
|
||
/// <summary> | ||
/// ZF02 - serieGuia | ||
/// </summary> | ||
public defensivo? defensivo { get; set; } | ||
|
||
/// <summary> | ||
/// ZF04 - Guia de Trânsito | ||
/// </summary> | ||
public guiaTransito? guiaTransito { get; set; } | ||
|
||
public bool ShouldSerializedefensivo() | ||
{ | ||
return defensivo != null; | ||
} | ||
public bool ShouldSerializeguiaTransito() | ||
{ | ||
return guiaTransito != null; | ||
} | ||
#else | ||
/// <summary> | ||
/// ZF02 - serieGuia | ||
/// </summary> | ||
public defensivo defensivo { get; set; } | ||
|
||
/// <summary> | ||
/// ZF04 - Guia de Trânsito | ||
/// </summary> | ||
public guiaTransito guiaTransito { get; set; } | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace NFe.Classes.Informacoes.Agropecuario | ||
{ | ||
public class defensivo | ||
{ | ||
/// <summary> | ||
/// ZF03 - Número da receita ou receituário do agrotóxico / defensivo agrícola | ||
/// </summary> | ||
public string nReceituario { get; set; } | ||
|
||
/// <summary> | ||
/// ZP03a - CPF do Responsável Técnico, emitente do receituário | ||
/// </summary> | ||
public string CPFRespTec { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace NFe.Classes.Informacoes.Agropecuario | ||
{ | ||
public class guiaTransito | ||
{ | ||
#if NET5_0_OR_GREATER//o uso de tipos de referência anuláveis não é permitido até o C# 8.0. | ||
/// <summary> | ||
/// ZF05 - Tipo da Guia | ||
/// </summary> | ||
public TipoGuia tpGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF06 - UF de emissão | ||
/// </summary> | ||
public string? UFGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF07 - Série da Guia | ||
/// </summary> | ||
public string? serieGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF08 - Número da Guia | ||
/// </summary> | ||
public string nGuia { get; set; } | ||
|
||
public bool ShouldSerializeUFGuia() | ||
{ | ||
return UFGuia != null; | ||
} | ||
public bool ShouldSerializeserieGuia() | ||
{ | ||
return serieGuia != null; | ||
} | ||
#else | ||
/// <summary> | ||
/// ZF05 - Tipo da Guia | ||
/// </summary> | ||
public TipoGuia tpGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF06 - UF de emissão | ||
/// </summary> | ||
public string UFGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF07 - Série da Guia | ||
/// </summary> | ||
public string serieGuia { get; set; } | ||
|
||
/// <summary> | ||
/// ZF08 - Número da Guia | ||
/// </summary> | ||
public string nGuia { get; set; } | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters