| @WorkingCapitalLoanGoodwillCreditFeature |
| Feature: Working Capital Loan Goodwill Credit |
| |
| @TestRailId:C80923 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC1: simple Goodwill Credit transaction |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin sets the business date to "10 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| And Customer makes "GOODWILL_CREDIT" transaction on "10 January 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 10 January 2026 | Goodwill Credit | 270.0 | 270.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80924 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC2: Goodwill Credit transaction with zero amount results an error (Negative) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin sets the business date to "10 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Initiating a "GOODWILL_CREDIT" transaction on "10 January 2026" with 0.0 transaction amount on Working Capital loan results an error with the following data: |
| | httpCode | errorMessage | |
| | 400 | The parameter `transactionAmount` must be greater than 0. | |
| |
| @TestRailId:C80925 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC3: Goodwill Credit transaction with negative amount results an error (Negative) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin sets the business date to "10 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Initiating a "GOODWILL_CREDIT" transaction on "10 January 2026" with -100.0 transaction amount on Working Capital loan results an error with the following data: |
| | httpCode | errorMessage | |
| | 400 | The parameter `transactionAmount` must be greater than 0. | |
| |
| @TestRailId:C80926 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC4: Goodwill Credit transaction with future date results an error (Negative) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin sets the business date to "10 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Initiating a "GOODWILL_CREDIT" transaction on "15 January 2026" with 270.0 transaction amount on Working Capital loan results an error with the following data: |
| | httpCode | errorMessage | |
| | 400 | Failed data validation due to: cannot.be.a.future.date. | |
| |
| @TestRailId:C80927 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC5: Goodwill Credit transaction on disbursement day |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| And Customer makes "GOODWILL_CREDIT" transaction on "01 January 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 01 January 2026 | Goodwill Credit | 270.0 | 270.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80928 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC6: Goodwill Credit transaction after disbursement day |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Full expectedAmount paid via goodwill credit --- |
| When Admin sets the business date to "02 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "02 January 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| |
| @TestRailId:C80929 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC7: Goodwill Credit transaction on last day of first period |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Full expectedAmount paid via goodwill credit on last day --- |
| When Admin sets the business date to "30 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "30 January 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| |
| @TestRailId:C80930 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC8: Goodwill Credit transaction on first day of second period (delinquent) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Full expectedAmount paid via goodwill credit on first day of next period --- |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | false | 270.0 | 1 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| | 1 | 2026-01-31 | | D00 | 1 | 30 | |
| And Customer makes "GOODWILL_CREDIT" transaction on "31 January 2026" with 270.0 transaction amount on Working Capital loan |
| # --- Check --- |
| When Admin sets the business date to "01 February 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| | 1 | 2026-01-31 | 2026-01-31 | D00 | 1 | 30 | |
| |
| @TestRailId:C80931 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC9: multiple Goodwill Credit transactions on same day (full payment) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Full expectedAmount paid via 2 goodwill credits on the same day--- |
| When Admin sets the business date to "02 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "02 January 2026" with 170.0 transaction amount on Working Capital loan |
| And Customer makes "GOODWILL_CREDIT" transaction on "02 January 2026" with 100.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 02 January 2026 | Goodwill Credit | 170.0 | 170.0 | 0.0 | 0.0 | false | |
| | 02 January 2026 | Goodwill Credit | 100.0 | 100.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80932 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC10: multiple Goodwill Credit transactions on different days (full payment) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Full expectedAmount paid via 2 goodwill credits on different days--- |
| When Admin sets the business date to "02 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "02 January 2026" with 170.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 170.0 | 100.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| When Admin sets the business date to "15 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "15 January 2026" with 100.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 02 January 2026 | Goodwill Credit | 170.0 | 170.0 | 0.0 | 0.0 | false | |
| | 15 January 2026 | Goodwill Credit | 100.0 | 100.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80933 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC11: Goodwill Credit transaction combined with regular repayment (same period) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Mixed: repayment + goodwill credit in same period --- |
| When Admin sets the business date to "05 January 2026" |
| And Customer makes repayment on "05 January 2026" with 100.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 100.0 | 170.0 | null | null | null | |
| When Admin sets the business date to "10 January 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "10 January 2026" with 170.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 05 January 2026 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | false | |
| | 10 January 2026 | Goodwill Credit | 170.0 | 170.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80934 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC12: repayment and Goodwill Credit transaction in different periods |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount |
| Then Working Capital loan status will be "ACTIVE" |
| And Verify Working Capital loan disbursement was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discount | |
| | WCLP | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| When Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 0.0 | 270.0 | null | null | null | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Period 1: Regular repayment --- |
| When Admin sets the business date to "10 January 2026" |
| And Customer makes repayment on "10 January 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Delinquency Tag History for Working Capital loan has lines: |
| | periodNumber | addedOnDate | liftedOnDate | classification | minimumAgeDays | maximumAgeDays | |
| # --- Period 2: Goodwill credit --- |
| When Admin sets the business date to "31 January 2026" |
| And Admin runs inline COB job for Working Capital Loan by loanId |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 0.0 | 270.0 | null | null | null | |
| When Admin sets the business date to "10 February 2026" |
| And Customer makes "GOODWILL_CREDIT" transaction on "10 February 2026" with 270.0 transaction amount on Working Capital loan |
| Then Working Capital loan delinquency range schedule has the following data: |
| | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | |
| | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| | 2 | 2026-01-31 | 2026-03-01 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | |
| And Working Capital Loan has transactions: |
| | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | |
| | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | |
| | 10 January 2026 | Repayment | 270.0 | 270.0 | 0.0 | 0.0 | false | |
| | 10 February 2026 | Goodwill Credit | 270.0 | 270.0 | 0.0 | 0.0 | false | |
| |
| @TestRailId:C80935 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC13: Goodwill Credit transaction after loan creation results an error (Negative) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| Then Initiating a "GOODWILL_CREDIT" transaction on "01 January 2026" with 270.0 transaction amount on Working Capital loan results an error with the following data: |
| | httpCode | errorMessage | |
| | 400 | Goodwill Credit is allowed only for active/closed obligations met/overpaid loans | |
| |
| @TestRailId:C80936 |
| Scenario: Verify working capital loan Goodwill Credit transaction - UC14: Goodwill Credit transaction after approval results an error (Negative) |
| When Admin sets the business date to "01 January 2026" |
| And Admin creates a client with random data |
| And Admin creates a working capital loan with the following data: |
| | LoanProduct | submittedOnDate | expectedDisbursementDate | principalAmount | totalPayment | periodPaymentRate | discount | |
| | WCLP | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | |
| And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" |
| Then Working capital loan approval was successful |
| And Working capital loan account has the correct data: |
| | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPayment | periodPaymentRate | discountApproved | |
| | WCLP | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | |
| Then Initiating a "GOODWILL_CREDIT" transaction on "01 January 2026" with 270.0 transaction amount on Working Capital loan results an error with the following data: |
| | httpCode | errorMessage | |
| | 400 | Goodwill Credit is allowed only for active/closed obligations met/overpaid loans | |