fix: filter cost_center in transaction_mappings to non-group nodes

A group Cost Center selected here would silently pass on save but fail at
PE/JE creation during reconciliation with "Cannot select a Group type Cost
Center". set_query on the child-table field hides group nodes from the
dropdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ali 2026-05-13 10:44:27 +00:00
parent 39c8733099
commit a6687da894
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ frappe.ui.form.on('Kapital Bank Settings', {
frm.set_query('customer_group', 'customer_mappings', leaf);
frm.set_query('territory', 'customer_mappings', leaf);
frm.set_query('supplier_group', 'supplier_mappings', leaf);
frm.set_query('cost_center', 'transaction_mappings', leaf);
},
refresh(frm) {