getPriceCalculationSheet
Synopsis
CalculationSheet* getPriceCalculationSheet(
SessionId ´ sessionId,
string itemIds,
GetPriceCalculationSheetOptions options,
string ppName)
throws BasketServiceFault;
See also: CalculationSheet, SessionId, s, GetPriceCalculationSheetOptions, BasketServiceFault
Returns calculation sheet for all items identified by itemIds and pricing procedure identified by ppName. Returns null if item does not have a calculation.
The document calculation sheet (header calculation) is returned if the itemIds parameter contains exactly one item ID and this item ID is the NULL-Id (empty string or all bits zero). Otherwise, the set of selected items is determined based on the specified set of item IDs and the item selection options. If the resulting set contains exactly one article item, the operation returns the item calculation sheet for this item. Otherwise it returns a group calculation sheet for all article items contained in the set of selected items. A group calculation is a calculation that summarizes zero or more item calculations.
In case of set-article items, the returned calculation sheet represents the sum of all set-article parts, multiplied with the quantity of the set-article item.
In case of folder items with option subItems set to true, the returned price calculation sheet will represent the sum of all calculations of article items within the folder, except for article items that are alternative positions.
If the folder contains a set-article item, then parts of the set-article item also contained in the folder are ignored. If the folder contains a part of a set-article, but not the set-article item itself, then the part of the set-article is treated like an ordinary article (i.e. the quantity of the set-article item is ignored).
The ppName argument may be an empty string if only one pricing procedure has been added to the basket. counter may be -1 if the calculation contains only one condition of the given type.
The option viewId of ItemSelectionOptions is supported by this operation. If it contains the ID of a view then the behavior of the operation is changed as follows:
-
Item IDs passed with parameter
itemIdsare interpreted as IDs of items within this view. -
The options
parentItemsandsubItems, if set, affect the selection of additional view items, not basket items. -
The set of view items is mapped to a set of basket items, replacing each view item with the set of directly referenced basket items1.
-
Note that folder view items are mapped to basket folder items, but, at least with display mode
Sorted, the content of both folders does not necessarily consist of the same set of article items, so the use of folder view items may lead to surprising results. -
The values of options
wholeCompositeandsumUpCompositeare set totrueif the view uses merge modeCompact. -
The value of option
itemCondAmountPerUnitis set totruefor each returned group calculation that grouped a whole composite article or a set of identical composite articles. The client may explicitly set this option to ensure consistent behavior for ordinary articles and partial plannings or aggregates with sub-articles.
Footnotes
-
Indirectly referenced basket items, like sub-article items indirectly referenced by article view items in merge mode Compact, or set-article parts in case of collapsed set-articles, are not included. ↩