FINERACT-1971: Down payment (auto) transaction using installment multiples of setting

This commit is contained in:
Jose Alberto Hernandez
2024-05-07 11:45:10 +02:00
committed by Adam Saghy
parent 7499859d39
commit 849790ea46
18 changed files with 582 additions and 371 deletions
@@ -1581,23 +1581,23 @@ Feature: LoanCharge
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 January 2023 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 750.0 |
| 01 January 2023 | Down Payment | 187.5 | 187.5 | 0.0 | 0.0 | 0.0 | 562.5 |
| 01 February 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 312.5 |
| 01 March 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 62.5 |
| 01 April 2023 | Repayment | 250.0 | 62.5 | 0.0 | 0.0 | 0.0 | 0.0 |
| 05 April 2023 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 62.5 |
| 01 January 2023 | Down Payment | 188.0 | 188.0 | 0.0 | 0.0 | 0.0 | 562.0 |
| 01 February 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 312.0 |
| 01 March 2023 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 62.0 |
| 01 April 2023 | Repayment | 250.0 | 62.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 05 April 2023 | Waive loan charges | 10.0 | 0.0 | 0.0 | 0.0 | 0.0 | 62.0 |
Then On Loan Transactions tab the "Repayment" Transaction with date "01 April 2023" is reverted
Then Loan Repayment schedule has 5 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding |
| | | 01 January 2023 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| 1 | 0 | 01 January 2023 | 01 February 2023 | 562.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 188.0 | 0.0 | 0.5 | 0.0 | 0.0 |
| 1 | 0 | 01 January 2023 | 01 January 2023 | 562.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 188.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2 | 15 | 16 January 2023 | 01 February 2023 | 375.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 187.0 | 0.0 | 187.0 | 0.0 | 0.0 |
| 3 | 15 | 31 January 2023 | 01 March 2023 | 188.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 187.0 | 0.0 | 187.0 | 0.0 | 0.0 |
| 4 | 15 | 15 February 2023 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 125.5 | 0.0 | 125.5 | 0.0 | 62.5 |
| 4 | 15 | 15 February 2023 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 126.0 | 0.0 | 126.0 | 0.0 | 62.0 |
| 5 | 49 | 05 April 2023 | 05 April 2023 | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | 0.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding |
| 750 | 0 | 0 | 10 | 760 | 687.5 | 0 | 500 | 10 | 62.5 |
| 750 | 0 | 0 | 10 | 760 | 688.0 | 0 | 500 | 10 | 62.0 |
@TestRailId:C2994
Scenario: Waive charge on PIN4 progressive loan
@@ -2032,10 +2032,10 @@ Feature: Loan DownPayment
Then Loan Repayment schedule has 4 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 01 January 2022 | | 1250.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 01 January 2022 | | 937.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 |
| 2 | 31 | 01 February 2022 | | 625.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 |
| 3 | 28 | 01 March 2022 | | 313.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 |
| 4 | 31 | 01 April 2022 | | 0.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 |
| 1 | 0 | 01 January 2022 | | 938.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 |
| 2 | 31 | 01 February 2022 | | 625.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 |
| 3 | 28 | 01 March 2022 | | 312.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 | 0.0 | 0.0 | 0.0 | 313.0 |
| 4 | 31 | 01 April 2022 | | 0.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 | 0.0 | 0.0 | 0.0 | 312.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 1250.0 | 0 | 0 | 0 | 1250.0 | 0.0 | 0 | 0 | 1250 |
@@ -2446,8 +2446,8 @@ Feature: Loan DownPayment
| 2 | 15 | 16 February 2024 | 16 February 2024 | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 |
| | | 20 February 2024 | | 625.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 3 | 0 | 20 February 2024 | 20 February 2024 | 719.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 156.0 | 0.0 | 0.0 | 0.0 |
| 4 | 15 | 02 March 2024 | 20 February 2024 | 359.0 | 360.0 | 0.0 | 0.0 | 0.0 | 360.0 | 360.0 | 360.0 | 0.0 | 0.0 |
| 5 | 15 | 17 March 2024 | 20 February 2024 | 0.0 | 359.0 | 0.0 | 0.0 | 0.0 | 359.0 | 359.0 | 359.0 | 0.0 | 0.0 |
| 4 | 15 | 02 March 2024 | 20 February 2024 | 360.0 | 359.0 | 0.0 | 0.0 | 0.0 | 359.0 | 359.0 | 359.0 | 0.0 | 0.0 |
| 5 | 15 | 17 March 2024 | 20 February 2024 | 0.0 | 360.0 | 0.0 | 0.0 | 0.0 | 360.0 | 360.0 | 360.0 | 0.0 | 0.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 1125.0 | 0.0 | 0.0 | 0.0 | 1125.0 | 1125.0 | 719.0 | 0.0 | 0.0 |
@@ -32,8 +32,8 @@ Feature: LoanReAmortization
| | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 01 January 2024 | 01 January 2024 | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 |
| 2 | 15 | 16 January 2024 | 25 January 2024 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 3 | 15 | 31 January 2024 | | 187.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 3 | 15 | 31 January 2024 | | 188.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | 125.0 | 0.0 | 0.0 | 375.0 |
@@ -74,8 +74,8 @@ Feature: LoanReAmortization
| | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 01 January 2024 | 01 January 2024 | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 |
| 2 | 15 | 16 January 2024 | 25 January 2024 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 3 | 15 | 31 January 2024 | | 187.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 3 | 15 | 31 January 2024 | | 188.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | 125.0 | 0.0 | 0.0 | 375.0 |
@@ -102,8 +102,8 @@ Feature: LoanReAmortization
| | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 01 January 2024 | 01 January 2024 | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 |
| 2 | 15 | 16 January 2024 | 25 January 2024 | 375.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 3 | 15 | 31 January 2024 | | 187.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 3 | 15 | 31 January 2024 | | 188.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | 125.0 | 0.0 | 0.0 | 375.0 |
@@ -167,8 +167,8 @@ Feature: LoanReAmortization
| | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 01 January 2024 | 01 January 2024 | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 |
| 2 | 15 | 16 January 2024 | | 375.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 |
| 3 | 15 | 31 January 2024 | | 187.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 3 | 15 | 31 January 2024 | | 188.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 | 0.0 | 0.0 | 0.0 | 187.0 |
| 4 | 15 | 15 February 2024 | | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 | 0.0 | 0.0 | 0.0 | 188.0 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 500.0 | 0.0 | 0.0 | 10.0 | 510.0 | 125.0 | 0.0 | 0.0 | 385.0 |
@@ -3139,10 +3139,10 @@ Feature: LoanRepayment
Then Loan Repayment schedule has 4 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 01 September 2023 | | 1250.0 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 30 | 01 October 2023 | | 936.62 | 313.38 | 15.62 | 0.0 | 0.0 | 329.0 | 0.0 | 0.0 | 0.0 | 329.0 |
| 2 | 31 | 01 November 2023 | | 623.24 | 313.38 | 15.62 | 0.0 | 0.0 | 329.0 | 0.0 | 0.0 | 0.0 | 329.0 |
| 3 | 30 | 01 December 2023 | | 309.86 | 313.38 | 15.62 | 0.0 | 0.0 | 329.0 | 0.0 | 0.0 | 0.0 | 329.0 |
| 4 | 31 | 01 January 2024 | | 0.0 | 309.86 | 15.64 | 0.0 | 0.0 | 325.5 | 0.0 | 0.0 | 0.0 | 325.5 |
| 1 | 30 | 01 October 2023 | | 937.62 | 312.38 | 15.62 | 0.0 | 0.0 | 328.0 | 0.0 | 0.0 | 0.0 | 328.0 |
| 2 | 31 | 01 November 2023 | | 625.24 | 312.38 | 15.62 | 0.0 | 0.0 | 328.0 | 0.0 | 0.0 | 0.0 | 328.0 |
| 3 | 30 | 01 December 2023 | | 312.86 | 312.38 | 15.62 | 0.0 | 0.0 | 328.0 | 0.0 | 0.0 | 0.0 | 328.0 |
| 4 | 31 | 01 January 2024 | | 0.0 | 312.86 | 15.64 | 0.0 | 0.0 | 328.5 | 0.0 | 0.0 | 0.0 | 328.5 |
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 1250.0 | 62.50 | 0.0 | 0.0 | 1312.50 | 0.0 | 0.0 | 0.0 | 1312.50 |