Class FreeGoodSupportBackend
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.misc.backend.interf.FreeGoodSupportBackend
Handles support of inclusive free goods for CRM, R/3 and DB backends.
For this type of free good, handling in ISA differs from CRM and R/3: no free good sub items will be shown but all sub item related info will be condensed into the main item.
For this type of free good, handling in ISA differs from CRM and R/3: no free good sub items will be shown but all sub item related info will be condensed into the main item.
-
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddScheduleLines(Item item, Item parentItem) Transfers schedule lines from one item to another.static booleanadjustSalesDocument(SalesDocument salesDocument) Checks all free good related sub items, removes them from the sales document and adjusts the corresponding main items.protected static SchedlinegetSchedlineForDate(Date committedDate, List<Schedline> scheduleLines) Checks if a schedule line is present for a date.
-
Method Details
-
adjustSalesDocument
Checks all free good related sub items, removes them from the sales document and adjusts the corresponding main items.
Checks the exclusive free good sub items: they are set to be read- only.
Called from all sales document backend implementations after item read.- Parameters:
salesDocument- the backend's view of the sales document- Returns:
- true if there was a inclusive free good item
- Throws:
BackendException- Is thrown if there is an exception in the back end.
-
addScheduleLines
Transfers schedule lines from one item to another. If there is no entry for a commited date, a new record is appended, the quantities are accumulated otherwise.- Parameters:
item- the current item (source of schedule lines)parentItem- the target, gets new schedule lines
-
getSchedlineForDate
Checks if a schedule line is present for a date. Searches via looping through the list of schedule lines.- Parameters:
committedDate- the date for which we do the checkscheduleLines- the list of schedule lines we look into- Returns:
- null if no schedule line was found for this date
-