CustVendTransCashDisc::findByUseCashDisc Method
Finds the CustVendTransCashDisc record for the specified table and record ID fields.
Syntax
client server public static CustVendTransCashDisc findByUseCashDisc(
ModuleCustVend _moduleCustVend,
TableId _refTableId,
RefRecId _refRecId,
UseCashDisc _useCashDisc,
TransDate _cashDiscDate,
[DiscGraceDays _discGraceDays])
Run On
Called
Parameters
- _moduleCustVend
Type: ModuleCustVend Enumeration
A ModuleCustVend value that identifies the module for which the cash discount is retrieved.
- _refTableId
Type: TableId Extended Data Type
The reference table ID of the CustVendTransCashDisc record to find.
- _refRecId
Type: RefRecId Extended Data Type
The reference record ID of the CustVendTransCashDisc record to find.
- _useCashDisc
Type: UseCashDisc Enumeration
The cash discount rule used to determine the cash discount record.
- _cashDiscDate
Type: TransDate Extended Data Type
The date used to determine the cash discount record.
- _discGraceDays
Type: DiscGraceDays Extended Data Type
The number of grace days used to determine the cash discount record; optional.
Return Value
Type: CustVendTransCashDisc Map
The CustVendTransCashDisc record for the open transaction record.
Remarks
If the _useCashDisc parameter is set to Normal or Always, this method finds the first discount record with a date later than or equal to the date that is used to determine the discount. If no record is found and the _useCashDisc parameter is set to Always, this method finds the last discount record by date.