|
SpecialName()
Displays the discount name or special price rule
description for a selected stock item located on a transaction.
Syntax
SpecialPrice([<lInternal>] -->
cDiscountName
or
(Table)->(SpecialPrice()) -->
cDiscountName
Arguments
<lInternal> --> Pass the value of TRUE
if this function is to reference the currently selected line item
on an open transaction. You would only pass TRUE if the function
was being called from a scripting hook that was being executed from
a live (currently open) transaction.
Otherwise, when generating reports or executing
scripts on transactions that have already been saved to the
database, specify the table name of the current transaction line
item record. See the following table:
|
Table
|
Description
|
|
CONTENTS
|
The invoice items contents table.
|
|
OSTOCK
|
The sales order items contents table.
|
|
QSTOCK
|
The quotation item contents table.
|
Returns
Returns the description of the discount.
Description
The discount description may the discount
percentage or Discount Name if the line item has a special price
rule associated with. If there is no discount associated with the
line item then a blank string value is returned.
Unless you are accessing internal
information you must open the table associated with the record you
wish to query before calling this function.
Example #1
// Query an internal
value.
SpecialName(TRUE)
Example #2
// Returns the
discount name for a record found in
// invoice items
contents file
Contents->(SpecialName())
Notes
See the documentation on Customer Special Pricing
for information on how rule and price selection occurs under
CAPITAL.
____________________________
Related Topics
Business
Function List
SpecialPrice()
|