Add voucher-line party (تفصیل) and allow cache-control CORS headers.
Supports accounting journal detail parties and preflight from the Vite client that sends Cache-Control/Pragma. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -137,6 +137,14 @@ class VoucherLine(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
voucher = models.ForeignKey(Voucher, on_delete=models.CASCADE, related_name='lines')
|
||||
account = models.ForeignKey(Account, on_delete=models.PROTECT, related_name='voucher_lines')
|
||||
# تفصیل / طرف حساب — who the line is with (optional for non-party accounts)
|
||||
party = models.ForeignKey(
|
||||
Party,
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name='voucher_lines',
|
||||
)
|
||||
description = models.CharField(max_length=255, blank=True, default='')
|
||||
debit = models.FloatField(default=0)
|
||||
credit = models.FloatField(default=0)
|
||||
|
||||
Reference in New Issue
Block a user