Add GL account configuration and role mapping entities

- Introduced GlAccountConfig entity for mapping accounting roles to GL account codes.
- Added GlAccountConfigConfiguration for database configuration of the singleton GL account mapping.
- Created GlAccountRole enum to define accounting roles used in GL postings.
- Enhanced error handling with new error codes for unconfigured and invalid GL accounts.
- Updated existing DbContext to include GlAccountConfig DbSet.
This commit is contained in:
2026-10-07 12:51:15 +05:30
parent 65976c5cd3
commit 614df3065d
7 changed files with 226 additions and 3 deletions
@@ -76,6 +76,10 @@ public static class ErrorCodes
public const string GlServiceUnavailable = "GL_SERVICE_UNAVAILABLE";
// General Ledger typed internal calls (GRN receipt/payment posting, docs/12 §5's deferred work)
public const string GlRequestFailed = "GL_REQUEST_FAILED";
// A posting flow needs a GL account whose role has no account mapped in gl_account_config.
public const string GlAccountNotConfigured = "GL_ACCOUNT_NOT_CONFIGURED";
// A submitted GL account mapping names an account GL does not have, or cannot post to.
public const string GlAccountInvalid = "GL_ACCOUNT_INVALID";
// Sales invoice payments
public const string SalesInvoiceNotPayable = "SALES_INVOICE_NOT_PAYABLE";