示例#1
0
文件: config.py 项目: 34/T
from django.db import transaction, DatabaseError
from django.utils.translation import ugettext_lazy as _
from livesettings import * 
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.area', _('By Country/Area')))
TAX_GROUP = config_get_group('TAX')
        
config_register(
     BooleanValue(TAX_GROUP,
         'TAX_SHIPPING',
         description=_("Tax Shipping?"),
         requires=TAX_MODULE,
         requiresvalue='tax.modules.area',
         default=False)
)

config_register(
     StringValue(TAX_GROUP,
         'TAX_CLASS',
         description=_("TaxClass for shipping"),
         help_text=_("Select a TaxClass that should be applied for shipments."),
         #TODO: [BJK] make this dynamic - doesn't work to have it be preloaded.
         default='Shipping'
     )
)

示例#2
0
from django.utils.translation import ugettext_lazy as _
from livesettings import * 
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('canada_tax', _('Canadian Tax Module')))

TAX_GROUP = config_get_group('TAX')
        
config_register(
     BooleanValue(TAX_GROUP,
         'TAX_SHIPPING_CANADIAN',
         description=_("Tax Shipping?"),
         requires=TAX_MODULE,
         requiresvalue='canada_tax',
         default=False)
)

config_register(
    BooleanValue(TAX_GROUP,
        'TAX_SHIPPING_DETAILS_SEPARATE',
        description=_("Separate shipping tax from merchandise tax in tax details?"),
        requires=TAX_MODULE,
        requiresvalue='canada_tax',
        default=False)
)

示例#3
0
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',
        default="0")
)

config_register(
    BooleanValue(TAX_GROUP,
        'TAX_SHIPPING_PERCENT',
        description=_("Tax Shipping?"),
        requires=TAX_MODULE,
        requiresvalue='tax.modules.percent',
        default=False)
)
示例#4
0
from django.db import transaction, DatabaseError
from django.utils.translation import ugettext_lazy as _
from livesettings import * 
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.local_product', _('By Product Location')))
TAX_GROUP = config_get_group('TAX')
        
config_register(
     BooleanValue(TAX_GROUP,
         'TAX_SHIPPING',
         description=_("Tax Shipping?"),
         requires=TAX_MODULE,
         requiresvalue='tax.modules.local_product',
         default=False)
)

config_register(
     StringValue(TAX_GROUP,
         'TAX_CLASS',
         description=_("TaxClass for shipping"),
         help_text=_("Select a TaxClass that should be applied for shipments."),
         #TODO: [BJK] make this dynamic - doesn't work to have it be preloaded.
         default='Shipping'
     )
)

示例#5
0
from django.db import transaction, DatabaseError
from django.utils.translation import ugettext_lazy as _
from livesettings import *
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.area', _('By Country/Area')))
TAX_GROUP = config_get_group('TAX')

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

config_register(
    StringValue(
        TAX_GROUP,
        'TAX_CLASS',
        description=_("TaxClass for shipping"),
        help_text=_("Select a TaxClass that should be applied for shipments."),
        #TODO: [BJK] make this dynamic - doesn't work to have it be preloaded.
        default='Shipping'))
示例#6
0
from django.utils.translation import ugettext_lazy as _
from livesettings import *
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(("canada_tax", _("Canadian Tax Module")))

TAX_GROUP = config_get_group("TAX")

config_register(
    BooleanValue(
        TAX_GROUP,
        "TAX_SHIPPING_CANADIAN",
        description=_("Tax Shipping?"),
        requires=TAX_MODULE,
        requiresvalue="canada_tax",
        default=False,
    )
)
示例#7
0
from django.utils.translation import ugettext_lazy as _
from livesettings import * 
from tax.config import TAX_MODULE


TAX_MODULE.add_choice(('satchmoutils.tax.modules.noarea', _('No Area Tax')))
TAX_GROUP = config_get_group('TAX')


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

config_register(
     StringValue(TAX_GROUP,
         'TAX_CLASS',
         description=_("TaxClass for shipping"),
         help_text=_("Select a TaxClass that should be applied for shipments."),
         default='Shipping'
     )
)

config_register(
     BooleanValue(TAX_GROUP,
         'TAX_USE_ITEMPRICE',
         description=_("Use item full-price for tax?"),
示例#8
0
from django.db import transaction, DatabaseError
from django.utils.translation import ugettext_lazy as _
from livesettings import *
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.local_product', _('By Product Location')))
TAX_GROUP = config_get_group('TAX')

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

config_register(
    StringValue(
        TAX_GROUP,
        'TAX_CLASS',
        description=_("TaxClass for shipping"),
        help_text=_("Select a TaxClass that should be applied for shipments."),
        #TODO: [BJK] make this dynamic - doesn't work to have it be preloaded.
        default='Shipping'))
示例#9
0
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',
                 default="0"))

config_register(
    BooleanValue(TAX_GROUP,
                 'TAX_SHIPPING_PERCENT',
                 description=_("Tax Shipping?"),
                 requires=TAX_MODULE,
                 requiresvalue='tax.modules.percent',
                 default=False))
示例#10
0
from django.utils.translation import ugettext_lazy as _
from livesettings import *
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.vat', _('Value Added Tax')))  # VAT Europe
TAX_GROUP = config_get_group('TAX')

config_register(
    DecimalValue(TAX_GROUP,
        'PERCENT',
        description=_("Value Added Tax percent"),          # Normal tax
        requires=TAX_MODULE,
        requiresvalue='tax.modules.vat')
)

config_register(
    DecimalValue(TAX_GROUP,
        'REDUCEDVAT',
        description=_("Reduced Value Added Tax percent"),  # Basic food
        requires=TAX_MODULE,
        requiresvalue='tax.modules.vat')
)

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