#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}

 

{PriceListsNotification3}

#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(#DEFINED(#INPUT.ActiveSelectedPriceList)) #SET("ActivePosition", #INPUT.ActiveSelectedPriceList) #ENDIF #LOOP(#SortedCustomerGroups) #IF(#Alias NE "NewCustomer") #SET("CustomerGroup", #_) #IF(NOT #DEFINED(#ActivePosition)) #SET("ActivePosition", 0) #ENDIF #SET("CustomerGroupID", #ID) #LOCAL("PriceInfoQuantitiesCounter", 0) #LOCAL("AccordionContent", {( #IF(#COUNT(#SortedCustomerGroups) > 0) #SNIPPET("INC-BatchActions", "BatchActions, NoAddButton", "BatchActions", 1) #ENDIF #LOOP(#PriceLists) #IF(#Shop.CurrencyID == #CurrencyID) #SET("SelectedPriceList", #_) #ENDIF #ENDLOOP #LOCAL("TableRowCount", 0) #SET("PriceInfoQuantitiesCounter", 0) #LOOP(#PriceInfoQuantities) #IF(#SelectedPriceList.ID EQ #PriceListID) #SET("PriceInfoQuantitiesCounter", #PriceInfoQuantitiesCounter + 1) #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} (#OrderUnit.NameOrAlias) {PricePer} #PriceQuantity[float] #OrderUnit.NameOrAlias {Discount}
#REM #ENDREM #Quantity[float] #REM #ENDREM #IF(#DEFINED(#Price))#Price[money]#ENDIF #REM #ENDREM #IF(#DEFINED(#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" = {(#SelectedPriceList.ID)}, "open" = {(#IF(#ActivePosition == #SelectedPriceList.ID)1#ELSE0#ENDIF)}, "title" = {(#NameOrAlias#IF(#PriceInfoQuantitiesCounter > 0) (#PriceInfoQuantitiesCounter)#ENDIF(Alias: #SelectedPriceList.Alias))}, "alias" = {(#Alias)}, "headerClass" = {(ep-accordion-for-customergroup-#CustomerGroupsCounter#IF(#PriceInfoQuantitiesCounter == 0) ep-accordion-empty#ENDIF)}, "content" = {( #AccordionContent[0]
)} ) #ENDIF #ENDLOCAL #REM #ENDREM #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} (#OrderUnit.NameOrAlias) {PricePer} #PriceQuantity[float] #OrderUnit.NameOrAlias {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
#IF(NOT #DELETE) #REM #ENDREM #ENDIF