fix fish variz name, dalilrad, sms, bale

This commit is contained in:
javad committed 2026-10-11 15:19:58 +03:30
1 parent 90931a5a64
commit 35a1ec1794
30 files changed
+674 -39

No files matched your search

@@ -0,0 +1,18 @@
# Generated by Django 5.1.1 on 2026-10-11 11:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notifications', '0018_alter_smstemplate_body'),
]
operations = [
migrations.AlterField(
model_name='smstemplate',
name='event_type',
field=models.CharField(choices=[('CUSTOMER_TICKET_CREATED', 'ثبت تیکت توسط مشتری'), ('STAFF_TICKET_CREATED', 'ثبت تیکت توسط کارشناس'), ('STAFF_REPLY', 'پاسخ کارشناس'), ('PAYMENT_NOTICE_CREATED', 'صدور اعلامیه واریز'), ('PAYMENT_RECEIPT_APPROVED', 'تأیید نهایی فیش واریز'), ('PAYMENT_RECEIPT_REJECTED', 'رد فیش واریز'), ('UNIT_SUPERVISOR_NEW_TICKET', 'اطلاع تیکت جدید به سرپرستان واحد')], max_length=50),
),
]
@@ -0,0 +1,17 @@
from django.db import migrations
def seed_rejection_template(apps, schema_editor):
template = apps.get_model('notifications', 'SMSTemplate')
template.objects.using(schema_editor.connection.alias).get_or_create(
unit=None, event_type='PAYMENT_RECEIPT_REJECTED', defaults={
'title': 'رد فیش واریز', 'is_active': True,
'body': 'فیش واریزی {receipt_number} به مبلغ {amount_rial} ریال رد شد.\nدلیل کارشناس: {rejection_reason}\nاصلاح و ارسال دوباره فیش: {payment_link}\n{company_name}',
'allowed_tags': ['recipient_name', 'company_name', 'notice_number', 'receipt_number',
'amount_rial', 'invoice_number', 'payment_link', 'rejection_reason'],
})
class Migration(migrations.Migration):
dependencies = [('notifications', '0019_alter_smstemplate_event_type')]
operations = [migrations.RunPython(seed_rejection_template, migrations.RunPython.noop)]