mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 16:38:41 +00:00
Move the get_gl_dict/add_gl_entry logic from AccountsController/StockController into free functions in accounts/services/gl_entry_builder.py with doc as first arg. BaseGLComposer gains get_gl_dict and add_gl_entry methods that delegate to the free functions — GL composers now call self.get_gl_dict/self.add_gl_entry directly without going through the doc. AccountsController and StockController keep thin shims for backward compatibility with unrefactored callers. Also move update_gl_dict_with_regional_fields and update_gl_dict_with_app_based_fields to gl_entry_builder.py, re-exporting them from accounts_controller.py to avoid a circular import.