fix(pos): remove redundant opening balance dialog onchange handler#54591
fix(pos): remove redundant opening balance dialog onchange handler#54591ravibharathi656 wants to merge 1 commit intofrappe:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe pull request removes the per-row Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Issue:
In the POS Opening Entry dialog, when editing
balance_details.opening_amount, the value in the currently edited row resets to 0.Root Cause:
A custom
onChangehandler was implemented on the dialog’s child table that manually rewrote theopening_amountfield and triggered a full grid refresh. However, the dialog table fields already persist edits using the system’s built in grid control, making this handler redundant.https://github.com/frappe/frappe/blame/9d683f15c7c0ff73f8dcc7464a20c25530cf43c9/frappe/public/js/frappe/form/controls/base_control.js#L270
Additionally, the handler relied on a stale row context (
this), which caused the active row to refresh with an incorrect state, resulting in the value being reset.Backport needed v16, v15