modify accounting model

This commit is contained in:
2017-02-11 10:23:03 +01:00
parent 9f6477e5f1
commit a8b9e7e61e
6 changed files with 65 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-11 09:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('billard', '0011_auto_20170210_2122'),
]
operations = [
migrations.RemoveField(
model_name='accounting',
name='client',
),
migrations.DeleteModel(
name='Accounting',
),
]

View File

@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-11 09:03
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('billard', '0012_auto_20170211_1003'),
]
operations = [
migrations.CreateModel(
name='Accounting',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time_from', models.DateTimeField(verbose_name='Beginn')),
('time_to', models.DateTimeField(blank=True, null=True, verbose_name='Ende')),
('prize', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True, verbose_name='Preis')),
('billed', models.BooleanField(default=False, verbose_name='Abgerechnet')),
('desk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='billard.Desk', verbose_name='Tisch')),
],
options={
'verbose_name_plural': 'Buchhaltungseinträge',
'verbose_name': 'Buchhaltungseintrag',
'ordering': ['-time_from'],
},
),
]