#IF(#DEFINED(#Product))
#REM This prevents the input field from displaying the last value inserted when a form error occurs #ENDREM
#WITH_ERROR(0)
#Product.OrderUnit.Name
#IF(#IsChanged)#ENDIF
#ENDWITH_ERROR
#ELSE
#ENDIF
#IF(#DEFINED(#Product))
#IF(#Product.PriceQuantity == 1 OR #Product.PriceQuantity == 0 OR #Quantity == 0)
#BasePrice[money]
#ELSE
#FUNCTION("FORMAT",(#BasePrice * #Product.PriceQuantity), "money")
#ENDIF
#LOCAL("TempOrderUnit","")
#IF(#Product.OrderUnit.Abbreviation)#SET("TempOrderUnit",#Product.OrderUnit.Abbreviation)
#ELSE#SET("TempOrderUnit",#Product.OrderUnit.NameOrAlias)#ENDIF
#IF(#Product.PriceQuantity != 1)/ #Product.PriceQuantity[float] #TempOrderUnit#ENDIF#IF(#Product.OrderUnit.Alias NE "piece" AND #Product.PriceQuantity == 1)/ #TempOrderUnit#ENDIF
#ENDLOCAL
#ELSE
#BasePrice[money]
#ENDIF
#IF(#Discount)({Discount}: #Discount[money])#ENDIF