#LOCAL("GlobalValueDiscounts", "") #LOCAL("PriceListID", "") #LOCAL("LocalCurrencySymbol", "") #LOOP(#PriceLists, 1, 1) #SET("GlobalValueDiscounts", #GlobalValueDiscounts) #SET("PriceListID", #ID) #IF(#DEFINED(#CurrencyID))#LOCAL("LocalCurrency", #FUNCTION("CURRENCY", #CurrencyID))#SET("LocalCurrencySymbol", #LocalCurrency.Symbol)#ENDLOCAL#ENDIF #ENDLOOP

{CustomerGroups} #NameOrAlias

#WITH_ERROR(#FormError AND (#DEFINED(#FormErrors.Form.SaveGlobalValueDiscounts) OR #DEFINED(#FormErrors.Form.NewGlobalValueDiscounts))) #IF(#FormError)

{InputError}

#IF(#FormErrors.Reason.INTERVAL_EXISTS)

{IntervalExists}

#ELSE

{PleaseCorrectErrors}

#ENDIF
#ENDIF #IF(#DELETE)

{AcceptAction}

#LOOP(#DeleteObjects)#ENDLOOP #ELSE #IF(#Shop.FeatureMaxValue.BasketDiscount AND #Shop.FeatureMaxValue.PriceLists)

{CustomerGroupsNotification}

{CustomerGroupsNotification2}

{CustomerGroupsNotification3}

#ENDIF

{GeneralSettings}

#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDIF #REM #ENDREM #IF(#Shop.FeatureMaxValue.BasketDiscount AND #Shop.FeatureMaxValue.PriceLists)
#IF(NOT #DELETE)

{UnityGlobalValueDiscount}

#REM #ENDREM
#REM #ENDREM #ENDIF
#IF(NOT #DELETE) #SNIPPET("INC-BatchActions", "BatchActions", "BatchActions") #ENDIF #LOCAL("SelectedGlobalValueDiscountsID", 0) #LOCAL("CustomerGroupsCounter", 0) #LOOP(#GlobalValueDiscounts) #SET("SelectedGlobalValueDiscountsID", #ID) #ENDLOOP #IF(#DELETE) #LOOP(#DeleteObjects) #ENDLOOP #REM #ENDREM #ELSE #LOCAL("TableRowCount", 0) #LOOP(#GlobalValueDiscounts) #WITH_ERROR(#FormError AND (#DEFINED(#FormErrors.Form.SaveGlobalValueDiscounts))) #ENDWITH_ERROR #SET("TableRowCount", #TableRowCount + 1) #ENDLOOP #REM #ENDREM #REM #ENDREM #IF(#FormErrors) #LOCAL("NewEntryError", 0) #LOOP(#SORT(#FROMHASH(#FormErrors.Value.NewGlobalValueDiscountID), "Key")) #IF(#GET("FormErrors.Value.NewValue.".#Key,"html") NE "" OR #GET("FormErrors.Value.NewDiscount".#Key,"html") NE "") #SET("TableRowCount", #TableRowCount + 1) #ENDIF #ENDLOOP #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDIF #REM #ENDREM #ENDLOCAL #REM #ENDREM #REM #ENDREM #ENDIF #REM #ENDREM
{ValueCurrency} {FixValue} {PercentalDiscount}
#Value[money] #IF(#DEFINED(#DiscountAbsolute))#DiscountAbsolute[money]#ENDIF #IF(#DEFINED(#Discount))#Discount[float]#ENDIF
#REM #ENDREM #Value[money] #REM #ENDREM #IF(#DEFINED(#DiscountAbsolute))#DiscountAbsolute[money]#ENDIF #REM #ENDREM #IF(#DEFINED(#Discount))#Discount[float] %#ENDIF
#SET("NewEntryError", #GET("FormErrors.Value.NewValue.".#Key)) #REM #ENDREM
#SET("NewEntryError", #GET("FormErrors.Value.NewDiscountAbsolute.".#Key)) #REM #ENDREM #Currency.Symbol
#SET("NewEntryError", #GET("FormErrors.Value.NewDiscount.".#Key)) #REM #ENDREM
#LOCAL("ShopCurrency", #CURRENCY(#Shop.CurrencyID))#ShopCurrency.Symbol#ENDLOCAL
#LOCAL("ShopCurrency", #CURRENCY(#Shop.CurrencyID))#ShopCurrency.Symbol#ENDLOCAL
 %
#IF(NOT #DELETE) #ENDIF #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDIF #REM #ENDREM
#IF(#Shop.FeatureMaxValue.BasketDiscount AND #Shop.FeatureMaxValue.PriceLists)
#IF(#DELETE) #ELSE #ENDIF #REM #ENDREM
#ELSE
#ENDIF #REM #ENDREM
#REM #ENDREM
#REM #ENDREM #ENDWITH_ERROR
#ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM #REM #ENDREM