document.addEventListener('DOMContentLoaded', function () {
    var copyModal = document.getElementById('copyModal');
    if (copyModal) {
        copyModal.addEventListener('show.bs.modal', function (e) {
            var btn = e.relatedTarget;
            document.getElementById('copyBudgetId').value   = btn.getAttribute('data-budget-id');
            document.getElementById('copyBudgetName').textContent = btn.getAttribute('data-budget-name');
        });
    }
});
