-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from nadineproject/outstanding
Improve outstanding bill report performance and include 'total applied tax'
- Loading branch information
Showing
28 changed files
with
848 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
|
||
default_app_config = 'nadine.apps.NadineConfig' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.apps import AppConfig | ||
|
||
class NadineConfig(AppConfig): | ||
name = 'nadine' | ||
|
||
def ready(self): | ||
# Load and connect signal recievers | ||
import nadine.signals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 2.0.2 on 2018-02-12 21:13 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nadine', '0032_event_billing'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PaymentMethod', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(help_text='e.g., Stripe, Visa, cash, bank transfer', max_length=128)), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='payment', | ||
name='external_id', | ||
field=models.CharField(blank=True, help_text='ID used by payment service', max_length=128, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='payment', | ||
name='method', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='nadine.PaymentMethod'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 2.0.3 on 2018-04-06 18:37 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('nadine', '0033_payment_method'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='StripeBillingProfile', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('customer_email', models.EmailField(help_text='Customer email address used with Stripe customer record', max_length=254)), | ||
('customer_id', models.CharField(help_text='Stripe customer ID used for billing via Stripe', max_length=128)), | ||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Generated by Django 2.0.3 on 2018-04-13 23:26 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nadine', '0034_stripebillingprofile'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='LineItemTax', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('amount', models.DecimalField(decimal_places=2, max_digits=7)), | ||
('line_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nadine.BillLineItem')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='TaxRate', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(help_text='The name of the tax', max_length=256)), | ||
('percentage', models.DecimalField(decimal_places=2, help_text='Tax percentage', max_digits=3)), | ||
('resources', models.ManyToManyField(to='nadine.Resource')), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='lineitemtax', | ||
name='tax_rate', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nadine.TaxRate'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 2.0.3 on 2018-06-01 20:26 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nadine', '0035_auto_20180413_2326'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='userbill', | ||
name='cached_total_amount', | ||
field=models.DecimalField(decimal_places=2, default=0, max_digits=7), | ||
), | ||
migrations.AddField( | ||
model_name='userbill', | ||
name='cached_total_owed', | ||
field=models.DecimalField(decimal_places=2, default=0, max_digits=7), | ||
), | ||
migrations.AddField( | ||
model_name='userbill', | ||
name='cached_total_paid', | ||
field=models.DecimalField(decimal_places=2, default=0, max_digits=7), | ||
), | ||
migrations.AddField( | ||
model_name='userbill', | ||
name='cached_total_tax_amount', | ||
field=models.DecimalField(decimal_places=2, default=0, max_digits=7), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.