diff --git a/app/Http/Requests/Setting/Setting.php b/app/Http/Requests/Setting/Setting.php
index 37277dfb0..c87881d20 100644
--- a/app/Http/Requests/Setting/Setting.php
+++ b/app/Http/Requests/Setting/Setting.php
@@ -41,6 +41,10 @@ class Setting extends FormRequest
break;
}
+ if ($this->request->has('number_digit')) {
+ $rules['number_digit'] = 'required|integer|min:1|max:20';
+ }
+
return $rules;
}
diff --git a/app/View/Components/Form/Group/NumberDigit.php b/app/View/Components/Form/Group/NumberDigit.php
new file mode 100644
index 000000000..9078750fa
--- /dev/null
+++ b/app/View/Components/Form/Group/NumberDigit.php
@@ -0,0 +1,57 @@
+name)) {
+ $this->name = 'number_digit';
+ }
+
+ if (empty($this->label)) {
+ $this->label = trans('settings.invoice.digit');
+ }
+
+ $this->number_digits = [
+ '1' => '1',
+ '2' => '2',
+ '3' => '3',
+ '4' => '4',
+ '5' => '5',
+ '6' => '6',
+ '7' => '7',
+ '8' => '8',
+ '9' => '9',
+ '10' => '10',
+ '11' => '11',
+ '12' => '12',
+ '13' => '13',
+ '14' => '14',
+ '15' => '15',
+ '16' => '16',
+ '17' => '17',
+ '18' => '18',
+ '19' => '19',
+ '20' => '20',
+ ];
+
+ if (empty($this->selected) && empty($this->getParentData('model'))) {
+ $this->selected = setting('invoice.number_digit');
+ }
+
+ return view('components.form.group.number_digit');
+ }
+}
diff --git a/resources/views/components/form/group/number_digit.blade.php b/resources/views/components/form/group/number_digit.blade.php
new file mode 100644
index 000000000..020fb4b29
--- /dev/null
+++ b/resources/views/components/form/group/number_digit.blade.php
@@ -0,0 +1,13 @@
+
diff --git a/resources/views/settings/invoice/edit.blade.php b/resources/views/settings/invoice/edit.blade.php
index bf868b7ae..c98213104 100644
--- a/resources/views/settings/invoice/edit.blade.php
+++ b/resources/views/settings/invoice/edit.blade.php
@@ -14,7 +14,7 @@
-
+