Bug 7571

Summary: Maintain exchange rate history
Product: Koha Reporter: Savitra Sirohi <savitra.sirohi>
Component: AcquisitionsAssignee: Amit Gupta <kohapatch>
Status: Failed QA --- QA Contact: Ian Walls <koha.sekjal>
Severity: enhancement    
Priority: P5 - low CC: amitddng135, indradg, kohapatch, michaela.sieber, mtompset, paul.poulain, sagar.br, savitra.sirohi, veron, vimalibre
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Maintain exchange rate history
[SIGNED-OFF] Bug 7571 Maintain exchange rate history
Bug 7571 Maintain exchange rate history

Description Savitra Sirohi 2012-02-21 07:10:43 UTC
Indian libraries need to maintain exchange rates across time. When items are invocied, sometime invoice date can be in the past, the actual cost needs to be calculated using the exchange rate as it stood on the inovice date.

With this change Koha will store exchange rates for each currency along with "last update date". Invoicing and receiving pages will be changed to calculate actual cost based on exchange rates as on on invoice dates.
Comment 1 Savitra Sirohi 2012-04-06 03:10:32 UTC
Additional requirement: In Indian libraries, serials use a different exchange rate (not the same as one used for Books). 

So in addition to maintaining exchange rate history add the ability to maintain different types of exchange rates (books, serials).
Comment 2 Sagar.B.R 2012-06-08 06:48:16 UTC
Daily Exchange Rates

          This feature is implemented for displaying the history of exchange rates.

1. New table is needed to add the exchange rates.

2. edit currency.pl file
               Insert currency and edit currency are the main two operations available in Currencies and Exchange Rates page, The operations are done by add_validate() sub procedure, It has the condition to identify whether the operation is insert or edit, In both insert and update case the values needs to be copy to ex_rates(new table) table also, So the insert command for ex_rates table should be in same sub procedure .
Comment 3 Sagar.B.R 2012-06-14 10:02:04 UTC Comment hidden (obsolete)
Comment 4 Sagar.B.R 2012-06-14 10:02:20 UTC
Maintain exchange rate history
Comment 5 Marc Véron 2012-06-27 15:14:56 UTC Comment hidden (obsolete)
Comment 6 Paul Poulain 2012-07-06 16:10:16 UTC
QA comments:
 * 1st, a question = This page just keep track of exchange rates, and does nothing on acquisition, right ? Do you plan to add this feature soon or later ?
 * ex_rates => the name of the table is unclear (what does 'ex' mean ? it's unclear that it's exchange, and does not contain currency). currency_exchange_history or something like that would be much more clear
 *  If I read your patch correctly, you save the history only on a modif, with the new value. That's OK if you keep track of current rate in updatedatabase: when upgrading, the current rate should be set in this table, with a timestamp of 2000-01-01, to show what was the rate before we change it for the 1st time.

Failing QA for #2 and #3
Comment 7 Katrin Fischer 2012-09-11 09:39:22 UTC
*** Bug 8755 has been marked as a duplicate of this bug. ***
Comment 8 Mark Tompsett 2015-05-15 20:03:40 UTC
Created attachment 39225 [details] [review]
Bug 7571 Maintain exchange rate history

Keep track of changes to exchange rates for accounting purposes.
History is displayed with each currency.

Behaviour is as expected.

NOTE: Removed sign off, because this also fails to update
      kohastructure.sql in order to create the currency history
      table.
Comment 9 Katrin Fischer 2022-07-20 09:48:26 UTC
*** Bug 18157 has been marked as a duplicate of this bug. ***