#LOCAL("DisplayPrice", #FUNCTION("DISPLAYPRICE", #Object, #INPUT.Currency, #Shop.TaxModel, #Session.User.Object)) #LOCAL("LastBookingAmount",0) #LOCAL("LastBookingFactor",0) #IF(#DEFINED(#BusinessHours.LastBookingAmount)) #SET("LastBookingAmount",#BusinessHours.LastBookingAmount) #ELSIF(#DEFINED(#BusinessHours.BaseCalendar.LastBookingAmount)) #SET("LastBookingAmount",#BusinessHours.BaseCalendar.LastBookingAmount) #ENDIF #IF(#DEFINED(#BusinessHours.LastBookingUnit)) #SET("LastBookingFactor",#BusinessHours.LastBookingUnit.Factor) #ELSIF(#DEFINED(#BusinessHours.BaseCalendar.LastBookingUnit)) #SET("LastBookingFactor",#BusinessHours.BaseCalendar.LastBookingUnit.Factor) #ENDIF #LOCAL("LastBookingDifference",#LastBookingAmount * #LastBookingFactor)