Bug 22713

Summary: Replacement price removed when receiving if using MarcItemFieldstoOrder
Product: Koha Reporter: Kelly McElligott <kelly>
Component: AcquisitionsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: agustinmoyano, jdemuth, jonathan.druart, katrin.fischer, kelly, lucas, martin.renvoize, robbinsk
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.06
Bug Depends on: 18639    
Bug Blocks:    
Attachments: replacement price in item record acq process
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder
Bug 22713: Remove unecessary $replacementprice var
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder
Bug 22713: Remove unecessary $replacementprice var

Description Kelly McElligott 2019-04-16 10:43:05 UTC
Created attachment 88048 [details]
replacement price in item record acq process

In 18.11 the wording and functionality changed in Acquisitions with the field Replacement price.  This allowed libraries to have their replacement price set in the Acquisitions order and also in the item record. However, if a library is using MarcItemFieldstoOrder system preference and setting their replacement price in the marc record upon Importing.  The replacement price only stays on the Item Record and will not be included into the Acquisitions order and it won't populate into the receiving process- and therefore making it $0.  It would be nice if the item record had the replacement price from the MarcItemFieldstoOrder, and this would follow it through the process and since it is there in the item, it be used in the Order.

Process currently:
1. Set marcitemfieldstorder to have a $v replacement price (975$v)
2. Create a basket
3. Upload a marc file that has a replacement price in the record 
4. Add this file to your basket.
5. The item record will display the replacement price.
6. The basket.pl will not display the replacement price of this item
7. CLose the basket 
8. When receiving the item in Acquisitions, the replacement price is zeroed out
9. The item will not have a replacement price once it is received.
Comment 1 Nick Clemens 2019-04-25 16:30:09 UTC
Created attachment 88792 [details] [review]
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder

To test:
 1 - Have AcqCreateItems set to 'On ordering' (or set in a basket)
 2 - Define MARCItemFieldsToOrder
    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 970$c
    notforloan: 975$7
    uri: 975$u
    copyno: 975$n
    quantity: 975$q
    budget_code: 975$h
    price: 975$g
    replacementprice: 975$p
 3 - Have a marc record with some order info defined as above, including a replacementprice
 4 - Add to basket - > from a new file
 5 - Don't check for duplicates, add the order
 6 - Note the order has no replacementprice, but the item does
 7 - Close basket, receive order, do not enter a new replacement price
 8 - Note the items replacement price is clear
 9 - Apply patch
10 - Repeat
11 - Note when order added to basket it has a replacement price
12 - Note when order is received the replacement price is populated and passed into item correctly
Comment 2 Liz Rea 2019-05-01 15:07:25 UTC
Created attachment 89187 [details] [review]
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder

To test:
 1 - Have AcqCreateItems set to 'On ordering' (or set in a basket)
 2 - Define MARCItemFieldsToOrder
    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 970$c
    notforloan: 975$7
    uri: 975$u
    copyno: 975$n
    quantity: 975$q
    budget_code: 975$h
    price: 975$g
    replacementprice: 975$p
 3 - Have a marc record with some order info defined as above, including a replacementprice
 4 - Add to basket - > from a new file
 5 - Don't check for duplicates, add the order
 6 - Note the order has no replacementprice, but the item does
 7 - Close basket, receive order, do not enter a new replacement price
 8 - Note the items replacement price is clear
 9 - Apply patch
10 - Repeat
11 - Note when order added to basket it has a replacement price
12 - Note when order is received the replacement price is populated and passed into item correctly

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Jonathan Druart 2019-05-06 16:55:56 UTC
Created attachment 89376 [details] [review]
Bug 22713: Remove unecessary $replacementprice var
Comment 4 Katrin Fischer 2019-05-11 16:18:49 UTC
Created attachment 89611 [details] [review]
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder

To test:
 1 - Have AcqCreateItems set to 'On ordering' (or set in a basket)
 2 - Define MARCItemFieldsToOrder
    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 970$c
    notforloan: 975$7
    uri: 975$u
    copyno: 975$n
    quantity: 975$q
    budget_code: 975$h
    price: 975$g
    replacementprice: 975$p
 3 - Have a marc record with some order info defined as above, including a replacementprice
 4 - Add to basket - > from a new file
 5 - Don't check for duplicates, add the order
 6 - Note the order has no replacementprice, but the item does
 7 - Close basket, receive order, do not enter a new replacement price
 8 - Note the items replacement price is clear
 9 - Apply patch
10 - Repeat
11 - Note when order added to basket it has a replacement price
12 - Note when order is received the replacement price is populated and passed into item correctly

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2019-05-11 16:19:08 UTC
Created attachment 89612 [details] [review]
Bug 22713: Remove unecessary $replacementprice var

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens 2019-05-15 12:14:12 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2019-05-24 13:47:39 UTC
Pushed to 18.11.x for 18.11.06
Comment 8 Lucas Gass 2019-05-30 15:57:03 UTC
missing dependency for 18.05.x, no backport