Summary: | Default currency on Acquisitions suggestion form | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Acquisitions | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | PATCH-Sent (DO NOT USE) | CC: | m.de.rooy, paul.poulain, wizzyrea |
Version: | 3.6 | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: |
Bug 6894: Order from suggestion defaulting to wrong currency
Bug 6894: Order from suggestion defaulting to wrong currency Bug 6894: Order from suggestion defaulting to wrong currency |
Description
Katrin Fischer
2011-09-21 06:24:15 UTC
Created attachment 6051 [details] [review] Bug 6894: Order from suggestion defaulting to wrong currency This problem turned out to be a bit different, than I initally thought. This patch fixes the currency selections for new orders created in staff. Before this patch, the first currency in the list was selected instead of the active currency. So you needed to change it explicitly. After patch it should work like this: 1) Suggestion created in OPAC - currency defaults to NULL in database 2) Editing a suggestion created in OPAC will default to active currency. 3) Creating a new suggestion in staff will default to active currency. 4) When ordering, the currency will default to the vendor currency, if no currency is set in the suggestion. (still happens, when suggestions are accepted in batch from the list. I hope this is right - comments and testing appreciated. Created attachment 6097 [details] [review] Bug 6894: Order from suggestion defaulting to wrong currency This problem turned out to be a bit different, than I initally thought. This patch fixes the currency selections for new orders created in staff. Before this patch, the first currency in the list was selected instead of the active currency. So you needed to change it explicitly. After patch it should work like this: 1) Suggestion created in OPAC - currency defaults to NULL in database 2) Editing a suggestion created in OPAC will default to active currency. 3) Creating a new suggestion in staff will default to active currency. 4) When ordering, the currency will default to the vendor currency, if no currency is set in the suggestion. (still happens, when suggestions are accepted in batch from the list. I hope this is right - comments and testing appreciated. Signed-off-by: Liz Rea <lrea@nekls.org> Verified that in the above places, active currency was displayed or selected. Tested both suggestions entered from the OPAC and from the intranet. QA Comment This bugreport handles the currency on the suggestion form only; the comment made me look to order from suggestion too. But that part is not touched by the patch. The currency correctly defaults to active currency if no currency was passed via CGI object. ($$suggestion_ref takes its values from input->Vars.) Code looks good. Marking it as Passed QA. mmm... can't reproduce the step 2 (2) Editing a suggestion created in OPAC will default to active currency.) Here is my database content: portable kohacommunity>select * from suggestions WHERE suggestionid=2\G *************************** 1. row *************************** suggestionid: 2 suggestedby: 1 suggesteddate: 2011-10-26 managedby: 1 manageddate: 2011-11-24 acceptedby: 1 accepteddate: 2011-10-26 rejectedby: NULL rejecteddate: NULL STATUS: ASKED note: author: title: suggestion 6880 copyrightdate: 0 publishercode: date: 2011-11-24 15:57:27 volumedesc: NULL publicationyear: 0 place: isbn: mailoverseeing: 0 biblionumber: NULL reason: blablabla budgetid: NULL branchcode: ANNEXE collectiontitle: itemtype: quantity: NULL currency: NULL <<<<<<<<<<<<<<<<<<<<<<<<<<< price: NULL total: NULL 1 row in set (0.00 sec) portable kohacommunity>SELECT * FROM currency; +----------+--------+---------------------+---------+--------+ | currency | symbol | timestamp | rate | active | +----------+--------+---------------------+---------+--------+ | AA | AA | 2011-11-16 17:45:33 | 2.00000 | 0 | | EURO | � | 2011-08-03 13:36:12 | 1.00000 | 1 | | YEN | Y | 2011-10-20 11:09:14 | 0.06500 | 0 | +----------+--------+---------------------+---------+--------+ If I try to modify suggestion 2, the currency is defaulted to AA (should be EURO) Otherwise, works fine. Katrin or someone else, an idea ? Ignore the Description. At first I thought this problem was happening on the order form and figured out later, that my wrong currencies happened during accpeting the suggestions. I retested 2) - CAD is the first currency in my currency table - EUR is the second currency, also the active currency - I created a suggestion in OPAC - I opened that suggestion in the suggestions module - the pull down for currencies showed EUR as preselected currency Comment on 4) - create suggeston in OPAC - accept suggestion from the list(!) only changing the status to accepted. Currency in the database will still be NULL after that. Created attachment 6435 [details] [review] Bug 6894: Order from suggestion defaulting to wrong currency This problem turned out to be a bit different, than I initally thought. This patch fixes the currency selections for new orders created in staff. Before this patch, the first currency in the list was selected instead of the active currency. So you needed to change it explicitly. After patch it should work like this: 1) Suggestion created in OPAC - currency defaults to NULL in database 2) Editing a suggestion created in OPAC will default to active currency. 3) Creating a new suggestion in staff will default to active currency. 4) When ordering, the currency will default to the vendor currency, if no currency is set in the suggestion. (still happens, when suggestions are accepted in batch from the list. I hope this is right - comments and testing appreciated. Signed-off-by: Liz Rea <lrea@nekls.org> Verified that in the above places, active currency was displayed or selected. Tested both suggestions entered from the OPAC and from the intranet. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Verified the existence of the bug, and that the fix works as advertised. Paul, I can confirm the bug, and the patch works to fix it for me, as well. Regards, Jared patch pushed, please test Works on current HEAD. |