Share via


TransactionReversal_Asset::checkValidAssetTranCalendar Method [AX 2012]

Validates that the new transaction date occurs in a valid asset calendar for all value model and depreciation books for the asset transactions that are related to the specified voucher and transaction date.

Syntax

client server public static container checkValidAssetTranCalendar(
    Voucher _voucher, 
    TransDate _transDate, 
    AssetJournalId _journalNumber, 
    LineNum _journalLineNum, 
    TransDate _newDate)

Run On

Called

Parameters

  • _voucher
    Type: Voucher Extended Data Type
    The voucher that is used to look up all asset transactions and depreciation book transactions.
  • _transDate
    Type: TransDate Extended Data Type
    The transaction date that is related to the voucher that is used to look up all asset transactions and depreciation book transactions.
  • _journalLineNum
    Type: LineNum Extended Data Type
    The transaction journal line number that is used to look up all stand-alone depreciation book transactions.

Return Value

Type: container
A container with a Boolean and an AssetCalendarId value. The Boolean is set to true if the specified new transaction date does not occur in a closed or stopped period within any related asset calendar for all transactions, or if no asset calendars are found; otherwise, false.
The AssetCalendarId value is the value of the CalendarId field of the failing period; otherwise, blank.

Remarks

This routine first selects all value model assetTrans records to get the related calendar for each transaction. If a calendar is found for the transaction, the calendar is looked up to see whether the specified new transaction date falls in a closed period. If it does, this method returns false.

The same sequence of events earlier occurs again to check against the depreciation book assetDepBook transactions.

In both cases, if no calendar is found, true is returned.

See Also

Reference

TransactionReversal_Asset Class