diff --git a/resources/views/common/items/create.blade.php b/resources/views/common/items/create.blade.php
index 20397134d..31f43fdad 100644
--- a/resources/views/common/items/create.blade.php
+++ b/resources/views/common/items/create.blade.php
@@ -159,5 +159,22 @@
}
});
});
+
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('#tax_id').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
@endpush
diff --git a/resources/views/common/items/edit.blade.php b/resources/views/common/items/edit.blade.php
index 25f43f2b2..3ecf81db1 100644
--- a/resources/views/common/items/edit.blade.php
+++ b/resources/views/common/items/edit.blade.php
@@ -157,5 +157,22 @@
}
});
});
+
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('#tax_id').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
@endpush
diff --git a/resources/views/expenses/bills/create.blade.php b/resources/views/expenses/bills/create.blade.php
index 3e8657e7b..de079d96e 100644
--- a/resources/views/expenses/bills/create.blade.php
+++ b/resources/views/expenses/bills/create.blade.php
@@ -505,6 +505,23 @@
});
});
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('.tax-select2').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
+
function totalItem() {
$.ajax({
url: '{{ url("common/items/totalItem") }}',
diff --git a/resources/views/expenses/bills/edit.blade.php b/resources/views/expenses/bills/edit.blade.php
index 099f41e16..ddec63301 100644
--- a/resources/views/expenses/bills/edit.blade.php
+++ b/resources/views/expenses/bills/edit.blade.php
@@ -482,6 +482,23 @@
});
});
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('.tax-select2').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
+
function totalItem() {
$.ajax({
url: '{{ url("common/items/totalItem") }}',
diff --git a/resources/views/incomes/invoices/create.blade.php b/resources/views/incomes/invoices/create.blade.php
index f81940572..3790891f6 100644
--- a/resources/views/incomes/invoices/create.blade.php
+++ b/resources/views/incomes/invoices/create.blade.php
@@ -506,6 +506,23 @@
});
});
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('.tax-select2').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
+
function totalItem() {
$.ajax({
url: '{{ url("common/items/totalItem") }}',
diff --git a/resources/views/incomes/invoices/edit.blade.php b/resources/views/incomes/invoices/edit.blade.php
index 3f1489644..56834895d 100644
--- a/resources/views/incomes/invoices/edit.blade.php
+++ b/resources/views/incomes/invoices/edit.blade.php
@@ -482,6 +482,23 @@
});
});
+ $(document).on('hidden.bs.modal', '#modal-create-tax', function () {
+ $('.tax-select2').select2({
+ placeholder: {
+ id: '-1', // the value of the option
+ text: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
+ },
+ escapeMarkup: function (markup) {
+ return markup;
+ },
+ language: {
+ noResults: function () {
+ return ' {{ trans('general.title.new', ['type' => trans_choice('general.tax_rates', 1)]) }}';
+ }
+ }
+ });
+ });
+
function totalItem() {
$.ajax({
url: '{{ url("common/items/totalItem") }}',