Interface PriceCalculableObjectLineItemColumns
- All Superinterfaces:
CalculableObjectLineItemColumns
- All Known Subinterfaces:
QapiCompensationRecord,QapiPriceGridLineItem,QapiPriceListLineItem,QapiRebateRecord
Price columns of the items of Price Lists and Live Price Grids, and of Rebate Records and Compensation Records.
Example:
def q = api.queryApi()
def t = q.tables().priceListLineItems(841)
return q.source(t, [t.sku(), t.resultPrice(), t.previousPrice(), t.priceChangePct()],
t.priceChangePct().greaterThan(0.1))
.stream { it.collect { it } }
- Since:
- 14.3 - Caribou Lou
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the price calculated by the logic for the item.currency()Returns the currency of the price.Returns the price that a user set manually on the item, which overrides the calculated price.Returns the price that the price change is measured against.Returns the absolute change of the result price.Returns the relative change of the result price.Returns the final price of the item.sku()Returns the Stock Keeping Unit (SKU) of the product the item is calculated for.Returns the unit of measure of the price.Methods inherited from interface CalculableObjectLineItemColumns
alerts, allowedOverrides, calculationResult, comments, completeCalculationResults, completeResultsAvailable, dirty, itemExtensions, label, manualOverrides, tainted, warnings, workStatus
-
Method Details
-
sku
SelectableExpression sku()Returns the Stock Keeping Unit (SKU) of the product the item is calculated for.- Returns:
- the sku column as a String expression
-
unitOfMeasure
SelectableExpression unitOfMeasure()Returns the unit of measure of the price.- Returns:
- the unitOfMeasure column as a String expression
-
currency
SelectableExpression currency()Returns the currency of the price.- Returns:
- the currency column as a String expression
-
resultPrice
SelectableExpression resultPrice()Returns the final price of the item.For Price List and Live Price Grid items, the value is
manualResultPrice()when a user set a manual price, andcalculatedResultPrice()otherwise.- Returns:
- the resultPrice column as a Real expression
- See Also:
-
previousPrice
SelectableExpression previousPrice()Returns the price that the price change is measured against.For a Price List item, it is the result price of the item with the same Stock Keeping Unit (SKU) and key2 in the previous version of the Price List.
- Returns:
- the previousPrice column as a Real expression
- See Also:
-
priceChange
SelectableExpression priceChange()Returns the absolute change of the result price.For a Price List item, it is the result price minus
previousPrice(). For a Live Price Grid item, it is the result price minus the active (approved) price of the item.- Returns:
- the priceChange column as a Real expression
- See Also:
-
priceChangePct
SelectableExpression priceChangePct()Returns the relative change of the result price.The value is a fraction, not a percentage:
0.1means a 10% increase. It ispriceChange()divided by the price it is measured against, and isnullwhen that price is zero.Example:
def q = api.queryApi() def t = q.tables().priceGridLineItems(843) return q.source(t, [t.sku(), t.resultPrice(), t.priceChangePct()], t.priceChangePct().lessThan(-0.05)) .stream { it.collect { it } }- Returns:
- the priceChangePct column as a Real expression
- See Also:
-
manualResultPrice
SelectableExpression manualResultPrice()Returns the price that a user set manually on the item, which overrides the calculated price.The value is
nullwhen no manual price is set.- Returns:
- the manualResultPrice column as a Real expression
- See Also:
-
calculatedResultPrice
SelectableExpression calculatedResultPrice()Returns the price calculated by the logic for the item.- Returns:
- the calculatedResultPrice column as a Real expression
- See Also:
-