#SET("LineItemNo", #LineItemNo + 1)
#LineItemNo |
#Quantity[float] #IF(NOT #Appointment)#OrderUnit.NameOrAlias#ENDIF |
#SET("IsVisible",#Product.IsVisible)
#SKU
#IF(#IsLineItemProductBundle)
#WITH(#BundledProductContainer)
#LOOP(#LineItems)
#SKU
#ENDLOOP
#ENDWITH
#ENDIF
|
#IF(#Product)#Product.NameOrAlias#ELSIF(#Name)#Name#ELSE-#ENDIF
#MENU("AdditionalProductInformation")
#INCLUDE(#Template)
#ENDMENU
#IF(#IsLineItemProductBundle)
#WITH(#BundledProductContainer)
#LOOP(#LineItems)
#Quantity[float] #OrderUnit.NameOrAlias #Name
#ENDLOOP
#ENDWITH
#ELSE
#IF(#LocalizedVariationString) - #LocalizedVariationString#ENDIF
#IF(#Appointment) #Appointment.StartDate[datetime] - #IF(#FUNCTION("YMD",#Appointment.StartDate) EQ #FUNCTION("YMD",#Appointment.EndDate))#Appointment.EndDate[time_tz]#ELSE#Appointment.EndDate[datetime]#ENDIF#ENDIF
#ENDIF
|
#LOCAL("RealPrice", #LineItemPrice)
#IF(#Appointment AND #DEFINED(#OriginalLineItemPrice))#SET("RealPrice", #OriginalLineItemPrice)#ENDIF
#IF(#DEFINED(#Product))
#IF(#Quantity == 0) #FUNCTION("FORMAT",#BasePrice * #Product.PriceQuantity, "money")
#ELSIF(#Product.PriceQuantity == 1)#BasePrice[money]#ELSE#FUNCTION("FORMAT",(#LineItemPrice + #Discount) / (#Quantity/#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] #IF(#OrderUnit)/ #OrderUnit.NameOrAlias#ENDIF
#ENDIF
|
#IF(NOT #ShowTaxRate)#IF(NOT #Shop.VATreleased)#CALCULATE(#TaxRate * 100)%#ENDIF#ENDIF |
#IF(#Discount)#Discount[money]#ENDIF |
#RealPrice[money] |
#ENDLOCAL