-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37d65d4
commit 4e90a4c
Showing
7 changed files
with
156 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,5 @@ __pycache__ | |
__pycache__/ | ||
venv/ | ||
env/ | ||
*/migrations/ | ||
postgres_data/ | ||
!.env.sample |
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,29 @@ | ||
# Generated by Django 4.1 on 2024-04-10 23:53 | ||
|
||
import colorfield.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='displayed_items', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('barcode', models.CharField(max_length=16, unique=True)), | ||
('display_name', models.CharField(max_length=125)), | ||
('display_info', models.CharField(blank=True, default='', max_length=125)), | ||
('display_color', colorfield.fields.ColorField(default='#575757', image_field=None, max_length=18, samples=None)), | ||
('variable_price', models.BooleanField()), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Displayed Item', | ||
}, | ||
), | ||
] |
Empty file.
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,64 @@ | ||
# Generated by Django 4.1 on 2024-04-10 23:53 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='department', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('department_name', models.CharField(max_length=32, unique=True)), | ||
('department_desc', models.TextField(blank=True)), | ||
('department_slug', models.SlugField(blank=True, max_length=32, unique=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='deposit', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('deposit_category', models.CharField(max_length=32, unique=True)), | ||
('deposit_desc', models.TextField(blank=True)), | ||
('deposit_value', models.DecimalField(decimal_places=2, max_digits=7)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Deposit Information', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='tax', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('tax_category', models.CharField(max_length=32, unique=True)), | ||
('tax_desc', models.TextField(blank=True)), | ||
('tax_percentage', models.DecimalField(decimal_places=3, max_digits=6, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Tax Information', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='product', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('barcode', models.CharField(max_length=16, unique=True)), | ||
('name', models.CharField(max_length=125)), | ||
('sales_price', models.DecimalField(decimal_places=2, max_digits=7)), | ||
('qty', models.IntegerField(default=0)), | ||
('cost_price', models.DecimalField(decimal_places=2, default=0, max_digits=7)), | ||
('product_desc', models.TextField(blank=True, null=True)), | ||
('department', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='inventory.department')), | ||
('deposit_category', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='inventory.deposit')), | ||
('tax_category', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='inventory.tax')), | ||
], | ||
), | ||
] |
Empty file.
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,63 @@ | ||
# Generated by Django 4.1 on 2024-04-10 23:53 | ||
|
||
from django.conf import settings | ||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='transaction', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('date_time', models.DateTimeField(auto_now_add=True)), | ||
('transaction_dt', models.DateTimeField(editable=False)), | ||
('transaction_id', models.CharField(editable=False, max_length=50, unique=True)), | ||
('total_sale', models.DecimalField(decimal_places=2, editable=False, max_digits=7)), | ||
('sub_total', models.DecimalField(decimal_places=2, editable=False, max_digits=7)), | ||
('tax_total', models.DecimalField(decimal_places=2, editable=False, max_digits=7, null=True)), | ||
('deposit_total', models.DecimalField(decimal_places=2, editable=False, max_digits=7, null=True)), | ||
('payment_type', models.CharField(choices=[('CASH', 'CASH'), ('DEBIT/CREDIT', 'DEBIT/CREDIT'), ('EBT', 'EBT')], editable=False, max_length=32)), | ||
('receipt', models.TextField(editable=False)), | ||
('products', models.TextField(editable=False)), | ||
('user', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.RESTRICT, to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Transactions', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='productTransaction', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('transaction_id_num', models.CharField(editable=False, max_length=50)), | ||
('transaction_date_time', models.DateTimeField(editable=False)), | ||
('barcode', models.CharField(editable=False, max_length=32)), | ||
('name', models.CharField(editable=False, max_length=125)), | ||
('department', models.CharField(editable=False, max_length=125, null=True)), | ||
('sales_price', models.DecimalField(decimal_places=2, editable=False, max_digits=7)), | ||
('qty', models.IntegerField(default=0, editable=False, null=True)), | ||
('cost_price', models.DecimalField(decimal_places=2, default=0, editable=False, max_digits=7, null=True)), | ||
('tax_category', models.CharField(editable=False, max_length=125)), | ||
('tax_percentage', models.DecimalField(decimal_places=3, max_digits=6, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])), | ||
('tax_amount', models.DecimalField(decimal_places=2, default=0, editable=False, max_digits=7, null=True)), | ||
('deposit_category', models.CharField(editable=False, max_length=125)), | ||
('deposit', models.DecimalField(decimal_places=2, max_digits=7)), | ||
('deposit_amount', models.DecimalField(decimal_places=2, default=0, editable=False, max_digits=7, null=True)), | ||
('payment_type', models.CharField(editable=False, max_length=32)), | ||
('transaction', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.RESTRICT, to='transaction.transaction')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'Product Transactions', | ||
}, | ||
), | ||
] |
Empty file.