Distribution_GL Initialization

This commit is contained in:
2026-10-20 13:07:07 +05:30
commit 3f16e0cb44
194 changed files with 35659 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
namespace General_Ledger_Service.DTOs.Bank
{
// Combined read shape for GET /bank-accounts?accountType=Cash|Bank|Both - BankAccount and
// CashAccount are separate tables (decided 2026-07-22), but a caller listing "cash and bank
// accounts" together needs one flat, filterable list rather than two separate calls.
public class CashAndBankAccountDto
{
public string AccountType { get; set; } = string.Empty; // "Cash" | "Bank"
public long AccountId { get; set; }
public string AccountName { get; set; } = string.Empty;
public string? BankName { get; set; } // Bank only
public string? CashAccountTypeName { get; set; } // Cash only
public string? AccountNumber { get; set; }
public long GlAccountId { get; set; }
public string GlAccountCode { get; set; } = string.Empty;
public string CurrencyCode { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
// Cash only - Bank accounts carry no such protection yet.
public bool? IsActive { get; set; }
public bool? IsDefault { get; set; }
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace General_Ledger_Service.DTOs.Bank
{
public class CreateBankAccountRequest
{
public string AccountName { get; set; } = string.Empty;
public string? BankName { get; set; }
public string? AccountNumber { get; set; }
public string? CurrencyCode { get; set; }
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace General_Ledger_Service.DTOs.Bank
{
public class CreateCashAccountRequest
{
public string AccountName { get; set; } = string.Empty;
// Matched case-insensitively against cash_account_type.name; a name that doesn't match
// an existing row causes a new one to be created on the fly (the frontend's "Other" flow).
public string CashAccountTypeName { get; set; } = string.Empty;
// Optional - if omitted, BankService.CreateCashAccountAsync auto-generates one.
public string? AccountNumber { get; set; }
public string? CurrencyCode { get; set; }
}
}
+16
View File
@@ -0,0 +1,16 @@
using General_Ledger_Service.Models;
namespace General_Ledger_Service.DTOs.Bank
{
public class ImportStatementLinesResponse
{
public List<BankStatementLine> Imported { get; set; } = [];
public List<FailedRow> FailedRows { get; set; } = [];
}
public class FailedRow
{
public int RowNumber { get; set; }
public string Reason { get; set; } = string.Empty;
}
}
@@ -0,0 +1,7 @@
namespace General_Ledger_Service.DTOs.Bank
{
public class ReconcileStatementLineRequest
{
public string MatchedJournalNo { get; set; } = string.Empty;
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace General_Ledger_Service.DTOs.Bank
{
// Rename only - CashAccountTypeId/GlAccountId/CurrencyCode are fixed at creation (changing
// them would mean re-pointing posted history at a different GL leaf). Always allowed, even
// on the default cash account - only delete/deactivate are blocked for that one.
public class UpdateCashAccountRequest
{
public string AccountName { get; set; } = string.Empty;
}
public class SetCashAccountStatusRequest
{
public bool IsActive { get; set; }
}
}