Bug 23397: Fix grouping of orders in acqui scripts
commit3964a026604e870f1a0958eef99c22ddd6b34a3b
authorNick Clemens <nick@bywatersolutions.com>
Mon, 29 Jul 2019 18:12:21 +0000 (29 18:12 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 9 Sep 2019 07:01:28 +0000 (9 09:01 +0200)
treee5cb8281555ff5931034ea88e6543ee6a89b7f86
parentad1ba3604c2054a6d7eb22ff26f3f4a8857683d0
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>
(cherry picked from commit 1f40de2931f19cce0ca372151444ea05eb5f8e93)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
acqui/ordered.pl
acqui/spent.pl