Table

PurchComplementaryInvoiceHeader

Purchase complementary invoice

Header record of a purchase complementary invoice, which has a Brazilian fiscal document type (price or tax). It holds the vendor invoice account, dates, payment terms, posting profile and status. It also holds fiscal data for Brazil, such as access key, series, model and the fiscal document it complements.

Table name
PurchComplementaryInvoiceHeader
Module
Accounts payable
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
None
Primary index
None
Replacement key
None
Key fields
None
Model
Foundation

Fields (45)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
AccessKey_BRAccess key of the fiscal document, used for Brazil.String (45)
EFDocAccessKey_BR
NoNone
AccountingDistributionTemplateThe accounting distribution template used for this invoice.Int64
AccountingDistributionTemplateRecId
NoAccountingDistributionTemplate.RecIdNone
CanceledInvoicePoints to the complementary invoice that this record cancels or refers to.Int64
RefRecId
NoPurchComplementaryInvoiceHeader.RecIdNone
CashDiscCash discount code applied to the invoice.String
VendCashDiscCode
NoCashDisc.CashDiscCodeNone
CashDiscAmountCash discount amount; the currency is not stated in the metadata.Real
VendCashDiscAmount
NoNone
CashDiscDateDate linked to the cash discount.Date
VendCashDiscDate
NoNone
CashDiscPercentCash discount as a percentage.Real
DiscPct
NoNone
ComplementaryTypeShows whether the complementary document corrects the price or the tax.Enum
InvoiceComplementaryType_BR (enum)
NoNone
ComplementedFiscalDocumentPoints to the fiscal document that this invoice complements.Int64
RefRecId
NoFiscalDocument_BR.RecIdNone
CostLedgerVoucherVoucher number of the costing posting.String (20)
Voucher
NoNone
CreatedByThe user who created the record. System field.String (20)
CreatedBy
NoNone
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
CurrencyCurrency code of the invoice.String (3)
VendCurrencyCode
YesCurrency.CurrencyCodeNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DefaultDimensionDefault financial dimension values for the invoice.Int64
LedgerDimensionValueSet
NoDimensionAttributeValueSet.RecIdNone
DeliveryPostalAddressPoints to the delivery address of the invoice.Int64
RefRecId
NoLogisticsPostalAddress.RecIdNone
DocumentDateDate of the invoice.Date
DocumentDate
NoNone
FiscalDocumentTypeType of fiscal document, used for Brazil.Int64
FiscalDocumentTypeRecID_BR
NoFiscalDocumentType_BR.RecIdNone
FiscalEstablishment_BRFiscal establishment linked to the invoice, used for Brazil.Int64
FiscalEstablishmentRecId_BR
NoFiscalEstablishment_BR.RecIdNone
FixedDueDateFixed due date for payment.Date
PurchFixedDueDate
NoNone
IssuerShows whether the fiscal establishment or a third party issued the fiscal document.Enum
FiscalDocumentIssuer_BR (enum)
NoNone
LedgerVoucherVoucher number of the ledger posting.String (20)
Voucher
NoNone
ModelFiscal document model code, used for Brazil.String (3)
FiscalDocumentModel_BR
NoFiscalDocModel_BR.ModelNone
NumberNumber of the invoice.String (20)
Num
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PaymentTerms of payment for the invoice.String (100)
VendPaymTermId
NoPaymTerm.PaymTermIdNone
PaymIdPayment ID of the invoice.String (200)
PaymId
NoNone
PaymSchedPayment schedule used for the invoice.String (30)
PaymSchedId
NoPaymSched.NameNone
PostingProfileVendor posting profile used for the invoice.String
VendPostingProfile
NoVendLedger.PostingProfileNone
ReasonTableRef_BRReason reference attached to the invoice, used for Brazil.Int64
ReasonTableRefRecId
NoReasonTableRef.RecIdNone
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
SeriesFiscal document series, used for Brazil.String (9)
FiscalDocumentSeries_BR
NoNone
SettleVoucherSettlement type: none, open transactions or designated transactions.Enum
PurchSettlementType
SettlementType (enum)
NoNone
SourceDocumentHeaderPoints to the source document header of this invoice.Int64
RefRecId
NoSourceDocumentHeader.RecIdNone
SpecieFiscal document species, such as NF or CTRC.Enum
FiscalDocumentSpecie_BR (enum)
NoNone
StatusStatus of the invoice: open, posted, canceled or cancel in progress.Enum
ComplementaryInvoiceStatus (enum)
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
ThirdPartyPostalAddressPostal address of the third party.Int64
LogisticsPostalAddressRecId
NoLogisticsPostalAddress.RecIdNone
TransDatePosting date of the invoice.Date
TransDate
NoNone
VendBankAccountVendor bank account used for the invoice.String
VendBankAccountId
NoVendBankAccount.AccountIDNone
VendFinalUserYes/No flag for use and consumption, used for Brazil.Enum
CustVendFinalUser_BR
NoYes (enum)
NoNone
VendPaymModeSpecPayment specification linked to the method of payment.String
PaymSpec
NoVendPaymModeSpec.SpecificationNone
VendPaymModeTableMethod of payment used for the vendor.String
VendPaymMode
NoVendPaymModeTable.PaymModeNone
VendTableThe vendor account that the invoice is for.String (20)
VendInvoiceAccount
YesVendTable.AccountNumNone

