#IF(#FormError)

{InputError}

#IF(#FormErrors.Reason.INTERVAL_EXISTS)

{IntervalExists}

#ENDIF

{PleaseCorrectErrors}

#ENDIF #REM #ENDREM #IF(#DELETE) #LOOP(#Shop.CustomerGroups) #LOOP(#PriceLists) #IF(#_.ID == #INPUT.SelectedPriceList)

{AcceptDeleteAction}

#ENDIF #REM #ENDREM #ENDLOOP #REM #ENDREM #ENDLOOP #REM #ENDREM #ELSE #REM #ENDREM

{PriceListsNotification1} {LinkCustomerGroups}

{PriceListsNotification2}

{PriceListsHelpCenter}

#ENDIF #REM #ENDREM #IF(NOT #SuperProduct OR #HasSubOwnPrices)
#IF(#DELETE) #LOOP(#DeleteQuantities) #ENDLOOP #ENDIF #REM #ENDREM
#LOCAL("Product", #Object) #LOCAL("SelectedPriceList", 0) #LOCAL("CustomerGroupID", 0) #LOCAL("CustomerGroup", "") #LOCAL("CustomerGroupsCounter", 0) #IF(NOT #DELETE) #GUI("accordion") #LOCAL("ActivePosition", 0) #IF(#INPUT.AccordionActivePosition) #SET("ActivePosition", #INPUT.AccordionActivePosition) #ENDIF #LOOP(#Shop.CustomerGroups) #IF(#Alias NE "NewCustomer") #SET("CustomerGroup", #_) #IF(NOT #ActivePosition) #SET("ActivePosition", 1) #ENDIF #SET("CustomerGroupID", #ID) #LOCAL("AccordionContent", {( #IF(#COUNT(#Shop.CustomerGroups) > 1) #SNIPPET("INC-BatchActions", "BatchActions, NoAddButton", "BatchActions", 1) #ENDIF #LOOP(#PriceLists) #IF(#Shop.CurrencyID == #CurrencyID) #SET("SelectedPriceList", #_) #ENDIF #ENDLOOP #LOCAL("TableRowCount", 0) #LOOP(#PriceInfoQuantities) #IF(#SelectedPriceList.ID EQ #PriceListID) #IF(#SelectedPriceList.ID EQ #PriceListID) #ENDIF #LOOP(#PriceInfos) #IF(#CurrencyID == #Shop.CurrencyID AND #SelectedPriceList.ID EQ #PriceListID) #IF(#SelectedPriceList.ID EQ #PriceListID) #ENDIF #ENDIF #ENDLOOP #SET("TableRowCount", #TableRowCount + 1) #ENDIF #REM #ENDREM #ENDLOOP #REM #ENDREM #REM #ENDREM #IF(#FormErrors) #LOCAL("NewEntryError", 0) #LOOP(#SORT(#FROMHASH(#FormErrors.Value.NewPriceListID), "Key")) #IF(#GET("FormErrors.Value.NewPriceListID.".#Key,"html") EQ #SelectedPriceList.ID) #IF(#GET("FormErrors.Value.NewPrice.".#Key,"html") NE "" OR #GET("FormErrors.Value.NewQuantity.".#Key,"html") NE "") #REM #ENDREM #SET("TableRowCount", #TableRowCount + 1) #ENDIF #ENDIF #ENDLOOP #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDIF #REM #ENDREM #ENDLOCAL #REM #ENDREM #REM #ENDREM
{Quantity} {PricePerItem} {Discount}
#REM #ENDREM #Quantity[float] #REM #ENDREM #IF(#Price)#Price[money]#ENDIF #REM #ENDREM #IF(#Discount)#Discount[float] %#ENDIF
#ENDREM #ENDLOOP #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM > #SET("NewEntryError", #GET("FormErrors.Value.NewQuantity.".#Key)) #REM #ENDREM
#SET("NewEntryError", #GET("FormErrors.Value.NewPrice.".#Key)) #REM #ENDREM #Currency.Symbol
#SET("NewEntryError", #GET("FormErrors.Value.NewDiscount.".#Key)) #REM #ENDREM
#LOCAL("ShopCurrency", #CURRENCY(#Shop.CurrencyID))#ShopCurrency.Symbol#ENDLOCAL
 %
)}) #IF(NOT #IsEmpty(#AccordionContent)) #GUI.item( "pos" = {(#CustomerGroupsCounter)}, "open" = {(#IF(#ActivePosition == #CustomerGroupsCounter)1#ELSE0#ENDIF)}, "title" = {(#NameOrAlias)}, "alias" = {(#Alias)}, "content" = {( #AccordionContent[0]
)} ) #ENDIF #ENDLOCAL #REM #ENDREM #ENDIF #REM #ENDREM #SET("CustomerGroupsCounter", #CustomerGroupsCounter + 1) #SET("SelectedPriceList", 0) #ENDLOOP #REM #ENDREM #ENDLOCAL #ENDREM #ENDGUI #REM #ENDREM #ELSE #REM #ENDREM #LOOP(#DeleteQuantities) #LOOP(#PriceInfos) #ENDLOOP #ENDLOOP #REM #ENDREM
{Quantity} {PricePerItem} {Discount}
#Quantity[float] #IF(#DEFINED(#Price))#Price[money]#ENDIF #IF(#DEFINED(#Discount))#Discount[float] %#ENDIF
#ENDIF #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM #ENDLOCAL #REM #ENDREM
#REM #ENDREM
#IF(#DELETE) #ELSE #IF(NOT #SuperProduct OR #HasSubOwnPrices) #IF(#COUNT(#Shop.CustomerGroups) > 1) #ENDIF #ENDIF #ENDIF
#ENDIF #REM #ENDREM