Table

FiscalEstablishment_BR

Fiscal establishment

Holds one fiscal establishment used for Brazil. Each record is identified by the fiscal establishment ID. It stores tax registration numbers, the setup for electronic fiscal documents (NF-e, NFC-e and NFS-e), and the technical responsible contact. It links to a fiscal organization, an optional group, an accountant, an address and e-mail templates.

Table name
FiscalEstablishment_BR
Module
Fiscal books brazil
Table group
Main
Table type
Regular
Data per company
Yes
Configuration key
None
Primary index
None
Replacement key
FiscalEstablishmentIdIdx
Key fields
FiscalEstablishmentId
Model
FiscalBooks

Fields (56)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
FiscalEstablishmentIdUnique ID of the fiscal establishment. It is the business key of the table.String
FiscalEstablishmentId_BR
YesFiscalEstablishmentEntityFiscalEstablishmentEntityFiscalOrganizationFiscalEstablishmentEntityand 13 more
Accountant_BRPoints to the accountant record linked to this establishment.Int64
AccountantRecId_BR
NoAccountant_BR.RecIdFiscalEstablishmentEntity
CCMNum_BRMunicipal taxpayer registration number (CCM) of the establishment.String (20)
CCMNum_BR
NoFiscalEstablishmentEntity
CNPJCPFNum_BRCNPJ number, the Brazilian company tax ID, of the establishment.String (20)
CNPJCPFNum_BR
NoFiscalEstablishmentEntity
ConsumerEFDocAuthorityCode of the authority that receives consumer electronic documents (NFC-e).String
EFDocAuthorityId_BR
NoEFDocAuthority_BR.AuthorityIdFiscalEstablishmentEntity
ConsumerEFDocCscCSC code, a security code used for NFC-e, stored as long text.String (-1)
ConsumerEFDocCsc
NoFiscalEstablishmentEntity
ConsumerEFDocCscTokenShort token that goes with the CSC code for NFC-e.String (6)
ConsumerEFDocCscToken
NoFiscalEstablishmentEntity
ConsumerEFDocEmailApprovedE-mail template ID used when an NFC-e is approved.String
SysEmailId
NoSysEmailTable.EmailIdFiscalEstablishmentEntity
ConsumerEFDocEnvironmentEnvironment for NFC-e: testing, production or blank.Enum
EFDocEnvironment_BR (enum)
NoFiscalEstablishmentEntity
ConsumerEFDocSendPdfInEmailYes or no choice for attaching the DANFE NFC-e as a PDF to the e-mail.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
ConsumerEFDocVersionVersion of the NFC-e feature in use: 2.0, 3.1 or 4.0.Enum
EFiscalDocVersion_BR (enum)
NoFiscalEstablishmentEntity
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoFiscalOrganizationFiscalEstablishmentEntity
DirPartyLocationPoints to the party location record that gives the establishment's address.Int64
DirPartyLocationRecId
YesDirPartyLocation.RecIdFiscalEstablishmentEntity
EFDocAuthorityCode of the NF-e authority that the establishment sends electronic documents to.String
EFDocAuthorityId_BR
NoEFDocAuthority_BR.AuthorityIdFiscalEstablishmentEntity
EFDocAutomaticPrintingYes or no choice for printing the DANFE automatically once an NF-e is approved.Enum
EFDocAutomaticPrinting_BR
boolean (enum)
NoFiscalEstablishmentEntity
EFDocBlockPostingNotValidatedXmlYes or no choice: only allow posting of NF-e documents that have a valid access key.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
EFDocDigitalCertificateSubjectSubject text of the digital certificate used to sign electronic fiscal documents.String (960)
DigitalCertificateSubject
NoFiscalEstablishmentEntity
EFDocEmailApprovedE-mail template ID used when an NF-e is approved.String
SysEmailId
NoSysEmailTable.EmailIdFiscalEstablishmentEntity
EFDocEmailCanceledE-mail template ID used when an NF-e is cancelled.String
SysEmailId
NoSysEmailTable.EmailIdFiscalEstablishmentEntity
EFDocEmailEventE-mail template ID used for the correction letter event.String
SysEmailId
NoSysEmailTable.EmailIdFiscalEstablishmentEntity
EFDocEnvironmentEnvironment for NF-e: testing, production or blank.Enum
EFDocEnvironment_BR (enum)
NoFiscalEstablishmentEntity
EFDocKeyVaultCertificateRefPoints to the certificate record stored in the key vault.Int64
KeyVaultCertificateRef
NoKeyVaultCertificateTable.RecIdNone
EFDocMatchNfeXmlOnPostingYes or no choice to stop NF-e posting when the XML does not match.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
EFDocNFe402018005v110Yes or no switch for turning on the latest NF-e technical note.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
EFDocNFeTechNotesSelected NF-e technical note, by year, number and version.Enum
EFDocNFeTechNotes_BR (enum)
NoFiscalEstablishmentEntity
EFDocPrePrintedSecurityFormYes or no choice showing whether a pre-printed security form is used.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
EFDocSendPdfInEmailYes or no choice for attaching the DANFE as a PDF to the e-mail.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
EFDocValidateSchemaOnPostingChoice to check the XML schema of the NF-e when the document is posted.Enum
EFDocValidateSchemaOnPosting_BR
boolean (enum)
NoFiscalEstablishmentEntity
EFDocVersionVersion of the NF-e feature in use: 2.0, 3.1 or 4.0.Enum
EFiscalDocVersion_BR (enum)
NoFiscalEstablishmentEntity
FciToIntrastateEnabledYes or no choice for applying FCI to operations inside the same state.Enum
NoYes (enum)
NoFiscalEstablishmentEntity
FiscalEstablishmentGroup_BRPoints to the fiscal establishment group this establishment is in.Int64
FiscalEstablishmentGroupRecId_BR
YesFiscalEstablishmentGroup_BR.RecIdFiscalEstablishmentEntity
FiscalEstablishmentSalesIssuerPoints to another fiscal establishment that issues sales documents for this one.Int64
RefRecId
NoFiscalEstablishment_BR.RecIdFiscalEstablishmentEntity
FiscalOrganization_BRPoints to the fiscal organization that this establishment belongs to.Int64
FiscalOrganizationRecId_BR
NoFiscalOrganization_BR.RecIdFiscalEstablishmentEntityFiscalOrganizationFiscalEstablishmentEntity
IENum_BRState registration number (IE) of the establishment.String (20)
IENum_BR
NoFiscalEstablishmentEntity
IsClosedWarehouseYes or no flag marking the establishment as a closed warehouse.Enum
NoYesId
NoYes (enum)
NoFiscalEstablishmentEntity
NameName of the fiscal establishment.String (60)
FiscalEstablishmentName_BR
NoFiscalEstablishmentEntityDimAttributeFiscalEstablishment_BREntity
NextFiscalPrinterDailyReportNumberNext number to use for the daily operation report of the fiscal printer (ECF).Integer
PositiveNumber
NoFiscalEstablishmentEntity
NFSeApproxTaxValueCity_BRApproximate city tax rate as a percentage, used for NFS-e.Real
ApproximateTaxValue_BR
NoNone
NFSeApproxTaxValueFederal_BRApproximate federal tax rate as a percentage, used for NFS-e.Real
ApproximateTaxValue_BR
NoNone
NFSeApproxTaxValueState_BRApproximate state tax rate as a percentage, used for NFS-e.Real
ApproximateTaxValue_BR
NoNone
NFSeEnvironment_BREnvironment for NFS-e, the service invoice: testing or production.Enum
NFSeEnvironment_BR (enum)
NoNone
NIRENIRE number, the company registration number at the trade board.String (11)
NIRE_BR
NoFiscalEstablishmentEntity
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
SPEDContribReportingTypeReporting type for NF-e and ECF in SPED contributions: detailed or consolidated.Enum
SPEDContribReportingType_BR (enum)
NoFiscalEstablishmentEntity
SPEDContribReportingTypeNFCeReporting type for NFC-e: detailed or consolidated.Enum
SPEDContribReportingType_BR (enum)
NoNone
SPEDContribReportingTypeNFeReporting type for NF-e and ECF fiscal receipts: detailed or consolidated.Enum
SPEDContribReportingType_BR (enum)
NoNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TechnicalResponsibleCNPJCNPJ of the company that acts as technical responsible.String (14)
TechResponsibleCNPJ_BR
NoEFDocTechResponsibleInformationEntity
TechnicalResponsibleContactNameName of the contact person at the technical responsible.String (60)
TechResponsibleContactName_BR
NoEFDocTechResponsibleInformationEntity
TechnicalResponsibleCSRTCSRT code of the technical responsible, stored as a container.Container
TechResponsibleCSRTContainer_BR
NoNone
TechnicalResponsibleEmailE-mail address of the technical responsible.String (60)
TechResponsibleEmail_BR
NoEFDocTechResponsibleInformationEntity
TechnicalResponsibleIdCSRTTwo-character CSRT identifier of the technical responsible.String (2)
TechResponsibleIdCSRT_BR
NoEFDocTechResponsibleInformationEntity
TechnicalResponsiblePhonePhone number of the technical responsible.String (14)
TechResponsiblePhone_BR
NoEFDocTechResponsibleInformationEntity

