{TaxAreas} {AssignmentToCountries}
#IF(#DELETE)

{AcceptAction}

#LOOP(#DeleteObjects)#ENDLOOP #ELSE #ENDIF #IF(#FormError AND NOT #TAXAREA_EXISTS )

{InputError}

#IF(#FormErrors.Reason.DontDeleteTaxArea) #LOOP(#FormErrors.Errors)#IF(#Reason EQ "DontDeleteTaxArea"){DontDeleteTaxArea}#ENDIF#ENDLOOP #ELSIF(#FormErrors.Reason.NoTaxAreaSelected) {NoTaxAreaSelected} #ELSE {PleaseCorrectErrors} #ENDIF
#ENDIF #IF(#TaxMatrix.Parent.ID NEQ #INPUT.ObjectID) #IF(NOT #DELETE)
#SNIPPET("INC-BatchActions", "BatchActions", "BatchActions")
#IF(#FormError AND (#FormError_NewName)) #ENDIF #ENDBLOCK #ENDIF #ENDIF #WITH(#TaxMatrix) #IF(#DELETE) #LOOP(#DeleteObjects) #ENDLOOP #ELSE #LOCAL("ErrorItemNo", 0 - 1) #LOOP(#TaxAreas) #WITH_ERROR(#FormError) #SET("ErrorItemNo", #ErrorItemNo + 1) #ENDWITH_ERROR #ENDLOOP #ENDLOCAL #ENDIF
{Name} #INCLUDE("INC-I18n-Tooltip") {IsDefault}
#NameOrAlias
#IF(#TaxMatrix.Parent.ID NEQ #INPUT.ObjectID) #IF(#HasUntranslatedEntries(#Object, "Name")) {BubbleHelpTranslationsMissing} #ENDIF #ELSE #NameOrAlias #ENDIF
#ENDWITH #IF(#TaxMatrix.Parent.ID NEQ #INPUT.ObjectID) #IF(#DELETE)
#ELSE
#ENDIF #ENDIF
#LOCAL("UseOwnTaxMatrix", 0) #IF(#TaxMatrix.Parent.ID == #Shop.ID)#SET("UseOwnTaxMatrix", 1)#ENDIF #IF(#FormError AND (#INPUT.DialogArea EQ "TaxAreaCountry"))

{InputError}

#IF(#FormErrors.Reason.ExistingZipcode) {ZipCodeAlreadyDefined} #ELSE {PleaseCorrectErrors} #ENDIF
#ENDIF
#WITH(#TaxMatrix) #LOCAL("LineNo", 0) #LOCAL("RegionNumber", 0) #LOOP(#Shop.ShopCountries) #LOCAL("BaseCountryID", #CountryID) #LOCAL("TaxCount", #COUNT(#FUNCTION("ZipcodesForCountry", #TaxMatrix.Object, #CountryID))) #SET("LineNo", #LineNo+1) #ENDLOCAL #ENDLOCAL #ENDLOOP #SET("LineNo", #LineNo+1) #ENDLOCAL #ENDLOCAL
{Country} {TaxArea}
#Native #IF(NOT (#English EQ #Native))(#English)#ENDIF #IF(#TaxMatrix.Parent.ID == #Shop.ID OR #TaxCount > 0)#IF(#TaxCount == 0){AddExemption}#ELSE {ShowExemptions} (#TaxCount)#ENDIF#ENDIF #LOCAL("TaxArea", #FUNCTION("TaxAreaByCountryID", #TaxMatrix.Object, #CountryID)) #IF(#UseOwnTaxMatrix) #ELSE #TaxArea.NameOrAlias #ENDIF #ENDLOCAL
#LOCAL("RowCount", 0) #LOOP(#FUNCTION("ZipcodesForCountry", #TaxMatrix.Object, #CountryID)) #SET("ErrorItemNo", #RegionNumber) #SET("RegionNumber", #RegionNumber+1) #WITH_ERROR(#FormError) #SET("RowCount", #RowCount+1) #ENDWITH_ERROR #ENDLOOP #ENDLOCAL #IF(#UseOwnTaxMatrix) #WITH_ERROR(#FormError) #ENDWITH_ERROR #ENDIF
#IF(#UseOwnTaxMatrix)   #ELSE#RegionName#ENDIF #IF(#UseOwnTaxMatrix){Zipcode}  #ELSE {Zipcode}:  #ZipcodeFrom  -  #ENDIF #IF(#UseOwnTaxMatrix) - #ELSE#ZipcodeTo#ENDIF #IF(#UseOwnTaxMatrix)  #ENDIF #IF(#UseOwnTaxMatrix) #ELSE #TaxArea.NameOrAlias #ENDIF
 {Zipcode}    -  #LOCAL("TaxArea", #FUNCTION("TaxAreaByCountryID", #TaxMatrix.Object, #CountryID)) #IF(#UseOwnTaxMatrix) #ELSE #TaxArea.NameOrAlias #ENDIF #ENDLOCAL
{FallbackTaxArea} #IF(#UseOwnTaxMatrix) #ELSE #LOOP(#TaxMatrix.TaxAreas) #IF(#IsFallback)#NameOrAlias#ENDIF #ENDLOOP #ENDIF
#ENDWITH #IF(#UseOwnTaxMatrix)
#ELSE
{Notification}: {EditMatrixFirst} #ENDIF
#ENDLOCAL
#IF(NOT #DELETE) #IF(#FUNCTION("MENU_COUNT", "RelatedTopic") > 0)

{RelatedTopics}

#ENDIF #ENDIF