Table

RetailEInvoiceCFDIReference_MX

Referenced CFDIs

Lists CFDI documents that an electronic invoice refers to, used for Mexico. Each row holds the UUID of the referenced CFDI and the type of relation, such as credit note, substitution or prepayment. It can also point to a customer invoice or to a retail transaction.

Table name
RetailEInvoiceCFDIReference_MX
Module
Commerce
Table group
Worksheet
Table type
Regular
Data per company
Yes
Configuration key
Retail
Primary index
None
Replacement key
None
Key fields
None
Model
Foundation

Fields (14)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
CFDIUUIDUUID of the referenced CFDI document.String (36)
EInvoiceCFDIUUID_MX
NoNone
ChannelRetail channel of the related retail transaction, stored as a record ID.Int64
RetailChannelRecId
NoRetailTransactionTable.ChannelNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
EInvoiceJourRecord ID of the electronic invoice that holds this reference.Int64
RefRecId
NoEInvoiceJour_MX.RecIdNone
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
ReferenceTypeType of relation between the invoice and the referenced CFDI, such as credit note, debit note or substitution.Enum
EInvoiceCFDIReferenceType_MX (enum)
NoNone
RefRecIdRecord ID of the related customer invoice journal record.Int64
RefRecId
NoNone
RefTableIdID of the table that RefRecId points to, here the customer invoice journal.Integer
RefTableId
NoNone
StoreStore number of the related retail transaction. Points to a store record.String
RetailStoreId
NoRetailStoreTable.StoreNumberNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TerminalRegister number of the related retail transaction. Points to a POS register.String
RetailTerminalId
NoRetailTerminalTable.terminalIdNone
TransactionIdNumber of the related retail transaction.String (44)
RetailTransactionId
NoRetailTransactionTable.TransactionIdNone

Indexes (4)

Relations (5)

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

  • RetailStoreTable → RetailStoreTable

    Join on Store = RetailStoreTable.StoreNumber

    Many RetailEInvoiceCFDIReference_MX records → zero or one RetailStoreTable record

  • RetailTerminalTable → RetailTerminalTable

    Join on Terminal = RetailTerminalTable.terminalId

    Many RetailEInvoiceCFDIReference_MX records → zero or one RetailTerminalTable record

  • RetailTransactionTable → RetailTransactionTable

    Join on Channel = RetailTransactionTable.Channel, Store = RetailTransactionTable.Store, Terminal = RetailTransactionTable.Terminal, TransactionId = RetailTransactionTable.TransactionId

    Many RetailEInvoiceCFDIReference_MX records → zero or one RetailTransactionTable record

  • EInvoiceJour_MX → EInvoiceJour_MX

    Join on EInvoiceJour = EInvoiceJour_MX.RecId

    Many RetailEInvoiceCFDIReference_MX records → exactly one EInvoiceJour_MX record

  • CustInvoiceJour → CustInvoiceJour

    Join on RefTableId = CustInvoiceJour.TableId, RefRecId = CustInvoiceJour.RecId

    Many RetailEInvoiceCFDIReference_MX records → zero or one CustInvoiceJour record

Get this data out

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

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

Email sales@drdynamics.co.uk