Indexes (4)

Relations (14)

Each relation joins FiscalEstablishment_BR to another table on the fields shown.

  • Accountant → Accountant_BR

    Join on Accountant_BR = Accountant_BR.RecId

    Zero or one FiscalEstablishment_BR record → zero or one Accountant_BR record

  • DirPartyLocation → DirPartyLocation

    Join on DirPartyLocation = DirPartyLocation.RecId

    Exactly one FiscalEstablishment_BR record → exactly one DirPartyLocation record

  • EFDocApprovedEmailTemplate → SysEmailTable

    Join on EFDocEmailApproved = SysEmailTable.EmailId

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

  • EFDocAuthority → EFDocAuthority_BR

    Join on EFDocAuthority = EFDocAuthority_BR.AuthorityId

    Many FiscalEstablishment_BR records → zero or one EFDocAuthority_BR record

  • EFDocCanceledEmailTemplate → SysEmailTable

    Join on EFDocEmailCanceled = SysEmailTable.EmailId

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

  • EFDocEventEmailTemplate → SysEmailTable

    Join on EFDocEmailEvent = SysEmailTable.EmailId

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

  • EFDocWebServices → EFDocWebServiceParameters_BR

    Join on EFDocEnvironment = EFDocWebServiceParameters_BR.Environment, EFDocAuthority = EFDocWebServiceParameters_BR.Authority

    Many FiscalEstablishment_BR records → zero or one EFDocWebServiceParameters_BR record

  • FiscalEstablishmentGroup → FiscalEstablishmentGroup_BR

    Join on FiscalEstablishmentGroup_BR = FiscalEstablishmentGroup_BR.RecId

    Exactly one FiscalEstablishment_BR record → exactly one FiscalEstablishmentGroup_BR record

  • FiscalEstablishmentSalesIssuer → FiscalEstablishment_BR

    Join on FiscalEstablishmentSalesIssuer = FiscalEstablishment_BR.RecId

    Exactly one FiscalEstablishment_BR record → exactly one FiscalEstablishment_BR record

  • FiscalOrganization → FiscalOrganization_BR

    Join on FiscalOrganization_BR = FiscalOrganization_BR.RecId

    Many FiscalEstablishment_BR records → zero or one FiscalOrganization_BR record

  • ConsumerEFDocApprovedEmailTemplate → SysEmailTable

    Join on ConsumerEFDocEmailApproved = SysEmailTable.EmailId

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

  • ConsumerEFDocAuthority → EFDocAuthority_BR

    Join on ConsumerEFDocAuthority = EFDocAuthority_BR.AuthorityId

    Many FiscalEstablishment_BR records → zero or one EFDocAuthority_BR record

  • ConsumerEFDocWebServices → EFDocWebServiceParameters_BR

    Join on ConsumerEFDocEnvironment = EFDocWebServiceParameters_BR.Environment, ConsumerEFDocAuthority = EFDocWebServiceParameters_BR.Authority

    Many FiscalEstablishment_BR records → zero or one EFDocWebServiceParameters_BR record

  • EFDocKeyVaultCertificateTable → KeyVaultCertificateTable

    Join on EFDocKeyVaultCertificateRef = KeyVaultCertificateTable.RecId

    Many FiscalEstablishment_BR records → zero or one KeyVaultCertificateTable record

Get this data out

Tables are not exposed directly. These public entities read from FiscalEstablishment_BR; use one of them in Power BI, Power Platform or a data management project.

Need help with FiscalEstablishment_BR in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk