fix date in payment and imporove contract page.

This commit is contained in:
aminhashemi92 2025-09-08 16:55:43 +03:30
parent af40e169ae
commit 204b0aa48e
14 changed files with 295 additions and 74 deletions

View file

@ -33,7 +33,7 @@ class ProfileAdmin(admin.ModelAdmin):
@admin.register(Company)
class CompanyAdmin(admin.ModelAdmin):
list_display = ['name', 'logo', 'signature', 'address', 'phone', 'broker']
list_display = ['name', 'logo', 'signature', 'address', 'phone', 'broker', 'registration_number']
prepopulated_fields = {'slug': ('name',)}
search_fields = ['name', 'address', 'phone']
list_filter = ['is_active', 'broker']

View file

@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-09-08 10:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0004_company_branch_name'),
]
operations = [
migrations.AddField(
model_name='company',
name='registration_number',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='شماره ثبت شرکت'),
),
]

View file

@ -0,0 +1,18 @@
# Generated by Django 5.2.4 on 2025-09-08 10:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0005_company_registration_number'),
]
operations = [
migrations.AddField(
model_name='company',
name='card_holder_name',
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='نام دارنده کارت'),
),
]

View file

@ -204,6 +204,12 @@ class Company(NameSlugModel):
blank=True,
verbose_name='شماره تماس'
)
registration_number = models.CharField(
max_length=255,
null=True,
blank=True,
verbose_name='شماره ثبت شرکت'
)
broker = models.OneToOneField(
Broker,
on_delete=models.SET_NULL,
@ -238,6 +244,12 @@ class Company(NameSlugModel):
)
]
)
card_holder_name = models.CharField(
max_length=255,
null=True,
verbose_name="نام دارنده کارت",
blank=True,
)
sheba_number = models.CharField(
max_length=30,
null=True,