feat: add cheque books and received cheques management
- Implemented ChequeBooksPage for viewing and filtering cheque books. - Added NewReceivedChequePage for recording received cheques. - Created ReceivedChequesPage for listing and managing received cheques. - Introduced API endpoints for bank accounts, cheque books, and received cheques. - Defined types for payments including bank accounts, cheque books, and received cheques.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace Distribution.Models
|
||||
{
|
||||
public class BankAccount : Template
|
||||
{
|
||||
public BankAccountType AccountType { get; set; }
|
||||
public string AccountName { get; set; } = string.Empty;
|
||||
|
||||
public string? BankName { get; set; }
|
||||
|
||||
public string? CashAccountTypeName { get; set; }
|
||||
|
||||
public string? AccountNumber { get; set; }
|
||||
public string CurrencyCode { get; set; } = "LKR";
|
||||
|
||||
public bool IsDefault { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
public class ChequeBook : Template
|
||||
{
|
||||
public string ChequeBookNo { get; set; } = string.Empty;
|
||||
|
||||
public int BranchId { get; set; }
|
||||
|
||||
public Guid FK_BankAccountId { get; set; }
|
||||
[ForeignKey("FK_BankAccountId")]
|
||||
public BankAccount? BankAccount { get; set; }
|
||||
|
||||
public string StartChequeNo { get; set; } = string.Empty;
|
||||
public string EndChequeNo { get; set; } = string.Empty;
|
||||
public int TotalLeaves { get; set; }
|
||||
public DateTime ReceivedDate { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
public ChequeBookStatus Status { get; set; } = ChequeBookStatus.Active;
|
||||
|
||||
public List<ChequePage> Pages { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
public class ChequePage : Template
|
||||
{
|
||||
public string ChequeNo { get; set; } = string.Empty;
|
||||
|
||||
public Guid FK_ChequeBookId { get; set; }
|
||||
[ForeignKey("FK_ChequeBookId")]
|
||||
public ChequeBook? ChequeBook { get; set; }
|
||||
|
||||
public ChequePageIssueStatus IssueStatus { get; set; } = ChequePageIssueStatus.Unused;
|
||||
|
||||
public PayeeType? PayeeType { get; set; }
|
||||
public int? PayeeId { get; set; }
|
||||
public string? PayeeName { get; set; }
|
||||
|
||||
public DateTime? IssueDate { get; set; }
|
||||
public decimal? Amount { get; set; }
|
||||
public string? CurrencyCode { get; set; }
|
||||
|
||||
public int? VoucherId { get; set; }
|
||||
public string? ReferenceNo { get; set; }
|
||||
public string? Purpose { get; set; }
|
||||
|
||||
public bool? IsCrossCheque { get; set; }
|
||||
public bool? IsAccountPayee { get; set; }
|
||||
public bool? IsPostDated { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
|
||||
public string? PrintedBy { get; set; }
|
||||
public DateTime? PrintedAt { get; set; }
|
||||
public DateTime? ClearedDate { get; set; }
|
||||
public bool? ClearedByBank { get; set; }
|
||||
public string? CancelReason { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -49,4 +49,20 @@ namespace Distribution.Models
|
||||
public enum TaxMode { Disabled, Optional, Mandatory }
|
||||
|
||||
public enum SerialStatus { InStock, Sold, Returned, Damaged }
|
||||
|
||||
public enum BankAccountType { Cash, Bank }
|
||||
|
||||
public enum ChequeBookStatus { Active, Completed, Cancelled }
|
||||
|
||||
public enum ChequePageIssueStatus { Unused, Issued, Cleared, Bounced, Cancelled, Void }
|
||||
|
||||
public enum ChequePageStatusAction { Clear, Bounce, Cancel, Void }
|
||||
|
||||
public enum PayeeType { Supplier, Customer, Employee, Other }
|
||||
|
||||
public enum ReceivedChequeStatus { Received, Deposited, Cleared, Returned, Cancelled }
|
||||
|
||||
public enum ReceivedChequeStatusAction { Deposit, Clear, Return, Cancel }
|
||||
|
||||
public enum ReceivedFromType { Customer, Supplier, Other }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
public class ReceivedCheque : Template
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
public int? BranchId { get; set; }
|
||||
|
||||
public ReceivedFromType ReceivedFromType { get; set; }
|
||||
public int? ReceivedFromId { get; set; }
|
||||
public string ReceivedFromName { get; set; } = string.Empty;
|
||||
|
||||
public string? DrawerBankName { get; set; }
|
||||
public string? DrawerBankBranch { get; set; }
|
||||
public string? AccountHolderName { get; set; }
|
||||
|
||||
public string ChequeNo { get; set; } = string.Empty;
|
||||
public DateTime ChequeDate { get; set; }
|
||||
public decimal Amount { get; set; }
|
||||
public DateTime ReceivedDate { get; set; }
|
||||
|
||||
public string? ReferenceType { get; set; }
|
||||
public int? ReferenceId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
|
||||
public ReceivedChequeStatus Status { get; set; } = ReceivedChequeStatus.Received;
|
||||
|
||||
public Guid? FK_DepositBankAccountId { get; set; }
|
||||
[ForeignKey("FK_DepositBankAccountId")]
|
||||
public BankAccount? DepositBankAccount { get; set; }
|
||||
|
||||
public DateTime? DepositDate { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user