Description
Alex Buckley
2019-08-11 23:05:49 UTC
Created attachment 92147 [details] [review] Bug 23450: Display subscription and issue cost in subscription interface of the catalouge/detail.pl Created attachment 92148 [details] [review] Bug 23450: Display subscription and issue cost in subscription interface of the catalouge/detail.pl Displays the serial issue price (from 952$g), and subscription cost (calculated from the Acquisition order the subscription is linked to). Test plan: 1. Create a subscription (making sure to select 'Create an item record when receiving this serial') and then go to Acquisitions module and create the following if they don't already exist: * Currency * Budget * Fund * Vendor * Basket 2. Add to the basket: Add to basket > From a subscription 3. Search for and select the subscription made in step #1 4. Set quantity, vendor price, and replacement price and 'Save' 5. Search for the serial biblio and view its catalogue/detail.pl page Click on the 'Subscriptions' tab and notice there is no 'Total cost of the subscription' text And no 'Issue price' and 'Subscription cost' columns in the issue table in the subscription tab which is currently empty 6. Select the 'Subscription details' link and select 'Receive' changing the status from 'Expected' to 'Arrived' 7. Repeat step 5 and notice the issues table in the Subscriptions tab still does not have 'Issue price' or 'Subscription cost' columns 8. Apply patches on bug 23352 and 23450 9. Update your database and restart memcached and plack 10. Refresh the catalogue/detail.pl page you were on in step 7 and notice the following has been added: Total cost of the subscription is: <quantity * vendor price > Issue price and Subscription cost columns in the issue table in the subscription tab. Sponsored-By: Brimbank Library, Australia Created attachment 101930 [details] [review] Bug 23450: Display subscription and issue cost in subscription interface of the catalouge/detail.pl Displays the serial issue price (from 952$g), and subscription cost (calculated from the Acquisition order the subscription is linked to). Test plan: 1. Create a subscription (making sure to select 'Create an item record when receiving this serial') and then go to Acquisitions module and create the following if they don't already exist: * Currency * Budget * Fund * Vendor * Basket 2. Add to the basket: Add to basket > From a subscription 3. Search for and select the subscription made in step #1 4. Set quantity, vendor price, and replacement price and 'Save' 5. Search for the serial biblio and view its catalogue/detail.pl page Click on the 'Subscriptions' tab and notice there is no 'Total cost of the subscription' text And no 'Issue price' and 'Subscription cost' columns in the issue table in the subscription tab which is currently empty 6. Select the 'Subscription details' link and select 'Receive' changing the status from 'Expected' to 'Arrived' 7. Repeat step 5 and notice the issues table in the Subscriptions tab still does not have 'Issue price' or 'Subscription cost' columns 8. Apply patches on bug 23352 and 23450 9. Update your database and restart memcached and plack 10. Refresh the catalogue/detail.pl page you were on in step 7 and notice the following has been added: Total cost of the subscription is: <quantity * vendor price > Issue price and Subscription cost columns in the issue table in the subscription tab. Sponsored-By: Brimbank Library, Australia Created attachment 129128 [details] [review] Bug 23450: Display serial and subscription price in biblio detail page The 'Subscription' tab should display: - Total subscription price (based on what's set in the linked order) - Serial price based on what's set in the 952$g (items.price) Test plan: 1. Create a subscription - Tick the 'Create an item record when receiving this serial' radiobutton 2. Create an order, linking it to a subscription, set: - Quantity: 2 - Vendor price: 3 3. Receive the serial 4. Set the 952$g (normal purchase price) as 5 5. Visit the biblio detail page 6. View the 'Subscription' tab and confirm that: 'Total subscription cost is: 6.00' 'Issue price' in the table is 5.00 Sponsored-By: Brimbank Library, Australia Created attachment 129520 [details] [review] Bug 23450: Display serial and subscription price in biblio detail page The 'Subscription' tab should display: - Total subscription price (based on what's set in the linked order) - Serial price based on what's set in the 952$g (items.price) Test plan: 1. Create a subscription - Tick the 'Create an item record when receiving this serial' radiobutton 2. Create an order, linking it to a subscription, set: - Quantity: 2 - Vendor price: 3 3. Receive the serial 4. Set the 952$g (normal purchase price) as 5 5. Visit the biblio detail page 6. View the 'Subscription' tab and confirm that: 'Total subscription cost is: 6.00' 'Issue price' in the table is 5.00 Sponsored-By: Brimbank Library, Australia Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> A couple points: A) I'm getting 'Can't call method "unblessed" on an undefined value at /kohadevbox/koha/catalogue/detail.pl line 205' if a subscription has no order related to it B) There's no need to unbless the order to work with it, just use the object's accessors Created attachment 148113 [details] [review] Bug 23450: Display serial and subscription price in biblio detail page The 'Subscription' tab should display: - Total subscription price (based on what's set in the linked order) - Serial price based on what's set in the 952$g (items.price) Test plan: 1. Create a subscription - Tick the 'Create an item record when receiving this serial' radiobutton 2. Create an order, linking it to a subscription, set: - Quantity: 2 - Vendor price: 3 3. Receive the serial 4. Set the 952$g (normal purchase price) as 5 5. Visit the biblio detail page 6. View the 'Subscription' tab and confirm that: - 'Total subscription cost is: 6.00' - 'Issue price' in the table is 5.00 Sponsored-By: Brimbank Library, Australia Ready for testing again. CONFLICT (content): Merge conflict in C4/Serials.pm |