Table

RetailCashDeclaration

Cash declaration

Holds cash declaration lines for a retail statement, split into coins, notes and totals. Each line has a currency, an amount, a quantity and a total. It links to the statement, its transaction lines and the currency.

Table name
RetailCashDeclaration
Module
Commerce transactions and orders
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
Retail
Primary index
primaryIdx
Replacement key
None
Key fields
statementId, CurrencyCode, type, AmountCur, lineNum, totalLine
Model
Foundation

Fields (13)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
statementIdStatement the declaration belongs to. It points to the statement record.String (20)
RetailStatementId
YesRetailStatementTable.statementIdNone
CurrencyCodeCurrency of the declared cash. It points to the currency record.String (3)
CurrencyCode
NoCurrency.CurrencyCodeNone
typeKind of line: Coin, Note or Total.Enum
RetailCoinNoteTotal
RetailCoinNoteTotalBase (enum)
NoNone
AmountCurAmount of the line in the transaction currency.Real
AmountCur
NoNone
lineNumStatement line number. It points to a statement transaction line.Real
LineNum
YesRetailStatementTrans.lineNumNone
totalLineYes/No flag showing that the line is a total line.Enum
RetailTotalLine
NoYes (enum)
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
qtyQuantity of coins or notes declared.Real
RetailQty
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
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
totalAmountTotal amount for the line.Real
RetailTotalAmount
NoNone

Indexes (1)

Relations (3)

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

  • Currency → Currency

    Join on CurrencyCode = Currency.CurrencyCode

    Many RetailCashDeclaration records → exactly one Currency record

  • RetailStatementTable → RetailStatementTable

    Join on statementId = RetailStatementTable.statementId

    One or more RetailCashDeclaration records → exactly one RetailStatementTable record

  • RetailStatementTrans → RetailStatementTrans

    Join on CurrencyCode = RetailStatementTrans.currency, lineNum = RetailStatementTrans.lineNum, statementId = RetailStatementTrans.statementId

    Many RetailCashDeclaration records → zero or one RetailStatementTrans record

Get this data out

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

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

Email sales@drdynamics.co.uk