Bug 4510 - acq/supplier.pl mistaken about return from GetBooksellerById
Summary: acq/supplier.pl mistaken about return from GetBooksellerById
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: PC All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Colin Campbell
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-15 01:33 UTC by Colin Campbell
Modified: 2012-10-25 22:53 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed Patch (11.49 KB, patch)
2010-05-18 10:48 UTC, Chris Cormack
Details | Diff | Splinter Review
improved patch (14.01 KB, patch)
2010-05-19 17:40 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:28:01 UTC


---- Reported by colin.campbell@ptfs-europe.com 2010-05-15 13:33:05 ----

Script written as though GetBooksellerFromId returns an array. It doesn't it returns a hashref. 
Let's make life for future maintainers easy and make the code say what it does



---- Additional Comments From colin.campbell@ptfs-europe.com 2010-05-15 14:17:11 ----

Patch sent. Also removes some rather confused code in what should be a simple routine.



---- Additional Comments From colin.campbell@ptfs-europe.com 2010-05-18 10:48:33 ----

Created an attachment
Proposed Patch

NB Patch explicitly calls GetContract from C4::Contract as C4::Acquisition also included a GetContract routine. The Use statements explicitly name the routines pulled in from Contract and Acquisition otherwise you get compile time errors



---- Additional Comments From colin.campbell@ptfs-europe.com 2010-05-19 17:40:16 ----

Created an attachment
improved patch

Merging some fixes from developments elsewhere made me see that the patch could be improved, leaving supplier.pl in a cleaner, more maintainable state, I hope.
The cleaner currency loop also has all the html removed from it 



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:28 UTC  ---

This bug was previously known as _bug_ 4510 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4510
Imported an attachment (id=2135)
Imported an attachment (id=2136)

Unknown operating system Windows NT. Setting to default OS "All".
Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 2135 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
The original submitter of attachment 2136 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Galen Charlton 2010-05-24 13:47:48 UTC
Patch pushed.  Please test and close.