Invoice customization fixed some css and js issue

This commit is contained in:
Batuhan Baş
2018-10-18 11:34:41 +03:00
parent 4eaf2692aa
commit 3a97008a6e
3 changed files with 26 additions and 3 deletions

18
public/js/app.js vendored
View File

@ -197,6 +197,8 @@ $(document).ready(function () {
return true;
});
$('.input-group-invoice-text select').select2();
});
function confirmDelete(form_id, title, message, button_cancel, button_delete) {
@ -292,6 +294,22 @@ $(document).on('change', '.input-group-recurring #recurring_frequency', function
}
});
$(document).on('change', '.input-group-invoice-text select', function () {
var invoice_text_custom = $(this).parent().parent().parent().find('input');
if ($(this).val() == 'custom') {
$(this).parent().parent().removeClass('col-md-12').addClass('col-md-6');
invoice_text_custom.parent().removeClass('hidden');
$(this).select2();
} else {
$(this).parent().parent().removeClass('col-md-6').addClass('col-md-12');
invoice_text_custom.parent().addClass('hidden');
}
});
function convertDateFormat(date, split_character) {
var result = [];
var formats = {