def VatVocabulary(context):
    # vocab is used for buyable items.
    try:
        settings = get_shop_tax_settings()
    except KeyError:
        # happens GS profile application if registry entries not present yet
        return AvailableVatVocabulary(context)
    settings.vat
    terms = []
    if settings.vat:
        for vat in settings.vat:
            title = AVAILABLE_VAT_VALUES.get(vat, vat)
            terms.append(SimpleTerm(value=vat, title=title))
    return SimpleVocabulary(terms)
Example #2
0
def VatVocabulary(context):
    # vocab is used for buyable items.
    try:
        settings = get_shop_tax_settings()
    except KeyError:
        # happens GS profile application if registry entries not present yet
        return AvailableVatVocabulary(context)
    settings.vat
    terms = []
    if settings.vat:
        for vat in settings.vat:
            title = AVAILABLE_VAT_VALUES.get(vat, vat)
            terms.append(SimpleTerm(value=vat, title=title))
    return SimpleVocabulary(terms)
Example #3
0
def default_item_vat(context):
    return get_shop_tax_settings().default_item_vat
Example #4
0
def default_item_vat(context):
    return lambda: get_shop_tax_settings().default_item_vat