FINERACT-2098: Currency data needed in loan transaction for UI
This commit is contained in:
committed by
Adam Saghy
parent
b482fbd447
commit
f17a0965db
+23
@@ -76,6 +76,29 @@ final class LoanTransactionsApiResourceSwagger {
|
||||
@Schema(example = "[2009, 8, 1]")
|
||||
public LocalDate date;
|
||||
public GetLoansTotal total;
|
||||
|
||||
@Schema(example = "200.000000")
|
||||
public Double amount;
|
||||
|
||||
public GetLoanCurrency currency;
|
||||
}
|
||||
|
||||
public static final class GetLoanCurrency {
|
||||
|
||||
private GetLoanCurrency() {}
|
||||
|
||||
@Schema(example = "UGX")
|
||||
public String code;
|
||||
@Schema(example = "Uganda Shilling")
|
||||
public String name;
|
||||
@Schema(example = "2")
|
||||
public Integer decimalPlaces;
|
||||
@Schema(example = "USh")
|
||||
public String displaySymbol;
|
||||
@Schema(example = "currency.UGX")
|
||||
public String nameCode;
|
||||
@Schema(example = "Uganda Shilling (USh)")
|
||||
public String displayLabel;
|
||||
}
|
||||
|
||||
@Schema(description = "GetLoansLoanIdTransactionsTransactionIdResponse")
|
||||
|
||||
+7
-13
@@ -20,10 +20,13 @@ package org.apache.fineract.portfolio.loanaccount.data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Getter;
|
||||
import org.apache.fineract.organisation.monetary.data.CurrencyData;
|
||||
|
||||
/**
|
||||
* Immutable data object representing a loan transaction.
|
||||
*/
|
||||
@Getter
|
||||
public class LoanApprovalData {
|
||||
|
||||
private final LocalDate approvalDate;
|
||||
@@ -36,6 +39,7 @@ public class LoanApprovalData {
|
||||
private String dateFormat;
|
||||
private String locale;
|
||||
private transient Integer rowIndex;
|
||||
private CurrencyData currency;
|
||||
|
||||
public static LoanApprovalData importInstance(LocalDate approvedOnDate, Integer rowIndex, String locale, String dateFormat) {
|
||||
return new LoanApprovalData(approvedOnDate, rowIndex, locale, dateFormat);
|
||||
@@ -52,22 +56,12 @@ public class LoanApprovalData {
|
||||
this.netDisbursalAmount = null;
|
||||
}
|
||||
|
||||
public LoanApprovalData(final BigDecimal approvalAmount, final LocalDate approvalDate, final BigDecimal netDisbursalAmount) {
|
||||
public LoanApprovalData(final BigDecimal approvalAmount, final LocalDate approvalDate, final BigDecimal netDisbursalAmount,
|
||||
final CurrencyData currency) {
|
||||
this.approvalDate = approvalDate;
|
||||
this.approvalAmount = approvalAmount;
|
||||
this.netDisbursalAmount = netDisbursalAmount;
|
||||
}
|
||||
|
||||
public LocalDate getApprovalDate() {
|
||||
return this.approvalDate;
|
||||
}
|
||||
|
||||
public BigDecimal getApprovalAmount() {
|
||||
return this.approvalAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getNetDisbursalAmount() {
|
||||
return this.netDisbursalAmount;
|
||||
this.currency = currency;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-2
@@ -300,14 +300,13 @@ public class LoanTransactionData {
|
||||
public static LoanTransactionData loanTransactionDataForDisbursalTemplate(final LoanTransactionEnumData transactionType,
|
||||
final LocalDate expectedDisbursedOnLocalDateForTemplate, final BigDecimal disburseAmountForTemplate,
|
||||
final BigDecimal netDisbursalAmount, final Collection<PaymentTypeData> paymentOptions, final BigDecimal retriveLastEmiAmount,
|
||||
final LocalDate possibleNextRepaymentDate) {
|
||||
final LocalDate possibleNextRepaymentDate, final CurrencyData currency) {
|
||||
final Long id = null;
|
||||
final Long loanId = null;
|
||||
final ExternalId externalLoanId = ExternalId.empty();
|
||||
final Long officeId = null;
|
||||
final String officeName = null;
|
||||
final PaymentDetailData paymentDetailData = null;
|
||||
final CurrencyData currency = null;
|
||||
final BigDecimal unrecognizedIncomePortion = null;
|
||||
final BigDecimal principalPortion = null;
|
||||
final BigDecimal interestPortion = null;
|
||||
|
||||
Reference in New Issue
Block a user