Closed dave-mills closed 1 year ago
migrate:fresh --seed
:I got latest code and performed testing in local env, with positive testing result.
I create a new portfolio, add two new projects. The first project with institution default currency EUR, the second project with USD currency. In Initiative information page, both budget and budget in institution currency can be showed.
Assess red flags, principles, additional criteria for them. In dashboard, total budget and AE-focus budget can be showed.
I think it is good to merge.
Screen shots
This PR fixes #198, fixes #191.
budget_org not saved
When an initiative's currency is the same as the organisation's default, the exchange_rate entry field is hidden, and instead the exchange_rate is set to 1. This was being done at the database level. This meant that the PHP code to calculate the budget_org field did not have that information, and so was multiplying by null.
This PR fixes that to always send a value for the exchange rate through the CRUD panel when creating or editing a project, so that the budget_org calculation runs correctly.
sort by budget on the initiatives page.
Turns out the sorting wasn't actually working at all, as it was sorting
initiatives
instead offilteredInitiatives
. This PR fixes that issue, and also sets the budget sorting to work withbudget_org
instead ofbudget
(asbudget
may be in different currencies, so the absolute values aren't directly comparable for sorting).