Comment 18 for bug 800478

Revision history for this message
Liam Whalen (whalen-ld) wrote :

I am working through the errors in my code now.

There are definite issues with the function as it is.

There is a check for same currencies that is supposed to check for equality between the funding source and the new fund, but it checks the old fund instead.

As well, sometimes values are added to acq.fund_acquistion without converting the value into the currency of the funding source if necessary.

I have been thinking about the case where funds are transferred into the void.

I believe this was added to allow fund to be added back to the funding source. Do you know if this is correct?

I think the best option is to pull out that functionality into a separate function (return_funds_to_source or something like that). That will cut down on a lot of the IF statements that are needed in the current function because it can be restricted to only transferring between funds, so there will have to be valid fund ids for both old and new fund.

I expect to be back on this work today in the evening.