ProjEmplTrans.costAmount Method
Returns the cost ledger amount for a transaction.
Syntax
public SalesAmount costAmount(
ProjEmplTrans projEmplTrans,
TransDate ledgerFromDate,
TransDate ledgerToDate)
Run On
Called
Parameters
- projEmplTrans
Type: ProjEmplTrans Table
The transaction for which to calculate the cost amount.
- ledgerFromDate
Type: TransDate Extended Data Type
The start date of ledger postings to include in the calculation.
- ledgerToDate
Type: TransDate Extended Data Type
The end date of ledger postings to include in the calculation.
Return Value
Type: SalesAmount Extended Data Type
A SalesAmount data type that represents the cost amount.
Remarks
This is the total consumed cost for the transaction. The amount returned is in the default currency.
Set the ledgerFromDate value to dateNull() and the ledgerToDate value to dateMax() to include all postings for this transaction.
Examples
This example returns the cost amount for a given transaction.
display CostAmount costAmount(ProjEmplTrans _projEmplTrans)
{
TransDate ledgerFromDate;
TransDate ledgerToDate;
ledgerFromDate = dateNull();
ledgerToDate = dateMax();
return _projEmplTrans.costAmount(_projEmplTrans,ledgerFromDate,ledgerToDate);
}