Change functionality of the ACQ transfer fund action

Bug #1335668 reported by Liam Whalen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Triaged
Wishlist
Jeff Davis

Bug Description

This is a new ticket based on a discussion here:

 https://bugs.launchpad.net/evergreen/+bug/800478

I have written a new version of transfer fund, and I would like to target it to 2.next. It modifies the acq.fund_allocation table by adding two new fields. These fields are fund_amount and conversion_ratio. There is already an amount field in acq.fund_allocation, and it remains there in this new commit.

The difference between amount and fund_amount is nil unless there is a difference in the exchange rates between a funding source and the fund itself. In those instances, amount represents the amount transferred by the funding source and fund_amount is the value transferred to the fund in the fund's currency.

This change allows exchange rates to be modified without the values in the funds fluctuating.

These changes also modify how acq.transfer_fund works. It allows users to transfer negative amounts, but instead of inserting negative values it reverses the order of the transfer. I.e. If fund1 transfer -50.00 to fund2, then in the database this is recorded as fund2 transferring 50.00 to fund1.

Liam

Kathy Lussier (klussier)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Liam Whalen (whalen-ld) wrote :

I have made my modifications to transfer fund and other ACQ year end stored procedures. As well, I have added a number of PgTap tests for these new features. The commit for master can be found here:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/ldw/LP1335688_Change_ACQ_Year_End

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

Can someone look at this submission again. It fixes problems with exchange rates that are not currently addressed by the code base.

Changed in evergreen:
milestone: none → 2.next
Revision history for this message
Kathy Lussier (klussier) wrote :

Liam,

Could you add a release notes entry for this code?

I can try to set aside some time to look at it, but I would find it helpful to have a test plan that shows me what to test for.

Thanks!
Kathy

tags: added: needsreleasenote
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

We're running this live on Evergreen 2.8.1

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

Hi Kathy,

I have updated my branch with release notes. Thank you for taking a look a this.

Liam

Kathy Lussier (klussier)
tags: added: acq
Changed in evergreen:
assignee: nobody → Jeff Davis (jdavis-sitka)
Dan Wells (dbw2)
tags: removed: needsreleasenote
Changed in evergreen:
milestone: 3.next → 3.1-beta
Changed in evergreen:
milestone: 3.1-beta → 3.next
Dan Wells (dbw2)
Changed in evergreen:
milestone: 3.next → 3.3-beta1
Changed in evergreen:
milestone: 3.3-beta1 → 3.3-rc
Changed in evergreen:
milestone: 3.3-rc → 3.next
Revision history for this message
Tiffany Little (tslittle) wrote :

Jennifer, would you be willing to sign off on this one since you said you've been running it live for awhile now?

tags: added: acq-funds
Revision history for this message
Blake GH (bmagic) wrote :

This patch doesn't merge clean on 3.8. I tried my hand at resolving the conflicts for Open-ILS/src/sql/Pg/200.schema.acq.sql but ultimately decided that this work needs more than trivial consideration.

tags: added: needswork
removed: pullrequest
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.