Table

SalesComplementaryInvoiceHeader

Sales complementary invoice

Header record for a sales complementary invoice. Each row holds the customer, dates, payment terms, status and total amount. Fields for fiscal documents and fiscal establishments show it is used for Brazil. It can point to another complementary invoice and to the fiscal document it complements.

Table name
SalesComplementaryInvoiceHeader
Module
Accounts receivable
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 (36)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
AccountingDistributionTemplatePoints to the accounting distribution template used for this invoice.Int64
AccountingDistributionTemplateRecId
NoAccountingDistributionTemplate.RecIdNone
CanceledInvoicePoints to another sales complementary invoice record that this invoice refers to as cancelled.Int64
RefRecId
NoSalesComplementaryInvoiceHeader.RecIdNone
CashDiscCode of the cash discount that applies to the invoice.String
CustCashDiscCode
NoCashDisc.CashDiscCodeNone
CashDiscDateDate linked to the cash discount.Date
CustCashDiscDate
NoNone
CashDiscPercentPercentage rate of the discount.Real
DiscPct
NoNone
ComplementaryTypeKind of complementary document, used for Brazil: none, price or tax.Enum
InvoiceComplementaryType_BR (enum)
NoNone
ComplementedFiscalDocumentPoints to the fiscal document that this invoice complements, used for Brazil.Int64
RefRecId
NoFiscalDocument_BR.RecIdNone
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)
CustCurrencyCode
NoCurrency.CurrencyCodeNone
CustBankAccountIDCustomer bank account chosen for the invoice.String
CustBankAccountId
NoCustBankAccount.AccountIDNone
CustFinalUserYes/No flag showing whether the customer is the final user.Enum
CustVendFinalUser_BR
NoYes (enum)
NoNone
CustPaymModeSpecPayment specification for the chosen method of payment.String
PaymSpec
NoCustPaymModeSpec.SpecificationNone
CustPaymModeTableMethod of payment used by the customer on this invoice.String
CustPaymMode
NoCustPaymModeTable.PaymModeNone
CustTableCustomer account that the invoice is for.String (20)
CustAccount
NoCustTable.AccountNumNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DefaultDimensionPoints to the set of financial dimension values set as default for the invoice.Int64
LedgerDimensionValueSet
NoDimensionAttributeValueSet.RecIdNone
DocumentDateDate shown on the invoice.Date
DocumentDate
NoNone
DueDateDate by which the invoice is due for payment.Date
DueDate
NoNone
FinTagPoints to the financial tag attached to the invoice.Int64
FinTagRecId
NoFinTag.RecIdNone
FiscalDocumentNumberInvoice number of the complementary document.String (50)
InvoiceId
NoNone
FiscalDocumentType_BRPoints to the fiscal document type, used for Brazil.Int64
RefRecId
NoFiscalDocumentType_BR.RecIdNone
FiscalEstablishment_BRPoints to the fiscal establishment that issues the invoice, used for Brazil.Int64
FiscalEstablishmentRecId_BR
NoFiscalEstablishment_BR.RecIdNone
LedgerVoucherVoucher number linked to the invoice.String (20)
Voucher
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PaymSchedPayment schedule that applies to the invoice.String (30)
PaymSchedId
NoPaymSched.NameNone
PaymTermTerms of payment for the invoice.String (100)
CustPaymTermId
NoPaymTerm.PaymTermIdNone
PostingProfileCustomer posting profile linked to the invoice.String
CustPostingProfile
NoCustLedger.PostingProfileNone
ReasonTableRef_BRPoints to a reason reference record, 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
SourceDocumentHeaderPoints to the source document header linked to this invoice.Int64
RefRecId
NoSourceDocumentHeader.RecIdNone
StatusCurrent state of the invoice: open, posted, cancelled or cancel in progress.Enum
ComplementaryInvoiceStatus (enum)
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
ThirdPartyLogisticsPostalAddressPoints to a postal address, labelled as a third-party logistics address.Int64
LogisticsPostalAddressRecId
NoLogisticsPostalAddress.RecIdNone
TotalAmountTotal value of the invoice, in accounting currency.Real
AmountMST
NoNone

Indexes (15)

