fix - device pre register & exception handling with json response

This commit is contained in:
2025-11-09 14:35:14 +03:30
parent 0c5142aff3
commit c0f289284f
7 changed files with 118 additions and 9 deletions

View File

@@ -66,8 +66,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)
rancher_fullname = models.CharField(max_length=150, null=True, blank=True)
rancher_mobile = models.CharField(max_length=25, null=True, blank=True)
pos_device = models.ForeignKey(
Device,
on_delete=models.CASCADE,
@@ -119,10 +119,10 @@ class InventoryQuotaSaleTransaction(BaseModel):
)
transaction_status = models.CharField(choices=status_type, max_length=25, null=True)
transaction_status_code = models.IntegerField(default=0)
result_text = models.TextField(null=True)
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)
result_text = models.TextField(null=True, blank=True)
ref_num = models.CharField(max_length=50, null=True, blank=True)
terminal = models.CharField(max_length=50, null=True, blank=True)
payer_cart = models.CharField(max_length=50, null=True, blank=True)
pos_date = models.PositiveBigIntegerField(default=0)
transaction_date = models.DateTimeField(auto_now_add=True, null=True)
free_sale_state = models.BooleanField(default=False)