Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.0.48/prepare #891

Merged
merged 7 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public class GroupLoanAdditionals extends AbstractPersistableCustom {
private BigDecimal totalExternalLoanAmount;

@Column(name = "total_installments")
private Integer totalInstallments;
private BigDecimal totalInstallments;

@Column(name = "client_type")
private Long clientType;
Expand Down Expand Up @@ -258,7 +258,7 @@ public class GroupLoanAdditionals extends AbstractPersistableCustom {
protected GroupLoanAdditionals() {}

public GroupLoanAdditionals(Integer loanCycleCompleted, BigDecimal rentFee, BigDecimal mortgageFee, BigDecimal monthlyIncome,
BigDecimal familyExpenses, BigDecimal totalExternalLoanAmount, Integer totalInstallments, Long clientType,
BigDecimal familyExpenses, BigDecimal totalExternalLoanAmount, BigDecimal totalInstallments, Long clientType,
String houseHoldGoods, String businessActivities, Long businessLocation, Integer businessExperience, BigDecimal salesValue,
BigDecimal businessPurchases, BigDecimal businessProfit, BigDecimal clientProfit, BigDecimal inventories, Long visitBusiness,
Long familySupport, Long businessEvolution, Integer numberOfApprovals, String recommenderName,
Expand Down Expand Up @@ -352,7 +352,7 @@ public static GroupLoanAdditionals assembleFromJson(JsonCommand command, Loan lo
BigDecimal monthlyIncome = command.bigDecimalValueOfParameterNamed("monthlyIncome");
BigDecimal familyExpenses = command.bigDecimalValueOfParameterNamed("familyExpenses");
BigDecimal totalExternalLoanAmount = command.bigDecimalValueOfParameterNamed("totalExternalLoanAmount");
Integer totalInstallments = command.integerValueOfParameterNamed("totalInstallments");
BigDecimal totalInstallments = command.bigDecimalValueOfParameterNamed("totalInstallments");
Long clientType = command.longValueOfParameterNamed("clientType");
String houseHoldGoods = command.stringValueOfParameterNamed("houseHoldGoods");
String businessActivities = command.stringValueOfParameterNamed("businessActivities");
Expand Down Expand Up @@ -468,8 +468,8 @@ public Map<String, Object> update(final JsonCommand command) {
actualChanges.put("totalExternalLoanAmount", newValue);
this.totalExternalLoanAmount = newValue;
}
if (command.isChangeInIntegerParameterNamed("totalInstallments", this.totalInstallments)) {
final Integer newValue = command.integerValueOfParameterNamed("totalInstallments");
if (command.isChangeInBigDecimalParameterNamed("totalInstallments", this.totalInstallments)) {
final BigDecimal newValue = command.bigDecimalValueOfParameterNamed("totalInstallments");
actualChanges.put("totalInstallments", newValue);
this.totalInstallments = newValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,6 @@ private void createCalendar(final Loan loan, LocalDate calendarStartDate, Intege
public CommandProcessingResult modifyApplication(final Long loanId, final JsonCommand command) {

try {
AppUser currentUser = getAppUserIfPresent();
final Loan existingLoanApplication = retrieveLoanBy(loanId);
if (!existingLoanApplication.isSubmittedAndPendingApproval()) {
throw new LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified(loanId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,8 @@
</addColumn>
</changeSet>

<changeSet author="fineract" id="10">
<modifyDataType tableName="m_loan_additionals_group" columnName="total_installments" newDataType="DECIMAL(19,6)"/>
</changeSet>

</databaseChangeLog>
Loading