Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
- _journalNumber
Type: AssetJournalId Extended Data Type
The transaction journal number that is used to look up all stand-alone 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.
- _newDate
Type: TransDate Extended Data Type
The new transaction date to test whether an asset calendar period is stopped or closed.
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.