There two routines does the same thing. They can be merge into one routine and improved.
Created attachment 20325 [details] [review] Bug 10723: Merge GetPendingOrders and SearchOrders routines In the C4::Acquisition module, 2 routines do the same work. This patch merges these 2 routines. Test plan: test the acqui/orderreceive.pl, acqui/uncertainprice.pl and serials/acqui-search-result.pl, acqui/parcel.pl scripts. Note: on acqui/parcel the basket filter is a search on basket name (was on basket id, which was not relevant). Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Created attachment 20420 [details] [review] Bug 10723: Merge GetPendingOrders and SearchOrders routines In the C4::Acquisition module, 2 routines do the same work. This patch merges these 2 routines. Test plan: test the acqui/orderreceive.pl, acqui/uncertainprice.pl and serials/acqui-search-result.pl, acqui/parcel.pl scripts. Note: on acqui/parcel the basket filter is a search on basket name (was on basket id, which was not relevant). Signed-off-by: Pierre Angot <tredok.pierre@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Passes koha-qa.pm, no adverse bahaviors noted. All sub calls updated.
Created attachment 21140 [details] [review] Bug 10723: SearchOrders should take into account the pending parameter.
Pushed to master. Thanks, Jonathan!
Hi Jonathan, Hi Kyle I am trying to resolve conflict on Bug 10758, so I came to your change on this one. Don't you think the resulting routine could be make simpler ? I see "publishercode AS publisher" and aqorders.rrp AS unitpricesupplier, aqorders.ecost AS unitpricelib, aqorders.claims_count AS claims_count, aqorders.claimed_date AS claimed_date, I don't the the meaning of aqorders.claims_count AS claims_count, aqorders.claimed_date AS claimed_date, For aqorders.rrp AS unitpricesupplier, aqorders.ecost AS unitpricelib, and publishercode AS publisher Is this renaming made for avoiding confusion somewhere in code? By the way, I was trying to factorize some UT in Acquisition.t (not yet done), and one of my assumptions was that the fields returned by GetOrder were the same as each orders of GetOrderS and GetCancelledOrders. It was working, but of course it is no more the case. So I'm wondering if the fields added in the hased returned by GetOrder could be usefull too in GetOrderS and GetCancelledOrders. Mathieu
ARGH Sorry, I'm completely wrong ;-) What disturbs me is the change made to GetOrder, not to GetPendingOrders. Mathieu