forked from CGM_Public/pretix_original
Invoicing: Allow to show exchange rates based on sources/rules (#3122)
This commit is contained in:
34
src/pretix/base/migrations/0232_exchangerate.py
Normal file
34
src/pretix/base/migrations/0232_exchangerate.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 3.2.17 on 2023-02-14 15:34
|
||||
|
||||
import django.core.serializers.json
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pretixbase', '0231_auto_20230208_1546'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ExchangeRate',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False)),
|
||||
('source', models.CharField(max_length=100)),
|
||||
('source_date', models.DateField()),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
('source_currency', models.CharField(max_length=3)),
|
||||
('other_currency', models.CharField(max_length=3)),
|
||||
('rate', models.DecimalField(decimal_places=6, max_digits=16)),
|
||||
],
|
||||
options={
|
||||
'unique_together': {('source', 'source_currency', 'other_currency')},
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='invoice',
|
||||
name='foreign_currency_source',
|
||||
field=models.CharField(max_length=100, null=True),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user