from decimal import Decimal
from django.db import models

CURRENCY_DICT = {
	'CA': 'CAD',
	'US': 'USD',
	'NG': 'NGN',
	'GB': 'GBP'
}

# Countries with Simple Taxes
SIMPLE_TAX_COUNTRIES = {
	'GB': 'GREAT BRITAIN',
	'NG': 'NIGERIA'
}

# Countries which do not have their 
# taxes broken up by city. Do not include 
# a country in this list of it is also a 
# simple tax country
NON_CITY_COUNTRIES = {
	'CA': 'CANADA'
}

TAXES = {
	'CA': {
		'DEFAULT': Decimal('0.05'), # Federal Goods and Services Tax
		# GST => Goods and Services Tax
		# HST => Harmonized Sales Tax
		# PST => Provincial Sales Tax
		# QST => Quebec Sales Tax
		# RST => Retail Sales Tax
		'AB': {
			'MEALS': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': None
			},
			'SALES': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': None,
			}
		},
		'BC': {
			'MEALS': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': None
			},
			'SALES': {
				'GST': Decimal('0.05'),
				'PST': Decimal('0.07'),
				'HST': None
			}
		},
		'MB': {
			'MEALS': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': Decimal('0.08') # Also Provincial Sales Tax
			},
			'SALES': {
				'GST': Decimal('0.05'),
				'PST': Decimal('0.08'),
				'HST': None
			}
		},
		'NB': {
			'MEALS': {
				'GST': None,
				'HST': Decimal('0.13'),
				'PST': None
			},
			'SALES': {
				'GST': None,
				'PST': None,
				'HST': Decimal('0.14')
			}
		},
		'NL': {
			'MEALS': {
				'GST': None,
				'HST': Decimal('0.13'),
				'PST': None
			},
			'SALES': {
				'GST': None,
				'PST': None,
				'HST': Decimal('0.13')
			}
		},
		'NS': {
			'MEALS': {
				'GST': None,
				'HST': Decimal('0.15'),
				'PST': None
			}
		},
		'NU': {
			'MEALS': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': None
			},
			'SALES': {
				'GST': Decimal('0.05'),
				'PST': None,
				'HST': None
			}
		},
		'NT': {
			'MEALS': {
				'GST': Decimal('0.05'),
				'HST': None,
				'PST': None
			},
			'SALES': {
				'GST': Decimal('0.05'),
				'PST': None,
				'HST': None
			}
		},
		'ON': {
			'MEALS': { # Exception for meals under $4. Then effective tax rate is only 5%
				'GST': None,
				'HST': Decimal('0.13'),
				'PST': None
			},
			'SALES': {
				'GST': None,
				'PST': None,
				'HST': Decimal('0.13')
			}
		},
		'PE': {
			'MEALS': {
				'GST': None,
				'HST': Decimal('0.14'),
				'PST': None
			},
			'SALES': {
				'GST': None,