add loan details

This commit is contained in:
MahanCh
2025-04-13 22:51:21 +03:30
parent ac46886922
commit 39eb401575
11 changed files with 773 additions and 81 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using _0_Framework.Application;
using Microsoft.AspNetCore.Mvc.RazorPages;
@@ -7,7 +8,7 @@ namespace CompanyManagment.App.Contracts.Loan;
public interface ILoanApplication
{
List<LoanViewModel> GetSearchList(LoanSearchViewModel searchViewModel);
LoanViewModel GetDetails(long id);
Task<LoanDetailsViewModel> GetDetails(long id);
OperationResult Create(CreateLoanViewModel command);
List<LoanInstallmentViewModel> CalculateLoanInstallment(string amount , int installmentCount,string loanStartDate,bool getRounded);
OperationResult Remove(long id);

View File

@@ -0,0 +1,22 @@
using System.Collections.Generic;
namespace CompanyManagment.App.Contracts.Loan;
public class LoanDetailsViewModel
{
public long Id { get; set; }
public string EmployeeFullName { get; set; }
public string LoanGrantDate { get; set; }
public string InstallmentCount { get; set; }
public string TotalLoanAmount { get; set; }
public string TotalPaidAmount { get; set; }
public string TotalRemainingAmount { get; set; }
public List<LoanInstallmentDetailsViewModel> Installments { get; set; }
}
public class LoanInstallmentDetailsViewModel
{
public long Id { get; set; }
public string InstallmentDate { get; set; }
public string InstallmentAmount { get; set; }
public bool IsPaid { get; set; }
}