28 lines
887 B
Python
28 lines
887 B
Python
from decimal import Decimal
|
|
|
|
from django.conf import settings
|
|
from plans.taxation import TaxationPolicy
|
|
|
|
|
|
|
|
class SaudiTaxationPolicy(TaxationPolicy):
|
|
"""
|
|
Represents the taxation policy specific to Saudi Arabia.
|
|
|
|
This class inherits from TaxationPolicy and provides implementations
|
|
of methods to retrieve default tax, issuer country code, and tax rates
|
|
specific to Saudi Arabia. Typically used in scenarios involving
|
|
invoicing or taxation calculation for Saudi Arabia.
|
|
|
|
:ivar settings: Configuration settings of the application.
|
|
:type settings: module
|
|
"""
|
|
def get_default_tax(self):
|
|
return getattr(settings, 'PLANS_TAX', None)
|
|
|
|
def get_issuer_country_code(self):
|
|
return getattr(settings, 'PLANS_TAX_COUNTRY', None)
|
|
|
|
def get_tax_rate(self, tax_id, country_code, request=None):
|
|
rate = Decimal("15")
|
|
return rate |