Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder
authorNick Clemens <nick@bywatersolutions.com>
Mon, 18 Sep 2023 16:32:10 +0000 (16:32 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 5 Oct 2023 19:42:49 +0000 (09:42 -1000)
commit6270d813ef95ccf3d2b2cae54d2cec8a05a3bc3a
tree1f9a4f0e8b711715fa8988fdb116e5c26dd57571
parent5c73ac5c23ee5d7e828f8cd2b02769fad1367589
Bug 34645: always use discount, sort1, and sort2 from MarcFieldsToOrder

These values are stored at the order level, not per item. This patch simply sets the order values from the values retrieved from MarcFieldsToOrder even inf MarcItemFields to order is being used for other fields

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Note that discount and sort1 and sort2 are not populated per the Marc
Apply patch, restart all
Stage and add to basket again
Confirm discount and sort1 and sort2 are populated correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3bf1f3da5f82e9479ac1c39f0a5ab869e7a748c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
acqui/addorderiso2709.pl