Relations (19)

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

  • AccountingDistributionTemplate → AccountingDistributionTemplate

    Join on AccountingDistributionTemplate = AccountingDistributionTemplate.RecId

    Many SalesComplementaryInvoiceHeader records → zero or one AccountingDistributionTemplate record

  • CanceledSalesComplementaryInvoice → SalesComplementaryInvoiceHeader

    Join on CanceledInvoice = SalesComplementaryInvoiceHeader.RecId

    Zero or one SalesComplementaryInvoiceHeader record → zero or one SalesComplementaryInvoiceHeader record

  • CashDisc → CashDisc

    Join on CashDisc = CashDisc.CashDiscCode

    Zero or one SalesComplementaryInvoiceHeader record → zero or one CashDisc record

  • ComplementedFiscalDocument → FiscalDocument_BR

    Join on ComplementedFiscalDocument = FiscalDocument_BR.RecId

    Many SalesComplementaryInvoiceHeader records → exactly one FiscalDocument_BR record

  • Currency → Currency

    Join on Currency = Currency.CurrencyCode

    Many SalesComplementaryInvoiceHeader records → zero or one Currency record

  • CustBankAccount → CustBankAccount

    Join on CustBankAccountID = CustBankAccount.AccountID, CustTable = CustBankAccount.CustAccount

    Many SalesComplementaryInvoiceHeader records → zero or one CustBankAccount record

  • CustLedger → CustLedger

    Join on PostingProfile = CustLedger.PostingProfile

    Many SalesComplementaryInvoiceHeader records → zero or one CustLedger record

  • CustPaymModeSpec → CustPaymModeSpec

    Join on CustPaymModeTable = CustPaymModeSpec.PaymMode, CustPaymModeSpec = CustPaymModeSpec.Specification

    Zero or one SalesComplementaryInvoiceHeader record → zero or one CustPaymModeSpec record

  • CustPaymModeTable → CustPaymModeTable

    Join on CustPaymModeTable = CustPaymModeTable.PaymMode

    Many SalesComplementaryInvoiceHeader records → zero or one CustPaymModeTable record

  • CustTable → CustTable

    Join on CustTable = CustTable.AccountNum

    Many SalesComplementaryInvoiceHeader records → exactly one CustTable record

  • DefaultDimension → DimensionAttributeValueSet

    Join on DefaultDimension = DimensionAttributeValueSet.RecId

    Many SalesComplementaryInvoiceHeader records → zero or one DimensionAttributeValueSet record

  • FiscalDocumentType → FiscalDocumentType_BR

    Join on FiscalDocumentType_BR = FiscalDocumentType_BR.RecId

    Many SalesComplementaryInvoiceHeader records → exactly one FiscalDocumentType_BR record

  • FiscalEstablishment → FiscalEstablishment_BR

    Join on FiscalEstablishment_BR = FiscalEstablishment_BR.RecId

    Many SalesComplementaryInvoiceHeader records → exactly one FiscalEstablishment_BR record

  • PaymSched → PaymSched

    Join on PaymSched = PaymSched.Name

    Zero or one SalesComplementaryInvoiceHeader record → zero or one PaymSched record

  • PaymTerm → PaymTerm

    Join on PaymTerm = PaymTerm.PaymTermId

    Many SalesComplementaryInvoiceHeader records → zero or one PaymTerm record

  • ReasonTableRef → ReasonTableRef

    Join on ReasonTableRef_BR = ReasonTableRef.RecId

    Many SalesComplementaryInvoiceHeader records → zero or one ReasonTableRef record

  • SourceDocumentHeader → SourceDocumentHeader

    Join on SourceDocumentHeader = SourceDocumentHeader.RecId

    Zero or one SalesComplementaryInvoiceHeader record → exactly one SourceDocumentHeader record

  • ThirdPartyPostalAddress → LogisticsPostalAddress

    Join on ThirdPartyLogisticsPostalAddress = LogisticsPostalAddress.RecId

    Many SalesComplementaryInvoiceHeader records → exactly one LogisticsPostalAddress record

  • FinTag → FinTag

    Join on FinTag = FinTag.RecId

    Many SalesComplementaryInvoiceHeader records → zero or one FinTag record

Get this data out

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

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

Email sales@drdynamics.co.uk