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.
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).
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 .
Created attachment 10271 [details] [review] Maintain exchange rate history Maintain exchange rate history
Maintain exchange rate history
Created attachment 10544 [details] [review] [SIGNED-OFF] 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. Signed-off-by: Marc Veron <veron@veron.ch>
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
*** Bug 8755 has been marked as a duplicate of this bug. ***
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.
*** Bug 18157 has been marked as a duplicate of this bug. ***