Table "Detailed Cust. Ledg. Entry"
Stores detailed sub-ledger entries for customer transactions, including payment applications, currency adjustments, payment tolerances, and discounts.
Properties
| Name | Value |
|---|---|
| Caption | Detailed Cust. Ledg. Entry |
| DataCaptionFields | 9 |
| DrillDownPageID | Page Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entries" |
| LookupPageID | Page Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entries" |
| Permissions | TableData "Detailed Cust. Ledg. Entry" = m |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Entry No." | Integer | Specifies the unique sequential number assigned to this detailed customer ledger entry. |
| "Cust. Ledger Entry No." | Integer | Specifies the parent customer ledger entry that this detailed entry belongs to. |
| "Entry Type" | Enum Microsoft.Finance.ReceivablesPayables."Detailed CV Ledger Entry Type" | Specifies the type of transaction such as Initial Entry, Application, Payment Discount, or Currency Adjustment. |
| "Posting Date" | Date | Specifies the date when this detailed entry was posted to the ledger. |
| "Document Type" | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type" | Specifies the type of source document such as Invoice, Credit Memo, or Payment. |
| "Document No." | Code[20] | Specifies the document number of the source transaction that created this entry. |
| Amount | Decimal | Stores the transaction amount in the original currency for this detailed entry. |
| "Amount (LCY)" | Decimal | Stores the transaction amount expressed in the local currency. |
| "Customer No." | Code[20] | Specifies the customer account associated with this detailed entry. |
| "Currency Code" | Code[10] | Specifies the currency in which the transaction amount is expressed. |
| "User ID" | Code[50] | Specifies the user who created or posted this detailed entry. |
| "Source Code" | Code[10] | Specifies the source code identifying where the transaction originated. |
| "Transaction No." | Integer | Specifies the transaction number that groups all entries from the same posting operation. |
| "Journal Batch Name" | Code[10] | Specifies the journal batch from which this entry was posted. |
| "Reason Code" | Code[10] | Specifies a supplementary code providing additional context about the transaction purpose. |
| "Debit Amount" | Decimal | Stores the debit portion of the amount in the original currency. |
| "Credit Amount" | Decimal | Stores the credit portion of the amount in the original currency. |
| "Debit Amount (LCY)" | Decimal | Stores the debit portion of the amount in local currency. |
| "Credit Amount (LCY)" | Decimal | Stores the credit portion of the amount in local currency. |
| "Initial Entry Due Date" | Date | Stores the due date from the original customer ledger entry for filtering and reporting. |
| "Initial Entry Global Dim. 1" | Code[20] | Stores the first global dimension from the original customer ledger entry for analysis. |
| "Initial Entry Global Dim. 2" | Code[20] | Stores the second global dimension from the original customer ledger entry for analysis. |
| "Gen. Bus. Posting Group" | Code[20] | Specifies the general business posting group used for determining accounts in the posting process. |
| "Gen. Prod. Posting Group" | Code[20] | Specifies the general product posting group used for determining accounts in the posting process. |
| "Use Tax" | Boolean | Indicates whether use tax applies to this entry for US and Canadian tax jurisdictions. |
| "VAT Bus. Posting Group" | Code[20] | Specifies the VAT business posting group for VAT calculation purposes. |
| "VAT Prod. Posting Group" | Code[20] | Specifies the VAT product posting group for VAT calculation purposes. |
| "Initial Document Type" | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type" | Stores the document type from the original customer ledger entry for filtering and reporting. |
| "Applied Cust. Ledger Entry No." | Integer | Specifies the customer ledger entry number to which this entry was applied during payment application. |
| Unapplied | Boolean | Indicates whether this entry has been reversed through an unapplication process. |
| "Unapplied by Entry No." | Integer | Specifies the entry number of the correcting entry that unapplied this original entry. |
| "Remaining Pmt. Disc. Possible" | Decimal | Stores the remaining payment discount that can still be granted for early payment. |
| "Max. Payment Tolerance" | Decimal | Stores the maximum payment tolerance amount allowed when applying this entry. |
| "Tax Jurisdiction Code" | Code[10] | Specifies the tax jurisdiction code for US and Canadian sales tax calculations. |
| "Application No." | Integer | Specifies the application number that groups all entries from the same application operation. |
| "Ledger Entry Amount" | Boolean | Indicates whether this entry affects the ledger entry balance, excluding application entries. |
| "Posting Group" | Code[20] | Specifies the customer posting group that determines the receivables account used for posting. |
| "Exch. Rate Adjmt. Reg. No." | Integer | Links this entry to the exchange rate adjustment register when created by currency adjustment. |
| "G/L Register No." | Integer | Specifies the G/L register number that groups related G/L entries from the same posting. |
| "Excluded from calculation" | Boolean | |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemCreatedByUserName | Text[50] | |
| SystemCreatedByFullName | Text[80] | |
| SystemModifiedByUserName | Text[50] | |
| SystemModifiedByFullName | Text[80] | |
| SystemRowVersion | BigInteger |
Methods
GetLastEntryNo
Gets the entry number of the last detailed customer ledger entry in the table.
[InherentPermissions(TableData,379,r)]
procedure GetLastEntryNo(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
The entry number of the last detailed customer ledger entry. |
UpdateDebitCredit
Updates the debit and credit amounts based on the sign of the amount and correction flag.
procedure UpdateDebitCredit(Correction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Correction | Boolean |
Indicates whether this is a correction entry that reverses the normal debit/credit assignment. |
SetZeroTransNo
Sets the transaction number to zero and assigns an application number for all entries with the specified transaction number.
procedure SetZeroTransNo(TransactionNo: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| TransactionNo | Integer |
The transaction number to reset to zero. |
GetUnrealizedGainLossAmount
Calculates the sum of unrealized gain and loss amounts for a customer ledger entry.
procedure GetUnrealizedGainLossAmount(EntryNo: Integer): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| EntryNo | Integer |
The customer ledger entry number to calculate unrealized gain/loss for. |
Returns
| Type | Description |
|---|---|
| Decimal |
The total unrealized gain/loss amount in local currency. |
Events
OnBeforeSetLedgerEntryAmount
Raised before setting the Ledger Entry Amount flag to allow custom logic.
[IntegrationEvent(False,False)]
local procedure OnBeforeSetLedgerEntryAmount(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DetailedCustLedgEntry | Table Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entry" |
The detailed customer ledger entry. |
| IsHandled | Boolean |
Set to true to skip default processing. |
OnAfterUpdateDebitCredit
Raised after updating the debit and credit amounts on the entry.
[IntegrationEvent(False,False)]
local procedure OnAfterUpdateDebitCredit(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; Correction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DetailedCustLedgEntry | Table Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entry" |
The detailed customer ledger entry with updated debit/credit amounts. |
| Correction | Boolean |
Indicates whether this is a correction entry. |
OnSetZeroTransNoOnBeforeDetailedCustLedgEntryModify
Raised before modifying the detailed customer ledger entry when setting transaction number to zero.
[IntegrationEvent(False,False)]
local procedure OnSetZeroTransNoOnBeforeDetailedCustLedgEntryModify(var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry")
Parameters
| Name | Type | Description |
|---|---|---|
| DetailedCustLedgEntry | Table Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entry" |
The detailed customer ledger entry being modified. |