"Tax Shipping?" configuration option is not visible for Percent Tax

Issue #626 closed
Former user created an issue

I think this options should be visible for Percent Tax. It exists in percent/config.py. Probably there is some name collision because area/config.py also includes TAX_SHIPPING boolean option.

Reported by bmihelac

Comments (11)

  1. Anonymous

    Sure, in file /satchmo/satchmo/tax/modules/percent/config.py second option that is BooleanValue means if shipping is taxable:

    config_register(
        BooleanValue(TAX_GROUP,
            'TAX_SHIPPING',
            description=_("Tax Shipping?"),
            requires=TAX_MODULE,
            requiresvalue='satchmo.tax.modules.percent',
            default=False)
    )
    

    However this option is not visible when edit site settings at /settings/ when using "percent" tax module is used.

  2. Raphael Reumayr

    Hi Chris,

    we had the same issue when trying to apply tax to shipping costs. It happens when both modules are active at the same time. (Modules: area and percent) because both have a config value called 'TAX_SHIPPING'. Satchmo does not like both modules to have the same name.

    Our quick and dirty fix was to comment out the following lines in /tax/modules/percent because we only do use module /tax/modules/area right now.

    from django.utils.translation import ugettext_lazy as _
    from livesettings import *
    from tax.config import TAX_MODULE
    
    TAX_MODULE.add_choice(('tax.modules.percent', _('Percent Tax')))
    TAX_GROUP = config_get_group('TAX')
    
    config_register(
        DecimalValue(TAX_GROUP,
            'PERCENT',
            description=_("Percent tax"),
            requires=TAX_MODULE,
            requiresvalue='tax.modules.percent')
    )
    
    #config_register(
    #    BooleanValue(TAX_GROUP,
    #        'TAX_SHIPPING',
    #        description=_("Tax Shipping?"),
    #        requires=TAX_MODULE,
    #        requiresvalue='tax.modules.percent',
    #        default=False)
    #)
    

    now the 'TAX_SHIPPING' boolean value appears again in the admin interface and tax can be applied or removed from shipping costs.

    sure in the future we could need a cleaner solution than that dirty fix. So for the future we should use different names of 'TAX_SHIPPING' or disable the unused module by default.

    Kind regards, Raphael

  3. Raphael Reumayr

    I only know that both modules will not be activated at the same time. (due to selection box) so... maybe we could dynamically unload a module or rename * 'TAX_SHIPPING' to 'TAX_SHIPPING_PERCENT' and 'TAX_SHIPPING_AREA' or

    move the BooleanValue of TAX_SHIPPING in the main tax config.py at /tax/config.py

    I am not sure what will be best either.

  4. Darren Hollenbeck

    Other than creating a bit of extra noise for folks who aren't using a tax module that makes use of the config option, moving it to the global tax config would be fine I think.

    (updating because I just ran into this myself)

  5. Log in to comment