Indexes (16)

Relations (20)

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

  • AccountingDistributionTemplate → AccountingDistributionTemplate

    Join on AccountingDistributionTemplate = AccountingDistributionTemplate.RecId

    Many PurchComplementaryInvoiceHeader records → zero or one AccountingDistributionTemplate record

  • CanceledComplementaryInvoice → PurchComplementaryInvoiceHeader

    Join on CanceledInvoice = PurchComplementaryInvoiceHeader.RecId

    Zero or one PurchComplementaryInvoiceHeader record → zero or one PurchComplementaryInvoiceHeader record

  • CashDisc → CashDisc

    Join on CashDisc = CashDisc.CashDiscCode

    Many PurchComplementaryInvoiceHeader records → zero or one CashDisc record

  • Currency → Currency

    Join on Currency = Currency.CurrencyCode

    Many PurchComplementaryInvoiceHeader records → exactly one Currency record

  • DefaultDimension → DimensionAttributeValueSet

    Join on DefaultDimension = DimensionAttributeValueSet.RecId

    Many PurchComplementaryInvoiceHeader records → zero or one DimensionAttributeValueSet record

  • DeliveryPostalAddress → LogisticsPostalAddress

    Join on DeliveryPostalAddress = LogisticsPostalAddress.RecId

    Many PurchComplementaryInvoiceHeader records → zero or one LogisticsPostalAddress record

  • FiscalDocModel_BR → FiscalDocModel_BR

    Join on Model = FiscalDocModel_BR.Model

    Many PurchComplementaryInvoiceHeader records → zero or one FiscalDocModel_BR record

  • FiscalDocumentType → FiscalDocumentType_BR

    Join on FiscalDocumentType = FiscalDocumentType_BR.RecId

    Many PurchComplementaryInvoiceHeader records → zero or one FiscalDocumentType_BR record

  • FiscalEstablishment → FiscalEstablishment_BR

    Join on FiscalEstablishment_BR = FiscalEstablishment_BR.RecId

    Many PurchComplementaryInvoiceHeader records → exactly one FiscalEstablishment_BR record

  • OriginalFiscalDocument → FiscalDocument_BR

    Join on ComplementedFiscalDocument = FiscalDocument_BR.RecId

    One or more PurchComplementaryInvoiceHeader records → exactly one FiscalDocument_BR record

  • PaymSched → PaymSched

    Join on PaymSched = PaymSched.Name

    Many PurchComplementaryInvoiceHeader records → zero or one PaymSched record

  • PaymTerm → PaymTerm

    Join on Payment = PaymTerm.PaymTermId

    Many PurchComplementaryInvoiceHeader records → zero or one PaymTerm record

  • ReasonTableRef → ReasonTableRef

    Join on ReasonTableRef_BR = ReasonTableRef.RecId

    Many PurchComplementaryInvoiceHeader records → zero or one ReasonTableRef record

  • SourceDocumentHeader → SourceDocumentHeader

    Join on SourceDocumentHeader = SourceDocumentHeader.RecId

    Zero or one PurchComplementaryInvoiceHeader record → exactly one SourceDocumentHeader record

  • ThirdPartyPostalAddress → LogisticsPostalAddress

    Join on ThirdPartyPostalAddress = LogisticsPostalAddress.RecId

    Many PurchComplementaryInvoiceHeader records → exactly one LogisticsPostalAddress record

  • VendBankAccount → VendBankAccount

    Join on VendBankAccount = VendBankAccount.AccountID, VendTable = VendBankAccount.VendAccount

    Many PurchComplementaryInvoiceHeader records → zero or one VendBankAccount record

  • VendLedger → VendLedger

    Join on PostingProfile = VendLedger.PostingProfile

    Many PurchComplementaryInvoiceHeader records → zero or one VendLedger record

  • VendPaymModeSpec → VendPaymModeSpec

    Join on VendPaymModeTable = VendPaymModeSpec.PaymMode, VendPaymModeSpec = VendPaymModeSpec.Specification

    Many PurchComplementaryInvoiceHeader records → zero or one VendPaymModeSpec record

  • VendPaymModeTable → VendPaymModeTable

    Join on VendPaymModeTable = VendPaymModeTable.PaymMode

    Many PurchComplementaryInvoiceHeader records → zero or one VendPaymModeTable record

  • VendTable → VendTable

    Join on VendTable = VendTable.AccountNum

    Many PurchComplementaryInvoiceHeader records → exactly one VendTable record

Get this data out

No public entity reads from PurchComplementaryInvoiceHeader. Its data is only reachable through the application, a custom entity or a database export.

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

Email sales@drdynamics.co.uk