Bug 23397: Fix grouping of orders in acqui scripts
authorNick Clemens <nick@bywatersolutions.com>
Mon, 29 Jul 2019 18:12:21 +0000 (18:12 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 6 Sep 2019 12:17:46 +0000 (13:17 +0100)
commit1f40de2931f19cce0ca372151444ea05eb5f8e93
tree4abec30c145f12e294ded9e0b2e47bae55fafadd
parent424cd4ed7f877d8bc7a45c77df0fa1b614efd1b7
Bug 23397: Fix grouping of orders in acqui scripts

Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types.

To recreate:
1 - Place an order for 4 copies of a title in acq
2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket)
3 - Set three items to one type, and one to another
4 - Go to Acqui-Home and click 'ordered' for the used budget
5 - Note the line is duplicated for each itemtype in the order
6 - Recieve the items and note the same issue on 'Spent'
7 - Place another order as before so you have the problem in both ordered.pl and spent/pl
8 - Apply patch
9 - Note orders are no longer duplicated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
acqui/ordered.pl
acqui/spent.pl