Table
FiscalDocument_BR
Fiscal document header
Header record for a fiscal document in Brazil. It holds the document number, series, status and direction (incoming or outgoing), plus the issuer, third party, delivery and carrier details and total amounts. Its key combines fiscal establishment, direction, status, series, number, voucher and third party CNPJ/CPF. It links to source records such as customer invoices and packing slips.
- Table name
FiscalDocument_BR- Module
Fiscal books brazil- Table group
Transaction- Table type
Regular- Data per company
Yes- Configuration key
None- Primary index
None- Replacement key
FiscalDocument_BR- Key fields
FiscalEstablishment, Direction, Status, FiscalDocumentSeries, FiscalDocumentNumber, Voucher, ThirdPartyCNPJCPF- Model
FiscalBooks
Fields (102)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
FiscalEstablishmentID of the fiscal establishment, pointing to the fiscal establishment record. | StringFiscalEstablishmentId_BR | No | FiscalEstablishment_BR.FiscalEstablishmentId | None |
DirectionShows whether the document is incoming or outgoing. | EnumFiscalDocDirection_BR (enum) | No | None | |
StatusStatus of the document, such as approved, cancelled, denied or rejected. | EnumFiscalDocumentStatus_BR (enum) | No | None | |
FiscalDocumentSeriesSeries of the fiscal document. | String (9)FiscalDocumentSeries_BR | No | None | |
FiscalDocumentNumberNumber of the fiscal document. | String (20)FiscalDocumentNumber_BR | No | None | |
VoucherVoucher number of the document. | String (20)Voucher | No | None | |
ThirdPartyCNPJCPFCNPJ or CPF tax number of the third party. | String (20)CNPJCPFNum_BR | No | None | |
AccessKeyAccess key that identifies the fiscal document. | String (45)EFDocAccessKey_BR | No | None | |
AccountingDateDate the document was posted. | DateTransDate | Yes | None | |
ApplicationVersionVersion of the application that produced the document. | String (20)EFDocApplicationVersion_BR | No | None | |
AuditedByUser who reviewed the document. | StringUserId | No | None | |
AuditedDateTimeDate and time of the review. | UtcDateTimeUTCTimestamp | No | None | |
CancelAccessKeyAccess key related to the cancellation. | String (45)EFDocAccessKey_BR | No | None | |
CancelAccountingDateAccounting date of the cancellation. | DateAccountingDate | No | None | |
CancelInventoryVoucherIdCosting voucher number created by the cancellation. | String (20)Voucher | No | None | |
CancelReasonCommentFree-text comment giving the reason for cancellation. | String (255)ReasonComment_BR | No | None | |
CancelTaxAuthorityInfoFree-text observations from the tax authority, sent by SAT hardware. | String (-1) | No | None | |
CancelVoucherIdVoucher number created by the cancellation. | String (20)Voucher | No | None | |
CFPSIdCFPS code, a four-character code on the document. | String (4)CFPSId_BR | No | None | |
CityWhereServicePerformedCity where the service was performed, pointing to a city record. | Int64LogisticsAddressCityRecId | No | LogisticsAddressCity.RecId | None |
ComplementaryTypeType of complementary document: none, price or tax. | EnumInvoiceComplementaryType_BR (enum) | No | None | |
ComplementedFiscalDocumentPoints to the fiscal document that this one complements. | Int64RefRecId | No | FiscalDocument_BR.RecId | None |
CorrectionLetterYes/no flag labelled as manual ICMS ST tax amount; the field name suggests a correction letter, so the meaning is unclear.low confidence | EnumNoYes (enum) | No | None | |
CreatedByThe user who created the record. System field. | String (20)CreatedBy | No | None | |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DebitCreditNoteTypeBusiness type of a debit or credit note, such as return, advance payment or fine and interest. | EnumFiscalDocumentBusinessType_BR (enum) | No | None | |
DeliveryCNPJCPFCNPJ or CPF tax number of the delivery party. | String (20)CNPJCPFNum_BR | No | None | |
DeliveryIEState registration number (IE) of the delivery party. | String (20)IENum_BR | No | None | |
DeliveryLogisticsPostalAddressDelivery postal address, pointing to an address record. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
DeliveryModeMode of delivery, pointing to a delivery mode record. | StringFiscalDocumentDlvModeId_BR | No | DlvMode.Code | None |
DeliveryTermTerms of delivery, pointing to a delivery terms record. | StringFiscalDocumentDlvTermId_BR | No | DlvTerm.Code | None |
FinalUserYes/no flag showing whether the party is the final user. | EnumCustVendFinalUser_BRNoYes (enum) | No | None | |
FiscalDocumentAccountNumCustomer or vendor account number the document relates to. | String (20)FiscalDocumentAccountNumber_BR | No | CustTable.AccountNumVendTable.AccountNum | None |
FiscalDocumentAccountTypeType of account: customer, vendor or fiscal establishment. | EnumCustVendType_BR (enum) | Yes | None | |
FiscalDocumentDateDate of the fiscal document. | DateFiscalDocumentDate_BR | No | None | |
FiscalDocumentDateTimeDate and time the invoice was posted. | UtcDateTimeFiscalDocumentDateTime_BR | No | None | |
FiscalDocumentDateTimeOffsetTime offset for the invoice date and time. | Int64FiscalDocumentDateTimeOffset_BR | No | None | |
FiscalDocumentFormatPoints to the fiscal document type setup record. | Int64RefRecId | No | FiscalDocumentFormat_BR.RecId | None |
FiscalDocumentIssuerWho issued the document: the fiscal establishment or a third party. | EnumFiscalDocumentIssuer_BR (enum) | No | None | |
FiscalEstablishmentCCMNumCCM municipal registration number of the fiscal establishment. | String (20)CCMNum_BR | No | None | |
FiscalEstablishmentCNPJCPFCNPJ or CPF tax number of the fiscal establishment. | String (20)CNPJCPFNum_BR | No | None | |
FiscalEstablishmentIEState registration number (IE) of the fiscal establishment. | String (20)IENum_BR | No | None | |
FiscalEstablishmentNameName of the fiscal establishment. | String (140)FiscalDocumentPartyName_BR | No | None | |
FiscalEstablishmentPhoneTelephone number of the fiscal establishment. | String (20)Phone | No | None | |
FiscalEstablishmentPostalAddressPostal address of the fiscal establishment, pointing to an address record. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
FiscalEstablishmentTribSubstitutionRegTributary substitution registry number of the fiscal establishment. | String (20)TributarySubstitutionRegistry_BR | No | None | |
FreightChargeTermsWho pays for freight: prepaid, collect, third party or no freight. | EnumFiscalDocumentFreightTerms_BR (enum) | No | None | |
ImportDeclarationPoints to the import declaration linked to the document. | Int64ImportDeclarationRecId_BR | No | PurchImportDeclaration_BR.RecId | None |
InventoryVoucherCosting voucher number of the document. | String (20)Voucher | No | None | |
IsServiceLocationForeign_BRYes/no flag showing whether the service location is foreign. | EnumServiceLocationForeign_BRNoYes (enum) | No | None | |
MissingNIFReasonType_BRReason why no foreigner ID (NIF) was given. | EnumMissingNIFReasonType_BR (enum) | No | None | |
ModelDocument model code, pointing to the document model record. | String (3)FiscalDocumentModel_BR | No | FiscalDocModel_BR.Model | None |
ModifiedByThe user who last changed the record. System field. | String (20)ModifiedBy | No | None | |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | None | |
NumericCodeNumeric code on the document; its exact meaning is not stated in the metadata.low confidence | IntegerInteger | No | None | |
OperationDescriptionShort text describing the operation. | String (150)FiscalDocumentOperationDescription_BR | No | None | |
PackingBrandBrand shown on the packing. | StringDlvTransportBrand_BR | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PaymentAmountPayment amount, in transaction currency. | RealAmountCur | No | None | |
PaymentMethodMethod of payment, such as money, cheque or credit card. | EnumEFDocPaymentMethod_BR (enum) | No | None | |
PresenceTypeHow the buyer was present for the sale, such as in person, internet or telesales. | EnumEFDocPresenceType_BR (enum) | No | None | |
PreviousVersionYes/no flag with no label; its purpose is not clear from the metadata.low confidence | EnumNoYesIdNoYes (enum) | No | None | |
PurposePurpose of the document, such as regular, tax complement, return or credit note. | EnumFiscalDocumentPurpose_BR (enum) | No | None | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
RefRecIdRecord ID of the source record, such as a customer invoice journal. | Int64RefRecId | No | None | |
RefTableIdTable ID of the source record that the document refers to. | IntegerRefTableId | No | None | |
SalesCarrierPoints to the carrier record. | Int64RefRecId | No | SalesCarrier.RecId | None |
SalesCarrierLogisticsPostalAddressPostal address of the carrier, pointing to an address record. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
ServiceLocationDomestic_BRDomestic service location, pointing to a city record. | Int64RefRecId | No | LogisticsAddressCity.RecId | None |
ServiceLocationNonDomestic_BRForeign service location, pointing to a country or region record. | StringLogisticsAddressCountryRegionId | No | LogisticsAddressCountryRegion.CountryRegionId | None |
SpecieSpecie (document kind) code: NFF, NF, CTRC or CF. | EnumFiscalDocumentSpecie_BR (enum) | No | None | |
SubstitutionAccessKeyAccess key of the document that is a substitution. | String (45)EFDocAccessKey_BR | No | None | |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
ThirdPartyCCMNumCCM municipal registration number of the third party. | String (20)CCMNum_BR | No | None | |
ThirdPartyEmailEmail address of the third party. | String (255)LogisticsElectronicAddressLocator | No | None | |
ThirdPartyFaxFax number of the third party. | String (20)TeleFax | No | None | |
ThirdPartyForeignerIdForeigner ID of the third party. | String (20)EFDocForeignerId_BR | No | None | |
ThirdPartyICMSContributorYes/no flag showing whether the third party is an ICMS contributor. | EnumICMSContributor_BRNoYes (enum) | No | None | |
ThirdPartyIEState registration number (IE) of the third party. | String (20)IENum_BR | No | None | |
ThirdPartyNameName of the third party. | String (140)FiscalDocumentPartyName_BR | No | None | |
ThirdPartyPhoneTelephone number of the third party. | String (20)Phone | No | None | |
ThirdPartyPostalAddressPostal address of the third party, pointing to an address record. | Int64LogisticsPostalAddressRecId | No | LogisticsPostalAddress.RecId | None |
ThirdPartySalesDigitalPlatformYes/no flag showing whether the sale was made through a third-party digital platform or marketplace. | EnumThirdPartySalesDigitalPlatform_BRNoYes (enum) | No | None | |
ThirdPartySalesDigitalPlatformCNPJCNPJ number of the digital platform or marketplace provider. | String (20)ThirdPartySalesDigitalPlatformCNPJ_BR | No | None | |
ThirdPartySalesDigitalPlatformSalesResponsibleName or ID of the person responsible for the sale on the digital platform. | String (160)ThirdPartySalesDigitalPlatformSalesResponsible_BR | No | None | |
TotalAmountTotal amount of the document, in accounting currency. | RealAmountMST | No | None | |
TotalDiscountAmountTotal discount on the document. | RealFiscalDocumentDiscAmount_BR | No | None | |
TotalGoodsAmountTotal amount for products. | RealInvoiceGoodsAmount_BR | No | None | |
TotalMarkupFreightAmountFreight charge total. | RealMarkupSumFreight_BR | No | None | |
TotalMarkupInsuranceAmountInsurance charge total. | RealMarkupSumInsurance_BR | No | None | |
TotalMarkupOtherAmountTotal of other charges. | RealMarkupSumOthers_BR | No | None | |
TotalServicesAmountTotal amount for services. | RealInvoiceServicesAmount_BR | No | None | |
TotalSuframaDiscountCOFINSAmountTotal SUFRAMA discount applied to COFINS. | RealFiscalDocumentDiscAmount_BR | No | None | |
TotalSuframaDiscountICMSAmountTotal SUFRAMA discount applied to ICMS. | RealFiscalDocumentDiscAmount_BR | No | None | |
TotalSuframaDiscountPISAmountTotal SUFRAMA discount applied to PIS. | RealFiscalDocumentDiscAmount_BR | No | None | |
TypeOfCTeType of CT-e (transport document), such as normal or add-on values. | EnumTypeOfCTe_BR (enum) | No | None | |
VehicleLicensePlateNumberLicence plate number of the carrier's vehicle. | StringDlvNoOfCarrier_BR | No | None | |
VehicleLicensePlateStateState where the vehicle is registered. | StringDlvStateRegistered_BR | No | None | |
VersionVersion of the document layout: unknown or version 1. | EnumFiscalDocumentVersion_BR (enum) | No | None |
Indexes (10)
DeliveryLogisticsPostalAddressIdDeliveryLogisticsPostalAddressNot unique.
FiscalDocumentFormat_BRIdxNot unique.
ComplementedFiscalDocument_BRIdxNot unique.
ReferenceNot unique.
FiscalDocument_BRReplacement keyFiscalEstablishment,Direction,Status,FiscalDocumentSeries,FiscalDocumentNumber,Voucher,ThirdPartyCNPJCPFUnique, alternate key.
AccessKeyIdxNot unique.
ModelIdxNot unique.
FiscalDocumentDateIdxNot unique.
FiscalDocumentIssuerSeriesIdxFiscalEstablishment,FiscalDocumentIssuer,FiscalDocumentSeries,FiscalDocumentDateNot unique.
PresumedIdxFiscalDocumentDate,FiscalDocumentDateTime,FiscalDocumentAccountNum,Direction,FiscalEstablishment,RefTableId,StatusNot unique.
Relations (26)
Each relation joins FiscalDocument_BR to another table on the fields shown.
CompanyInfo→CompanyInfoJoin on
dataAreaId = CompanyInfo.DataAreaMany FiscalDocument_BR records → exactly one CompanyInfo record
ComplementedFiscalDocument→FiscalDocument_BRJoin on
ComplementedFiscalDocument = FiscalDocument_BR.RecIdMany FiscalDocument_BR records → zero or one FiscalDocument_BR record
DeliveryLogisticsPostalAddress→LogisticsPostalAddressJoin on
DeliveryLogisticsPostalAddress = LogisticsPostalAddress.RecIdMany FiscalDocument_BR records → zero or one LogisticsPostalAddress record
FiscalDocModel_BR→FiscalDocModel_BRJoin on
Model = FiscalDocModel_BR.ModelMany FiscalDocument_BR records → zero or one FiscalDocModel_BR record
FiscalEstablishment→FiscalEstablishment_BRJoin on
FiscalEstablishment = FiscalEstablishment_BR.FiscalEstablishmentIdMany FiscalDocument_BR records → exactly one FiscalEstablishment_BR record
FiscalEstablishmentPostalAddress→LogisticsPostalAddressJoin on
FiscalEstablishmentPostalAddress = LogisticsPostalAddress.RecIdMany FiscalDocument_BR records → zero or one LogisticsPostalAddress record
LogisticsAddresssCity→LogisticsAddressCityJoin on
CityWhereServicePerformed = LogisticsAddressCity.RecIdExactly one FiscalDocument_BR record → exactly one LogisticsAddressCity record
SalesCarrierLogisticsPostalAddress→LogisticsPostalAddressJoin on
SalesCarrierLogisticsPostalAddress = LogisticsPostalAddress.RecIdMany FiscalDocument_BR records → zero or one LogisticsPostalAddress record
ThirdPartyPostalAddress→LogisticsPostalAddressJoin on
ThirdPartyPostalAddress = LogisticsPostalAddress.RecIdMany FiscalDocument_BR records → zero or one LogisticsPostalAddress record
FiscalDocumentAccountNumCustTable→CustTableJoin on
FiscalDocumentAccountNum = CustTable.AccountNum,FiscalDocumentAccountType = nullMany FiscalDocument_BR records → zero or one CustTable record
FiscalDocumentAccountNumVendTable→VendTableJoin on
FiscalDocumentAccountNum = VendTable.AccountNum,FiscalDocumentAccountType = 1Many FiscalDocument_BR records → zero or one VendTable record
PurchImportDeclaration_BR→PurchImportDeclaration_BRJoin on
ImportDeclaration = PurchImportDeclaration_BR.RecIdMany FiscalDocument_BR records → zero or one PurchImportDeclaration_BR record
RefCustInvoiceJour→CustInvoiceJourJoin on
RefTableId = CustInvoiceJour.TableId,RefRecId = CustInvoiceJour.RecIdZero or one FiscalDocument_BR record → zero or one CustInvoiceJour record
RefCustPackingSlipJour→CustPackingSlipJourJoin on
RefTableId = CustPackingSlipJour.TableId,RefRecId = CustPackingSlipJour.RecIdZero or one FiscalDocument_BR record → zero or one CustPackingSlipJour record
RefInventTransferJour→InventTransferJourJoin on
RefTableId = InventTransferJour.TableId,RefRecId = InventTransferJour.RecIdZero or one FiscalDocument_BR record → zero or one InventTransferJour record
RefProjInvoiceJour→ProjInvoiceJourJoin on
RefTableId = ProjInvoiceJour.TableId,RefRecId = ProjInvoiceJour.RecIdZero or one FiscalDocument_BR record → zero or one ProjInvoiceJour record
RefPurchComplementaryInvoice→PurchComplementaryInvoiceHeaderJoin on
RefTableId = PurchComplementaryInvoiceHeader.TableId,RefRecId = PurchComplementaryInvoiceHeader.RecIdZero or one FiscalDocument_BR record → zero or one PurchComplementaryInvoiceHeader record
RefSalesComplementaryInvoice→SalesComplementaryInvoiceHeaderJoin on
RefTableId = SalesComplementaryInvoiceHeader.TableId,RefRecId = SalesComplementaryInvoiceHeader.RecIdZero or one FiscalDocument_BR record → zero or one SalesComplementaryInvoiceHeader record
RefTaxFiscalDocument_BR→TaxFiscalDocument_BRJoin on
RefTableId = TaxFiscalDocument_BR.TableId,RefRecId = TaxFiscalDocument_BR.RecIdZero or one FiscalDocument_BR record → zero or one TaxFiscalDocument_BR record
RefVendInvoiceJour→VendInvoiceJourJoin on
RefTableId = VendInvoiceJour.TableId,RefRecId = VendInvoiceJour.RecIdZero or one FiscalDocument_BR record → zero or one VendInvoiceJour record
DeliveryMode→DlvModeJoin on
DeliveryMode = DlvMode.CodeMany FiscalDocument_BR records → zero or one DlvMode record
DeliveryTerms→DlvTermJoin on
DeliveryTerm = DlvTerm.CodeMany FiscalDocument_BR records → zero or one DlvTerm record
SalesCarrier→SalesCarrierJoin on
SalesCarrier = SalesCarrier.RecIdMany FiscalDocument_BR records → zero or one SalesCarrier record
FiscalDocumentFormat→FiscalDocumentFormat_BRJoin on
FiscalDocumentFormat = FiscalDocumentFormat_BR.RecIdMany FiscalDocument_BR records → zero or one FiscalDocumentFormat_BR record
ServiceLocation_LogisticsAddressCity→LogisticsAddressCityJoin on
ServiceLocationDomestic_BR = LogisticsAddressCity.RecIdMany FiscalDocument_BR records → exactly one LogisticsAddressCity record
ServiceLocation_LogisticsAddressCountryRegion→LogisticsAddressCountryRegionJoin on
ServiceLocationNonDomestic_BR = LogisticsAddressCountryRegion.CountryRegionIdMany FiscalDocument_BR records → exactly one LogisticsAddressCountryRegion record
Get this data out
No public entity reads from FiscalDocument_BR. Its data is only reachable through the application, a custom entity or a database export.
Need help with FiscalDocument_BR in a report, an integration or a migration? Talk to Dr Dynamics.