Repository navigation
MX-644: Fix Fineract module imports #152
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,11 @@ | |
|
|
||
| import java.math.BigDecimal; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.apache.fineract.baseteller.data.TransactionReversalData.Check; | ||
| import org.apache.fineract.commands.service.CommandWrapperBuilder; | ||
| import org.apache.fineract.infrastructure.core.service.DateUtils; | ||
| import org.springframework.jdbc.core.JdbcTemplate; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
|
|
@@ -143,6 +145,35 @@ public String reverse(Source source, String key) { | |
| source.transactionId()))) | ||
| throw TransactionReversalPlatformService.invalid( | ||
| "native.not.reversed", "Native savings undo did not reverse the original."); | ||
| // Release checks from custody so end-of-day closing no longer lists them as available. | ||
| for (var check : source.checks()) { | ||
| Map<String, Object> deposit = | ||
| jdbc.queryForMap( | ||
| "SELECT d.id deposit_id, d.client_id client_id, cd.check_type check_type" | ||
| + " FROM m_base_teller_deposit_check_detail cd" | ||
| + " JOIN m_base_teller_deposit d ON d.id = cd.deposit_id" | ||
| + " WHERE cd.id = ?", | ||
| check.id()); | ||
| jdbc.update( | ||
| "INSERT INTO m_base_teller_returned_check" | ||
| + " (deposit_id,deposit_check_detail_id,client_id,savings_account_id,check_type," | ||
| + " check_bank,check_number,amount,currency_code,office_id,teller_id,cashier_id," | ||
| + " returned_on_date,return_reason,status)" | ||
| + " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,NULL,'RETURNED')", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not record reversed deposit checks as payable returned checks. The reversal
Neither path excludes reversal-generated rows. The status enum has no non-payable value. Record the custody release with a disposition that:
Add a test that reverses a cleared check deposit, then attempts to settle the generated row. The settlement must be rejected.
|
||
| deposit.get("deposit_id"), | ||
| check.id(), | ||
| deposit.get("client_id"), | ||
| source.accountId(), | ||
| deposit.get("check_type"), | ||
| check.bank(), | ||
| check.checkNumber(), | ||
| check.amount(), | ||
| source.currency(), | ||
| source.officeId(), | ||
| null, | ||
| source.cashierId(), | ||
| DateUtils.getBusinessLocalDate()); | ||
| } | ||
| return "SAVINGS_TRANSACTION:" + source.transactionId(); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the Fineract segment of
ENGINE_VERSIONto match the bumped dependency.ENGINE_VERSIONembeds the Fineract version after the algorithm label. The calculator passes it into results, and the audit service passes it into recorded evidence. The bump to0.0.1704-246e08aleaves that segment at0.0.1628-bc1c598, so new simulations and audit records name a dependency version that is no longer in use. Update the segment. Keep the algorithm label unchanged unless the calculation logic changed.Suggested fix