add new fields (trans-date, pos-date, rancher)

This commit is contained in:
2025-09-28 13:38:35 +03:30
parent 1dd5afda88
commit 9e06985893
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# Generated by Django 5.0 on 2025-09-28 10:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('warehouse', '0034_inventoryquotasaleitem_livestock_statistic'),
]
operations = [
migrations.AddField(
model_name='inventoryquotasaletransaction',
name='pos_date',
field=models.PositiveBigIntegerField(default=0),
),
migrations.AddField(
model_name='inventoryquotasaletransaction',
name='rancher_fullname',
field=models.CharField(max_length=150, null=True),
),
migrations.AddField(
model_name='inventoryquotasaletransaction',
name='rancher_mobile',
field=models.CharField(max_length=25, null=True),
),
migrations.AddField(
model_name='inventoryquotasaletransaction',
name='transaction_date',
field=models.DateTimeField(auto_now_add=True, null=True),
),
]

View File

@@ -64,6 +64,8 @@ class InventoryQuotaSaleTransaction(BaseModel):
related_name='transactions',
null=True
)
rancher_fullname = models.CharField(max_length=150, null=True)
rancher_mobile = models.CharField(max_length=25, null=True)
pos_device = models.ForeignKey(
Device,
on_delete=models.CASCADE,
@@ -119,6 +121,8 @@ class InventoryQuotaSaleTransaction(BaseModel):
ref_num = models.CharField(max_length=50, null=True)
terminal = models.CharField(max_length=50, null=True)
payer_cart = models.CharField(max_length=50, null=True)
pos_date = models.PositiveBigIntegerField(default=0)
transaction_date = models.DateTimeField(auto_now_add=True, null=True)
free_sale_state = models.BooleanField(default=False)
pre_sale_state = models.BooleanField(default=False)
additional = models.JSONField(default=dict)