Update transition to Approve considering the expense classes "Code"

Description

Purpose:
Requirement from the UX ticket: Each expense class has a code (extension) that compliments the 'Fund code' of any fund it is assigned to

Requirements/Scope:

  1. Update creation of voucher lines upon invoice approval

Approach:

  • If expenseClassId specified in fundDistribution:

    • retrieve expense classes by id

    • add Code to Fund code (fundCode-expenseClassCode)

  • group fundDistribution by externalAccountNumber (consider same fundCode with different expenseClassCode as separate Fund codes)

  • create voucher line for each externalAccountNumber or externalAccountNumber-extensionNumber and this pair must be store in voucher line field "ExternalAccountNumber"

  • Fund code + expenseClassCode must be stored in voucher line field "fundCode"

Acceptance criteria:

  • logic updated

  • unit tests updated

  • API tests updated

Environment

None

Potential Workaround

None

Attachments

2

defines

has to be done after

Checklist

hide

TestRail: Results

Activity

Show:

Siarhei Hrabko October 5, 2020 at 10:50 AM

The same steps are performed on snapshot. Voucher fund code has combined value.

Yauheni Kuzmianok October 2, 2020 at 10:15 AM
Edited

Verified on snapshot


Steps:
1) Create an invoice with invoiceLine and
2) Use any fund distribution that have expense class
3) approve that invoice
4) Select voucher line details and see that funcCode combined with expenseClassCode like: "FundCode-Elec" for example

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created September 16, 2020 at 10:18 PM
Updated November 25, 2020 at 12:38 PM
Resolved October 5, 2020 at 10:50 AM
TestRail: Cases
TestRail: Runs