2016-08-26 18:56:16 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2024-06-24 11:07:36 +00:00
|
|
|
import django.db.models.deletion
|
2016-08-26 18:56:16 +00:00
|
|
|
from django.conf import settings
|
2024-06-24 11:07:36 +00:00
|
|
|
from django.db import migrations, models
|
|
|
|
|
2016-08-26 18:56:16 +00:00
|
|
|
import accounting.models
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2018-10-04 19:29:19 +00:00
|
|
|
("counter", "0001_initial"),
|
2016-08-26 18:56:16 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2018-10-04 19:29:19 +00:00
|
|
|
name="CashRegisterSummary",
|
2016-08-26 18:56:16 +00:00
|
|
|
fields=[
|
2018-10-04 19:29:19 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("date", models.DateTimeField(verbose_name="date")),
|
|
|
|
(
|
|
|
|
"comment",
|
|
|
|
models.TextField(null=True, verbose_name="comment", blank=True),
|
|
|
|
),
|
|
|
|
("emptied", models.BooleanField(default=False, verbose_name="emptied")),
|
|
|
|
(
|
|
|
|
"counter",
|
|
|
|
models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
to="counter.Counter",
|
|
|
|
related_name="cash_summaries",
|
|
|
|
verbose_name="counter",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
related_name="cash_summaries",
|
|
|
|
verbose_name="user",
|
|
|
|
),
|
|
|
|
),
|
2016-08-26 18:56:16 +00:00
|
|
|
],
|
2018-10-04 19:29:19 +00:00
|
|
|
options={"verbose_name": "cash register summary"},
|
2016-08-26 18:56:16 +00:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2018-10-04 19:29:19 +00:00
|
|
|
name="CashRegisterSummaryItem",
|
2016-08-26 18:56:16 +00:00
|
|
|
fields=[
|
2018-10-04 19:29:19 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
verbose_name="ID",
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
auto_created=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"value",
|
|
|
|
accounting.models.CurrencyField(
|
|
|
|
max_digits=12, verbose_name="value", decimal_places=2
|
|
|
|
),
|
|
|
|
),
|
|
|
|
("quantity", models.IntegerField(default=0, verbose_name="quantity")),
|
|
|
|
("check", models.BooleanField(default=False, verbose_name="check")),
|
|
|
|
(
|
|
|
|
"cash_summary",
|
|
|
|
models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
to="counter.CashRegisterSummary",
|
|
|
|
related_name="items",
|
|
|
|
verbose_name="cash summary",
|
|
|
|
),
|
|
|
|
),
|
2016-08-26 18:56:16 +00:00
|
|
|
],
|
2018-10-04 19:29:19 +00:00
|
|
|
options={"verbose_name": "cash register summary item"},
|
2016-08-26 18:56:16 +00:00
|
|
|
),
|
|
|
|
migrations.AlterField(
|
2018-10-04 19:29:19 +00:00
|
|
|
model_name="permanency",
|
|
|
|
name="counter",
|
|
|
|
field=models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
to="counter.Counter",
|
|
|
|
related_name="permanencies",
|
|
|
|
verbose_name="counter",
|
|
|
|
),
|
2016-08-26 18:56:16 +00:00
|
|
|
),
|
|
|
|
migrations.AlterField(
|
2018-10-04 19:29:19 +00:00
|
|
|
model_name="permanency",
|
|
|
|
name="user",
|
|
|
|
field=models.ForeignKey(
|
2019-10-05 22:32:54 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2018-10-04 19:29:19 +00:00
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
related_name="permanencies",
|
|
|
|
verbose_name="user",
|
|
|
|
),
|
2016-08-26 18:56:16 +00:00
|
|
|
),
|
|
|
|
]
|