diff --git a/app/Services/SerialNumberFormatter.php b/app/Services/SerialNumberFormatter.php index 3ffe9bbc..253a6804 100644 --- a/app/Services/SerialNumberFormatter.php +++ b/app/Services/SerialNumberFormatter.php @@ -156,7 +156,7 @@ class SerialNumberFormatter public static function getPlaceholders(string $format) { - $regex = "/{{([A-Z_]{1,})(?::)?([a-zA-Z0-9_]{1,4}|.{1})?}}/"; + $regex = "/{{([A-Z_]{1,})(?::)?([a-zA-Z0-9_]{1,6}|.{1})?}}/"; preg_match_all($regex, $format, $placeholders); array_shift($placeholders); diff --git a/resources/scripts/locales/en.json b/resources/scripts/locales/en.json index cf1e9ae5..ce238a05 100644 --- a/resources/scripts/locales/en.json +++ b/resources/scripts/locales/en.json @@ -861,7 +861,7 @@ "component": "Component", "Parameter": "Parameter", "series": "Series", - "series_description": "To set a static prefix/postfix like 'INV' across your company. It supports character length of up to 4 chars.", + "series_description": "To set a static prefix/postfix like 'INV' across your company. It supports character length of up to 6 chars.", "series_param_label": "Series Value", "delimiter": "Delimiter", "delimiter_description": "Single character for specifying the boundary between 2 separate components. By default its set to -", @@ -870,7 +870,7 @@ "date_format_description": "A local date and time field which accepts a format parameter. The default format: 'Y' renders the current year.", "date_format_param_label": "Format", "sequence": "Sequence", - "sequence_description": "Consecutive sequence of numbers across your company. You can specify the length on the given paramter.", + "sequence_description": "Consecutive sequence of numbers across your company. You can specify the length on the given parameter.", "sequence_param_label": "Sequence Length", "customer_series": "Customer Series", "customer_series_description": "To set a different prefix/postfix for each customer.", @@ -878,7 +878,7 @@ "customer_sequence_description": "Consecutive sequence of numbers for each of your customer.", "customer_sequence_param_label": "Sequence Length", "random_sequence": "Random Sequence", - "random_sequence_description": "Random alphanumeric string. You can specify the length on the given paramter.", + "random_sequence_description": "Random alphanumeric string. You can specify the length on the given parameter.", "random_sequence_param_label": "Sequence Length", "invoices": { "title": "Invoices", diff --git a/resources/scripts/views/settings/customization/NumberCustomizer.vue b/resources/scripts/views/settings/customization/NumberCustomizer.vue index 58967933..5cb10811 100644 --- a/resources/scripts/views/settings/customization/NumberCustomizer.vue +++ b/resources/scripts/views/settings/customization/NumberCustomizer.vue @@ -386,8 +386,8 @@ function removeComponent(component) { function onUpdate(val, element) { switch (element.name) { case 'SERIES': - if (val.length >= 4) { - val = val.substring(0, 4) + if (val.length >= 6) { + val = val.substring(0, 6) } break case 'DELIMITER':