From c7502939658f69947d7d27b801f77ca98ccb5bb8 Mon Sep 17 00:00:00 2001 From: Francois Gaudin Date: Mon, 9 Jan 2012 01:17:08 +0100 Subject: [PATCH] VAT 7% added --- autoentrepreneur/tests.py | 10 ++++++++++ project/models.py | 2 ++ 2 files changed, 12 insertions(+) diff --git a/autoentrepreneur/tests.py b/autoentrepreneur/tests.py index 82980eb..ea1f4f7 100644 --- a/autoentrepreneur/tests.py +++ b/autoentrepreneur/tests.py @@ -38,6 +38,16 @@ class SubscriptionTest(TestCase): def setUp(self): Subscription.objects.all().delete() today = datetime.date.today() + + limit_defined = SalesLimit.objects.filter(year=today.year).count() + if not limit_defined: + sale_limits = SalesLimit.objects.filter(year=2011) + for sl in sale_limits: + SalesLimit.objects.create(year=today.year, + activity=sl.activity, + limit=sl.limit, + limit2=sl.limit2) + # generate limit for next year sale_limits = SalesLimit.objects.filter(year=today.year) for sl in sale_limits: diff --git a/project/models.py b/project/models.py index 5a5bce4..6e52638 100644 --- a/project/models.py +++ b/project/models.py @@ -380,9 +380,11 @@ def update_project_state(sender, instance, created, **kwargs): (ROW_CATEGORY_PRODUCT, _('Product'))) VAT_RATES_19_6 = Decimal('19.6') +VAT_RATES_7 = Decimal('7') VAT_RATES_5_5 = Decimal('5.5') VAT_RATES_2_1 = Decimal('2.1') VAT_RATES = ((VAT_RATES_19_6, _('%s%%') % (localize(VAT_RATES_19_6))), + (VAT_RATES_7, _('%s%%') % (localize(VAT_RATES_7))), (VAT_RATES_5_5, _('%s%%') % (localize(VAT_RATES_5_5))), (VAT_RATES_2_1, _('%s%%') % (localize(VAT_RATES_2_1))),)