-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
441 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
window.validate_sort_code = function validate_sort_code(value) { | ||
// Remove any non-numeric characters | ||
value = value.replace(/\D/g, ''); | ||
|
||
// Ensure the value is no longer than 9 characters (123-123-123) | ||
if (value.length > 6) { | ||
value = value.slice(0, 6); | ||
} | ||
|
||
// Format the value as "12-34-56" | ||
if (value.length >= 2) { | ||
value = value.slice(0, 2) + "-" + value.slice(2); | ||
} | ||
if (value.length >= 5) { | ||
value = value.slice(0, 5) + "-" + value.slice(5); | ||
} | ||
|
||
return value; | ||
} | ||
|
||
window.validate_account_number = function validate_account_number(value) { | ||
// Remove any non-numeric characters | ||
value = value.replace(/\D/g, ''); | ||
|
||
// Ensure the value is no longer than 16 characters (1234-1234-1234-1234) | ||
if (value.length > 8) { | ||
value = value.slice(0, 8); | ||
} | ||
|
||
return value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
backend/migrations/0061_defaultvalues_invoice_from_address_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 5.1 on 2024-09-16 19:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("backend", "0060_user_require_change_password"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_address", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_city", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_company", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_country", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_county", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_from_name", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
backend/migrations/0062_defaultvalues_invoice_account_holder_name_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 5.1 on 2024-09-16 20:49 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("backend", "0061_defaultvalues_invoice_from_address_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_account_holder_name", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_account_number", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="defaultvalues", | ||
name="invoice_sort_code", | ||
field=models.CharField(blank=True, max_length=100, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.