Summary: | Add ability to receive items in multiple currencies | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | 1joynelson, kohadevinim, mark.gavillet, martin.renvoize |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25655 | ||
Change sponsored?: | Sponsored | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This enhancement adds a currency dropdown to the actual cost field on the accounting details panel at the point of receipt.
|
Version(s) released in: |
20.05.00
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 24971 | ||
Attachments: |
Bug 24158: Convert actual cost in an other currency when receiving
Bug 24158: Convert actual cost in an other currency when receiving Bug 24158: Add missing html filters Bug 24158: Convert actual cost in an other currency when receiving Bug 24158: Add missing html filters |
Description
Jonathan Druart
2019-12-03 19:35:43 UTC
Created attachment 96263 [details] [review] Bug 24158: Convert actual cost in an other currency when receiving This patch adds a currency dropdown list to the Actual cost field when receiving items in the acquisition module. The idea is to let the librarian entered a price in a foreign currency that will automatically be converted in the local currency ('active'). This converted value will be use as the actual cost once the form is submitted. Test plan: - Create several currencies with different rates - Create an order, close the basket and receive - On the receipt page you will notice a new "change currency" checkbox right close to the 'Actual cost' input. - Check it => The 'Actual cost' input is readonly and a new line appears at the bottom. - Enter a number and select a currency => The 'Actual cost' input is automatically filled with the converted value - Save => The converted Actual cost has been inserted in the database. Sponsored-by: Athlone Institute of Technology The implementation differs a bit from what was specified originally. I have tried several versions of this and ended up with this one, which seems the more ergonomic and intuitive in my opinion. https://snipboard.io/FhkwAS.jpg https://snipboard.io/GqrsVE.jpg https://snipboard.io/GhRLav.jpg Created attachment 99766 [details] [review] Bug 24158: Convert actual cost in an other currency when receiving This patch adds a currency dropdown list to the Actual cost field when receiving items in the acquisition module. The idea is to let the librarian entered a price in a foreign currency that will automatically be converted in the local currency ('active'). This converted value will be use as the actual cost once the form is submitted. Test plan: - Create several currencies with different rates - Create an order, close the basket and receive - On the receipt page you will notice a new "change currency" checkbox right close to the 'Actual cost' input. - Check it => The 'Actual cost' input is readonly and a new line appears at the bottom. - Enter a number and select a currency => The 'Actual cost' input is automatically filled with the converted value - Save => The converted Actual cost has been inserted in the database. Sponsored-by: Athlone Institute of Technology Signed-off-by: Devinim <nazli@devinim.com.tr> QA tools fail: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt FAIL filters missing_filter at line 308 ( <option value="[% active_currency.rate %]" selected="selected">[% active_currency.currency %] ([% active_currency.symbol %])</option>) missing_filter at line 308 ( <option value="[% active_currency.rate %]" selected="selected">[% active_currency.currency %] ([% active_currency.symbol %])</option>) missing_filter at line 308 ( <option value="[% active_currency.rate %]" selected="selected">[% active_currency.currency %] ([% active_currency.symbol %])</option>) missing_filter at line 310 ( <option value="[% currency.rate %]">[% currency.currency %] ([% currency.symbol %])</option>) missing_filter at line 310 ( <option value="[% currency.rate %]">[% currency.currency %] ([% currency.symbol %])</option>) missing_filter at line 310 ( <option value="[% currency.rate %]">[% currency.currency %] ([% currency.symbol %])</option>) I know this will bounce back quickly :) Created attachment 101402 [details] [review] Bug 24158: Add missing html filters This works for me, but I have some big question marks about the currency calculation on receive: If you have set 'invoice prices' to another currency than standard in the vendor, this is not visible anywhere in the receive form. And it doesn't appear to be taken into account? I set 'invoice price' to USD and the rate to 3. Then entered 10 on receive and expected it to be converted to 30, but it didn't happen :( Where is this setting used and how will it possibly affect this change here? My impression was that you will enter the price in the currency set in the vendor, like you do for the ordering price and it will recalculate, but that doesn't seem to happen. I'd like this to be cleared up, before we move on with this to make sure we don't step on toes/workflows. Tested on 18.11 as well - not sure what the invoice price setting is used for still :( Talked with Katrin. We may want to preselect the new dropdown list to the value of the invoiceprice's vendor. But that would be for a follow-up bug anyway. Created attachment 101682 [details] [review] Bug 24158: Convert actual cost in an other currency when receiving This patch adds a currency dropdown list to the Actual cost field when receiving items in the acquisition module. The idea is to let the librarian entered a price in a foreign currency that will automatically be converted in the local currency ('active'). This converted value will be use as the actual cost once the form is submitted. Test plan: - Create several currencies with different rates - Create an order, close the basket and receive - On the receipt page you will notice a new "change currency" checkbox right close to the 'Actual cost' input. - Check it => The 'Actual cost' input is readonly and a new line appears at the bottom. - Enter a number and select a currency => The 'Actual cost' input is automatically filled with the converted value - Save => The converted Actual cost has been inserted in the database. Sponsored-by: Athlone Institute of Technology Signed-off-by: Devinim <nazli@devinim.com.tr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 101683 [details] [review] Bug 24158: Add missing html filters Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice work everyone! Pushed to master for 20.05 enhancement not backported to 19.11.x |