feat: add General Ledger integration and financial reporting features

- Implemented General Ledger client component for managing GL integration.
- Created a dedicated page for General Ledger configuration.
- Developed Finance Report client component for generating various financial reports.
- Added report blocks for structured display of financial data.
- Introduced API endpoints for fetching GL accounts and financial reports.
- Updated navigation to include links for GL integration and financial reports.
- Enhanced permissions to manage GL and view financial reports.
- Updated appsettings to include General Ledger API configuration.
This commit is contained in:
2026-10-20 18:54:30 +05:30
parent cc33ecdd54
commit ca81e9bc42
32 changed files with 8786 additions and 134 deletions
+10
View File
@@ -11,6 +11,7 @@ using Distribution.Features.ChequeBook;
using Distribution.Features.ReceivedCheque;
using Distribution.Features.DriverComplianceConfig;
using Distribution.Features.DriverProfile;
using Distribution.Features.GeneralLedger;
using Distribution.Features.Grn;
using Distribution.Features.Item;
using Distribution.Features.ShopPO;
@@ -141,6 +142,8 @@ builder.Services.AddScoped<ChequeBookService>();
builder.Services.AddScoped<ReceivedChequeService>();
builder.Services.AddScoped<SupplierPaymentService>();
builder.Services.AddScoped<SysConfigService>();
builder.Services.AddScoped<GlSetupService>();
builder.Services.AddScoped<GlPostingService>();
builder.Services.AddMemoryCache();
builder.Services.AddHttpContextAccessor();
@@ -150,6 +153,13 @@ builder.Services.AddHttpClient<IAuthHexClient, AuthHexClient>(client =>
var baseUrl = builder.Configuration["AuthHex:BaseUrl"] ?? throw new InvalidOperationException("AuthHex:BaseUrl is not configured.");
client.BaseAddress = new Uri(baseUrl);
});
builder.Services.AddHttpClient<IGeneralLedgerClient, GeneralLedgerClient>(client =>
{
var baseUrl = builder.Configuration["GeneralLedger:BaseUrl"] ?? throw new InvalidOperationException("GeneralLedger:BaseUrl is not configured.");
var apiKey = builder.Configuration["GeneralLedger:ApiKey"] ?? throw new InvalidOperationException("GeneralLedger:ApiKey is not configured.");
client.BaseAddress = new Uri(baseUrl);
client.DefaultRequestHeaders.Add("X-Api-Key", apiKey);
});
builder.Services.AddScoped<IPermissionRepository, PermissionRepository>();
builder.Services.AddScoped<IScopeRepository, ScopeRepository>();
builder.Services.AddScoped<IPermissionService, PermissionService>();