// custom scripts /** * Hier fuellen wir die Buchungsperiode falls nichts eingetragen * */ $(document).ready(function() { // check data-item invoice-date and invoice-period.... date = $("input[data-item='invoice.date']"); period=$("input[data-item='invoice.period']"); if (period && date) { if (date.val()!="" && period.val()=="") { // no data - so build the period from 05.12.2020 part1=date.val().substring(6,10); part2=date.val().substring(3,5); newval=""+part1 +part2; $("input[data-item='invoice.period']").val(newval); } } });