changes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,7 @@ def data_deletion(request):
|
||||
Contract.objects.all().delete()
|
||||
Product_Booked.objects.all().delete()
|
||||
Transaction_File.objects.all().delete()
|
||||
Transaction_Gift.objects.all().delete()
|
||||
Co_Ownership.objects.all().delete()
|
||||
Transaction_Current.objects.all().delete()
|
||||
Transaction_Discount.objects.all().delete()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.1.7 on 2026-01-27 09:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('app', '0371_alter_dealer_commission_amount_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='payment_schedule',
|
||||
name='amount_remain',
|
||||
field=models.DecimalField(decimal_places=2, max_digits=35, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='payment_schedule',
|
||||
name='penalty_remain',
|
||||
field=models.DecimalField(decimal_places=2, max_digits=35, null=True),
|
||||
),
|
||||
]
|
||||
@@ -1698,6 +1698,7 @@ class Payment_Schedule(AutoCodeModel):
|
||||
to_date = models.DateField(null=False)
|
||||
amount = models.DecimalField(max_digits=35, decimal_places=2)
|
||||
paid_amount = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
amount_remain = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
remain_amount = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
cycle = models.IntegerField(null=False)
|
||||
cycle_days = models.IntegerField(null=False)
|
||||
@@ -1711,6 +1712,7 @@ class Payment_Schedule(AutoCodeModel):
|
||||
ovd_days = models.IntegerField(null=True)
|
||||
penalty_amount = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
penalty_paid = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
penalty_remain = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
penalty_reduce = models.DecimalField(null=True, max_digits=35, decimal_places=2)
|
||||
create_time = models.DateTimeField(null=True, auto_now_add=True)
|
||||
update_time = models.DateTimeField(null=True, auto_now=True)
|
||||
|
||||
@@ -48,6 +48,14 @@ def resolve_value(expr, context):
|
||||
return now_in_context.date()
|
||||
return date.today()
|
||||
|
||||
if expr == "$today_str":
|
||||
now_val = context.get("now", datetime.now())
|
||||
if isinstance(now_val, datetime):
|
||||
return now_val.date().isoformat()
|
||||
elif isinstance(now_val, date):
|
||||
return now_val.isoformat()
|
||||
return date.today().isoformat()
|
||||
|
||||
if expr == "$now_iso":
|
||||
return datetime.now().isoformat(timespec='seconds')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user