[Koha-patches] [PATCH] Bug 4510 Script processes single supplier not an array

2010-05-19 Thread Colin Campbell
Script was written as though it had an array rather than a single supplier. Replaced the excess punctuation with a single supplier variable replaced the C-style currency loop with a simpler perl-style one we only need 1 loop not multiples Changed variable name $GST to $tax_rate it's not magical an

[Koha-patches] [PATCH] Remove generation of an unnecessary warning

2010-05-19 Thread Colin Campbell
We've checked the return for definedness and assigned an empty string to it ao we don't want to make it undef again This is a good argument that cascading if-elses expecially with long unstructured elses are a bad idea --- acqui/basket.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-

[Koha-patches] [PATCH] Bug 4517 - add authentication to reorder_members.pl

2010-05-19 Thread Colin Campbell
--- serials/reorder_members.pl |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/serials/reorder_members.pl b/serials/reorder_members.pl index 66d4ab2..28175fb 100755 --- a/serials/reorder_members.pl +++ b/serials/reorder_members.pl @@ -21,12 +21,17 @@ use strict; use

[Koha-patches] [PATCH] Remove obsolete variables from basket.pl

2010-05-18 Thread Colin Campbell
basket.pl calculates variables i, odd and count which are no longer used in the template removing them allows some simplification of the main loop and cuts out on an extra db call Loop through basketgroups also made more readable Try to dimish the number of undef warnings filling the logs --- acqu

[Koha-patches] [PATCH] Bug 4510 Script processes single supplier not an array

2010-05-18 Thread Colin Campbell
Script was written as though it had an array rather than a single supplier. Replaced the excess punctuation with a single supplier variable replaced the C-style currency loop with a simpler perl-style one Changed variable name $GST to $tax it's not magical and not a constant and we all know what t

[Koha-patches] [PATCH] Bug 4510 Script processes single supplier not an array

2010-05-15 Thread Colin Campbell
Script was written as though it had an array rather than a single supplier. Replaced the excess punctuation with a single supplier variable replaced the C-style currency loop with a simpler perl-style one Changed variable name $GST to $tax it's not magical and not a constant and we all know what t

[Koha-patches] [PATCH] Bug 2505 enable warnings in serials/reorder_members.pl

2010-05-15 Thread Colin Campbell
The only serials routine without warnings enabled was a script with the least code to generate them removed the numerous Module use declarations that were not required aligned the parameters for a more aesthetically pleasing effect --- serials/reorder_members.pl | 20 +++- 1 file

[Koha-patches] [PATCH] Bug 4501 Don't return null vendor to claims processing

2010-05-14 Thread Colin Campbell
The empty vendor created by the select if any subscriptions have no associated vendor generates a 'wrong-looking' display and selecting it gives no options --- C4/Serials.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index bca9fc8..f8a9b

Re: [Koha-patches] [PATCH] [3.2] Bug 4141 Reconcile 3.0.x and HEAD database updates for 3.2.0

2010-05-12 Thread Colin Campbell
;do(< ALTER TABLE `aqbudgets` AUTO_INCREMENT=$$maxbudgetid[0] > BUDGETAUTOINCREMENT Quick thought - is it not safer to use NULL rather than 0 as the behaviour of auto_increment passed 0 is dependent on the SQL mode that MySQL is running under? (sorry scarred by an early experience of re

[Koha-patches] [PATCH] Housekeeping in errors scripts

2010-05-12 Thread Colin Campbell
Enable warnings - remove Bug 2505 FIXME messages Correct FSF address in License statement To aid code analysis tools: Call new unambiguously with arrow syntax use noninterpolating quotes on noninterpolating strings --- errors/400.pl | 12 ++-- errors/401.pl | 13 ++--- errors/4

Re: [Koha-patches] [PATCH] Bug 3928: Modification of date for serials.

2010-05-11 Thread Colin Campbell
ed !!! > > Good catch, I missed spotting that when I cherry picked it over. > Patch to the cherry-picked patch posted C. -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) co

[Koha-patches] [PATCH] Bug 3928: Modified date should follow syspref

2010-05-11 Thread Colin Campbell
Changed arriveddate format to follow syspref Fixed a whitespace error --- serials/serials-edit.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index bd7d420..b407ca9 100755 --- a/serials/serials-edit.pl +++ b/serials/

[Koha-patches] [PATCH] Do not declare variables within (bogus) conditionals

2010-05-11 Thread Colin Campbell
if $index is unnecessary as we have made this true 5 lines above variables should not be declared in conditionals if used outside of them set $struct_attr to a sensible default to avoid generating warnings in this assigment and elsewhere --- C4/Search.pm |6 +++--- 1 files changed, 3 insertion

[Koha-patches] [PATCH] Bug 4450 Use more consistent error returns in C4/Creators/*

2010-05-05 Thread Colin Campbell
A lot of routines were defaulting to return -1 in error conditions but calling code was expecting a ref or object use return with explicit undef (or emptyness in array context) for these cases. Extended this to cases where return was not tested ( -1 might in some cases be legit data). --- C4/Creat

[Koha-patches] [PATCH] Bug 4151 - Add DateTime to Perl dependencies

2010-05-03 Thread Colin Campbell
Used in Sip.pm --- Makefile.PL |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index c88d5ea..a31d6db 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -550,6 +550,7 @@ WriteMakefile( 'DBD::mysql' =>

[Koha-patches] [PATCH] Bug 4333 Fix erroneous message re Active Currency

2010-04-30 Thread Colin Campbell
Script was incorrectly asking user to define an active currency Now test for active currency in the standard way Use the currency routines in Budgets where applicable Move the code paths in the if else to subroutines to clarify flow Enable warnings --- admin/currency.pl | 258

[Koha-patches] [PATCH] Bug 4333 Fix erroneous message re Active Currency

2010-04-30 Thread Colin Campbell
Ooops posted the wrong version here's the correct patch ___ Koha-patches mailing list Koha-patches@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-patches

[Koha-patches] [PATCH] Bug 4333 Fix erroneous message re Active Currency

2010-04-30 Thread Colin Campbell
Script was incorrectly asking user to define an active currency Now test for active currency in the standard way Use the currency routines in Budgets where applicable Move the code paths in the if else to subroutines to clarify flow Enable warnings --- admin/currency.pl | 257

[Koha-patches] [PATCH] Bug 4333 Fix erroneous message re Active Currency

2010-04-16 Thread Colin Campbell
Script was incorrectly asking user to define an active currency Now test for active currency in the standard way Use the currency routines in Budgets where applicable Move the code paths in the if else to subroutines to clarify flow Enable warnings --- admin/currency.pl | 258

[Koha-patches] Pull Request

2010-04-08 Thread Colin Campbell
on current 3.2 HEAD. These are not major new functionality, but a series of fixes to eradicate some randomness caused by undefined values. Includes a commit to fix Licenses in the serials directory. Credit due to the staff at fao for their testing, feedback and perseverance. Colin -- Colin

[Koha-patches] [PATCH] bug 4378 Missing option prompt for IntranetBiblioDefaultView syspref

2010-04-08 Thread Colin Campbell
labeled_marc ioption was omitted (spelling police?) options available now match those in code --- .../en/modules/admin/preferences/cataloguing.pref |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref

[Koha-patches] [PATCH] Bug 4361 Return Patron Expired to Sip Process

2010-04-07 Thread Colin Campbell
Identify Patron Expiry so that it is returned in Patron Info Response --- C4/SIP/ILS/Patron.pm | 25 - 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 386287b..2a73307 100644 --- a/C4/SIP/ILS/Patron.pm +++

[Koha-patches] [PATCH] Bug 4364 - SIP Checkout dates incorrect

2010-04-01 Thread Colin Campbell
Change timestamp routine to do the right thing when passed an iso date Otherwise was generating an epoch date of 0 --- C4/SIP/Sip.pm |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 558a1d4..44d877e 100644 --- a/C4/SIP/Sip.pm +++ b

[Koha-patches] [PATCH] Bug 3498 Allow Partial Payment in Fines

2010-03-29 Thread Colin Campbell
Allow partial payment of outstanding fines either against individual fine entries or as a lump payment. Sponsered by East Brunswick Public Library, East Brunswick, NJ, USA --- C4/Accounts.pm | 101 ++- .../intranet-tmpl/prog/en/modules/members/pay.tmpl |

[Koha-patches] [PATCH] Remove some warnings in manual invoice/credit

2010-03-26 Thread Colin Campbell
--- C4/Accounts.pm|3 +-- members/mancredit.pl |5 - members/maninvoice.pl |5 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index bce9c19..c7e05bc 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -454,7 +454,6 @@ s

[Koha-patches] [PATCH] Bug 2889 Remove toggle in boraccount display

2010-03-26 Thread Colin Campbell
Also remove the reverse column if no contents to be displayed ( otherwise looks like a markup error ) Rationalize the main loop now toggle not required --- .../prog/en/modules/members/boraccount.tmpl|6 ++- members/boraccount.pl | 60 +++

[Koha-patches] [PATCH] Bug 4333 Fix erroneous message re Active Currency

2010-03-24 Thread Colin Campbell
Script was incorrectly asking user to define an active currency Now test for active currency in the standard way Use the currency routines in Budgets where applicable Move the code paths in the if else to subroutines to clarify flow Enable warnings --- admin/currency.pl | 258

[Koha-patches] [PATCH 2/2] Bug 4331 Remove cruft from acqui-home script

2010-03-23 Thread Colin Campbell
Remove unnecessary db calls and processing from acqui-home.pl Do not duplicate processing of fields Declare variables closer to use Remove unnecessary holding vars Replace some anonymous var names by something more meaningful Do not generate a toggle variable use Template's LOOP vars --- acqui/acq

[Koha-patches] [PATCH 1/2] Bug 4331 Index aqorders by budget_id

2010-03-23 Thread Colin Campbell
Calculation of budget spent and encumbered is done by queries on aqorders by budget_id Index budget_id to speed these queries --- installer/data/mysql/kohastructure.sql |2 ++ installer/data/mysql/updatedatabase.pl |7 +++ kohaversion.pl |2 +- 3 files chang

[Koha-patches] [PATCH] Refactor for Human Readability

2010-03-19 Thread Colin Campbell
Fixes generation of empty index page when total_parcels is a multiple of pagesize Remove some calculations whose results were not used Make variable names meaningful (results and count arnt) Fix errors in pod syntax Make what code does clearer to readers who are not computers Use a subroutine ---

Re: [Koha-patches] [PATCH] (bug #4321) clean C4::Biblio::GetBiblio and uses

2010-03-18 Thread Colin Campbell
On 18/03/10 14:30, Colin Campbell wrote: > for dafer code. Oops that should be safer (though I've generated my fair share of dafter code over the years) C. -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (ph

Re: [Koha-patches] [PATCH] (bug #4321) clean C4::Biblio::GetBiblio and uses

2010-03-18 Thread Colin Campbell
y with one element ( i.e. [ undef, ] ). Better to just return; which returns undef in a scalar context and an empty array in an array context. Makes for dafer code. Colin -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1

[Koha-patches] [PATCH] Bug 4248 Rework Cities dropdown for members entry

2010-02-24 Thread Colin Campbell
Garry Collum's patch correctly identified the core flaw in operation looking closer revealed some other flaws (2 "blank" options, some vars and documentation belonging to a superceded version, etc. Changed GetCities to return a structure rather than the messy two returns Let the template do the con

[Koha-patches] [PATCH] Bug 2653 Protect against sending End of Message in Text

2010-02-23 Thread Colin Campbell
Remove any carriage returns in text data as they will be interpreted as end of message by clients and cause communication failure --- C4/SIP/Sip.pm |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm index 558a1d4..f176516 100644 --- a/C4/SIP/Sip

[Koha-patches] [PATCH 2/2] Make GetBooksellerFromId error return consistent

2010-02-18 Thread Colin Campbell
return undef or empty array in error cases hopefully if we're consistent someone may start checking it removed unnecessary ()s --- C4/Bookseller.pm |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm index 655d25e..63df90d 100644 --- a/

[Koha-patches] [PATCH 1/2] bookseller is returned as a scalar hashref not an array

2010-02-18 Thread Colin Campbell
--- admin/aqcontract.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl index 81cc640..5fe7be3 100755 --- a/admin/aqcontract.pl +++ b/admin/aqcontract.pl @@ -35,7 +35,7 @@ my $contractnumber = $input->param('contractnumber'); m

[Koha-patches] [PATCH] Bug 3654 Fix sql syntax error in earlier patch

2010-02-16 Thread Colin Campbell
mysql comments require a space after the -- --- installer/data/mysql/en/optional/auth_val.sql |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/en/optional/auth_val.sql b/installer/data/mysql/en/optional/auth_val.sql index 5a39534..12856d0 100644 --- a

[Koha-patches] [PATCH] Change default AUTH_INDEX_MODE to dom

2010-02-12 Thread Colin Campbell
dom is the recommended authorities indexing mode in external docs making it default accepts what appears to be the de facto preference see Indexdata's documentation for more details on the options --- Makefile.PL |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.PL

[Koha-patches] [PATCH] Bug 4163 Preserve budget value unless changed by user

2010-02-11 Thread Colin Campbell
--- acqui/neworderempty.pl | 30 --- .../prog/en/modules/acqui/neworderempty.tmpl |8 - 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index 9fb1870..cedec85 100755 --- a/a

[Koha-patches] [PATCH] bugfix suppress warnings coming from acquisitions homepage

2010-02-11 Thread Colin Campbell
Before formatting and doing arithmetic with them we should ensure undefined numeric elements are numbers (This should be enforced in the db) --- acqui/acqui-home.pl | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 01

[Koha-patches] [PATCH] bugfix move and rename test.pl

2010-02-10 Thread Colin Campbell
Script test.pl was added to the top level directory Due to the name this gets run in a make test and end in error I suspect it was comitted in error moved and renamed so it dosent get in the way --- misc/split_test.pl | 30 ++ test.pl| 30 ---

[Koha-patches] [PATCH] Bug 4147 Correct name of external javascript file

2010-02-10 Thread Colin Campbell
An earlier patch inadvertantly reverted a name change in the template --- .../opac-tmpl/prog/en/modules/opac-basket.tmpl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ba

[Koha-patches] [PATCH] bugfix Dates.t test plan has wrong value

2010-02-10 Thread Colin Campbell
--- t/Dates.t |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/Dates.t b/t/Dates.t index 0f0cbc2..da6f377 100644 --- a/t/Dates.t +++ b/t/Dates.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 192; +use Test::More tests => 276; BEGIN { use

Re: [Koha-patches] [PATCH] Bringing label, patroncard, and creator modules into conformity with the rest of C4 style.

2010-02-09 Thread Colin Campbell
On 08/02/10 20:15, Chris Nighswonger wrote: > +our @EXPORT = qw(get_all_templates > -our @EXPORT_OK = qw(get_all_templates I'm not sure replacing EXPORT_OK with EXPORT can be called progress. A migration in the other direction might be considered 'A Good Thing&#x

[Koha-patches] [PATCH] Bug 4140 label edit template links to non-existent script

2010-02-08 Thread Colin Campbell
changed link to point at labels script --- .../en/modules/labels/label-edit-template.tmpl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-e

[Koha-patches] [PATCH] Bug 4133 Amend kohastructure to reflect earlier patch

2010-02-08 Thread Colin Campbell
updatedatebase is now setting aqorders.quantityreceived to NOT NULL kohastructure needs bringing into line --- installer/data/mysql/kohastructure.sql |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructu

[Koha-patches] [PATCH] Bug 3810 Mail::Sendmail should not fail silently

2010-02-08 Thread Colin Campbell
The return from Mail::Sendmail should always be checked Output the error message if it fails so we have some indication of where to start looking if it fails --- C4/Letters.pm | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.p

[Koha-patches] [PATCH] Bug 4133 Ensure that orders have a valid quantity received

2010-02-08 Thread Colin Campbell
quantityreceived drives other parts of acq noticeably budget balances ensure that a number (usually 0) is set in NewOrder give field a valid default and set as not null reinterpret exsting nulls in table as zero --- C4/Acquisition.pm |3 +++ installer/data/mysql/updatedata

[Koha-patches] [PATCH] Remove cause of some warnings in order display

2010-02-08 Thread Colin Campbell
--- C4/Acquisition.pm |2 +- acqui/basket.pl |8 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 148d3a1..80dd667 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1009,7 +1009,7 @@ sub NewOrder { die "

[Koha-patches] [PATCH] Bug 4117 Fix system error in routing slip recepients popup

2010-02-05 Thread Colin Campbell
order_by parameter should be an arrayref of hashrefs Have made order surname, firstname asc (see bug 4067) do not generate logged warnings by manipulating undef --- serials/member-search.pl | 28 +++- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/serials

[Koha-patches] [PATCH] Bug 4108 Catch cases when GetMember is generating errors

2010-02-04 Thread Colin Campbell
Fixed two calls where new interface was not used Arguably new syntax allows more options than we require but it was not catching error cases (when 0 or undef is passed). It also can now be called in ways which would validly return multiple hits but explicitly does not (nor does calling code expect

[Koha-patches] [PATCH] Bug 3808 Display correct number of records in neworderbiblio screen

2010-02-03 Thread Colin Campbell
New version of patch to apply against 3.2alpha Also remove related FIXME message that was displaying to the user --- acqui/neworderbiblio.pl| 14 +- .../prog/en/modules/acqui/neworderbiblio.tmpl |2 +- 2 files changed, 6 insertions(+), 10 deletion

[Koha-patches] [PATCH] Fix pod markup errors in C4/Budgets.pm

2010-02-03 Thread Colin Campbell
--- C4/Budgets.pm | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 4a8b3b6..8d0a2f0 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -630,14 +630,14 @@ sub DelBudget { return $rc; } -=back - =head2 FUNCTIONS ABOUT B

[Koha-patches] [PATCH] Bug 4095 Remove incorrect help text

2010-02-02 Thread Colin Campbell
Subscription end date is required before receiving against the subscription. If not set the subscription needs renewal before use. --- .../prog/en/modules/serials/subscription-add.tmpl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modul

[Koha-patches] [PATCH] Bug 4088 Due Date Not formated in checkout response

2010-02-02 Thread Colin Campbell
due date was not being formatted as a timestamp but being passed as epoch seconds --- C4/SIP/Sip/MsgType.pm |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 1b210ca..d0550e3 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4

[Koha-patches] [PATCH] Fix some code issues in serials scripts

2010-02-01 Thread Colin Campbell
Add use warnings where not present Remove unused variables Avoid redeclarations of variables trailing spaces trimmed --- serials/acqui-search-result.pl |4 +- serials/checkexpiration.pl |2 +- serials/claims.pl |1 - serials/lateissues-excel.pl|

[Koha-patches] [PATCH] Bug 4083 subroutine HasItems needs to be exported

2010-02-01 Thread Colin Campbell
Calls to the unexported subroutine result in system error --- C4/Serials.pm |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 0b70099..d72e98c 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -56,6 +56,7 @@ BEGIN { &reorder_members

[Koha-patches] [PATCH] Correct misleading text

2010-01-14 Thread Colin Campbell
Some koha acq terminology is confusing to new users so lets at least be consistent in our usages we are adding to the basket here not an order --- .../prog/en/modules/acqui/basket.tmpl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/pr

[Koha-patches] [PATCH] Bug 3945 NULL is not a valid Supplier id

2010-01-05 Thread Colin Campbell
Get SuppliersWithLateIssues should return a list of suppliers If you have subscriptions with no supplier it also returned a invalid supplier with a null id and null name. This patch ignores the non-supplier supplier --- C4/Serials.pm |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) di

[Koha-patches] [PATCH] Fix count in supplier dropdown in serials/claims.pl

2010-01-05 Thread Colin Campbell
Previous patch still used old variable name to get count causing incorrect value to be returned --- serials/claims.pl |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/serials/claims.pl b/serials/claims.pl index d6a7ce7..8ff672f 100755 --- a/serials/claims.pl +++ b/serials

[Koha-patches] [PATCH] Bug 766 Remove scrolling list from serials claims

2010-01-05 Thread Colin Campbell
Let templating system do what its designed for pass an array ref with the suppliers --- .../prog/en/modules/serials/claims.tmpl|7 - serials/claims.pl | 30 --- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/k

[Koha-patches] [PATCH] Fix some code issues in circulation/returns

2010-01-05 Thread Colin Campbell
Fix obvious warning generators use of string comparison on numeric values use of capture variables without testing comparison reuse of variable names in same lexical scope Tidy some layout issues remove commented out code remove unused variables remove tabs from mixed space tab layouts rewri

[Koha-patches] [PATCH] bug 3821 -Suppress error on add item from subscriptions receive

2009-12-07 Thread Colin Campbell
Serials receiving thinks undef is a valid value for indicators Reset to space space if that received --- C4/Biblio.pm | 26 ++ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index cf48c91..31333b0 100644 --- a/C4/Biblio.pm +++

[Koha-patches] [Bug 3828] Add dependency Authen::CAS::Client

2009-12-02 Thread Colin Campbell
Required CPAN module was missing from deoendency list --- Makefile.PL |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index aeeba7f..ae93b7f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -537,6 +537,7 @@ WriteMakefile( NO_META

[Koha-patches] [PATCH] Bug 3818 Allow 10 characters in bookfund id input

2009-11-30 Thread Colin Campbell
Field is varchar(10) allow all characters to be used --- .../prog/en/modules/admin/aqbookfund.tmpl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqboo

[Koha-patches] [PATCH] Bug 3810 Mail::Sendmail should not fail silently

2009-11-25 Thread Colin Campbell
The return from Mail::Sendmail should always be checked This is not a solution to problems with claims etc but at least we should have some minimal debugging if it does nothing --- C4/Letters.pm |8 C4/Suggestions.pm |3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) di

[Koha-patches] [PATCH] Bug 3808 Fix off by one error in script

2009-11-24 Thread Colin Campbell
Script was supplying an extra empty record to the template Changed loop to remove the extra variable that was tempting us into the error. Removed the element highlight as the template didn't use (or need) it --- acqui/neworderbiblio.pl | 17 - 1 files changed, 8 insertions(+), 9

[Koha-patches] [PATCH] Bug 3805 Suppress basket invoice number display

2009-11-23 Thread Colin Campbell
Dont display unpopulated field --- .../prog/en/modules/acqui/neworderempty.tmpl |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index

[Koha-patches] [PATCH] Bug 3805 Suppress display of basket level invoice no

2009-11-23 Thread Colin Campbell
The aqbasket invoice number is not the one populated on receipt as the order line invoice number is the field used elsewhere suppress the unpopulated field from the basket display --- .../prog/en/modules/acqui/basket.tmpl |1 - 1 files changed, 0 insertions(+), 1 deletions(-) dif

[Koha-patches] [PATCH] Bug 3804 Add search by Purchase Order number To Acq Screens

2009-11-23 Thread Colin Campbell
Allows searching by purchase order number in acq screens Add PO Number to histsearch results display for consistency This feature sponsored by UN-FAO --- C4/Acquisition.pm | 29 +++ acqui/posearch.pl | 56 ++ ..

[Koha-patches] [PATCH] Bug 3803 Add PO Number and ISSN to orders display in basket

2009-11-23 Thread Colin Campbell
Removed some old code from basket display Added use warnings to basket.pl Suppress some warnings generated in basket.pl --- C4/Acquisition.pm | 11 +--- acqui/basket.pl| 53 ++-- .../prog/en/modules/acqui/bask

[Koha-patches] [PATCH 3/3] Basic refactoring of serials-edit.pl

2009-11-20 Thread Colin Campbell
Removed some useless counts from serials-edit / Serials interfaces Removed old commented out code. Unrequired variables Reformatted code so that improving logic can be done more easily --- C4/Serials.pm | 15 +-- serials/serials-edit.pl | 442 +++---

[Koha-patches] [PATCH 1/3] Remove unused or unnecessary variables from claims processing

2009-11-20 Thread Colin Campbell
Moved generation of dropdown to template from script Removed the unnecessary count variable returned by C4::Serials::GetLateIssues C4::Serials::GetLateMissingIssues --- C4/Serials.pm | 37 +++- .../prog/en/modules/serials/claims.tmpl

[Koha-patches] [PATCH 2/3] Cleanup date handling in routing.pl

2009-11-20 Thread Colin Campbell
Remove dead code Clarify the loop assigning dates Remove the cause of undef warnings in the log --- serials/routing.pl | 44 1 files changed, 16 insertions(+), 28 deletions(-) diff --git a/serials/routing.pl b/serials/routing.pl index d49d450..9e969a

[Koha-patches] [PATCH 0/3] Code cleanups in serials

2009-11-20 Thread Colin Campbell
y aid maintainability. The can also be found in the fao-patches branch of git://github.com/colinsc/koha.git Colin Campbell (3): Remove unused or unnecessary variables from claims processing Cleanup date handling in routing.pl Basic refactoring of serials-edit.pl C4/Seria

[Koha-patches] [PATCH] (Bug 3767 - Return error if checkin passed an invalid item

2009-11-04 Thread Colin Campbell
If an invalid item barcode is passed to checkin the sip2 connection dies. This is because although no item object is created its mehods are called in Checkin To maintain the connection properly catch the condition and return the correct response to the unit (should also fix Bug #3696 ) --- C4/SIP/

[Koha-patches] [PATCH] Bug 3723 Correct return of Institution in Patron Info Resp

2009-10-21 Thread Colin Campbell
While the comment correctly notes that the order of variable length fields is not fixed some units expect mandatory fields to follow the sequence in the protocol definition and fail parsing otherwise. Moved institution id to its expected place in the patron information response. Indented the first

[Koha-patches] [PATCH] Bug 3713 Don't ignore existing value in branch values

2009-10-15 Thread Colin Campbell
When editing items the user library rather than the existing value was being set as the default value in branch fields of the item --- cataloguing/additem.pl |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index e25bb44..4

[Koha-patches] [PATCH] Bug 3697 Return due date (SIP Field AH) in item info

2009-10-09 Thread Colin Campbell
Although the due date of an on loan item was being retrieved the appropriate field in the Item object was not set causing the due date not to be returned in the item information response --- C4/SIP/ILS/Item.pm |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/SIP/ILS/Item

[Koha-patches] [PATCH] Bug 3700 Parameters passed in wrong sequence

2009-10-09 Thread Colin Campbell
As subsequent operations don't get what they expect all manner of nastiness ensues --- serials/serials-edit.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index 9994e44..86e594e 100755 --- a/serials/serials-edit.pl +

[Koha-patches] [PATCH] Remove unused or unnecessary variables in claims processing

2009-10-07 Thread Colin Campbell
Also cleaned the interface to the claims related functions in Serials so they do not return and extra count variable moved generation of dropdown to template instead of inline code --- C4/Serials.pm | 37 +++- .../prog/en/modules/serials/claim

[Koha-patches] [PATCH] Bug 2505 Enabled warnings in authorities/*

2009-10-02 Thread Colin Campbell
Fixed obvious warnings generators in scripts with mismatched comparisons or undefined variables removed temporary variable selected while ensuring the comparison it represented was between two defined variables --- C4/AuthoritiesMarc.pm|2 +- authorities/auth_finder.pl

[Koha-patches] [PATCH 2/2] Enable warnings in marctagstructure.pl

2009-10-01 Thread Colin Campbell
Fix a couple of comparisons generating warnings --- admin/marctagstructure.pl |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index acd8cd7..a9ae892 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructur

[Koha-patches] [PATCH 1/2] Enable warnings in koha2marclinks.pl

2009-10-01 Thread Colin Campbell
Fix code generating warnings with warnings enabled --- admin/koha2marclinks.pl | 24 +++- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index e65e1e5..8e0e105 100755 --- a/admin/koha2marclinks.pl +++ b/admin

[Koha-patches] [PATCH] Bug 3167 Remove redundant link from accession date

2009-09-29 Thread Colin Campbell
Removes the redundant link from the label accession date to orderreceive.pl accessing the link invariably generates an error it is also not clear what anyone following the link would expect to access if it were working --- .../prog/en/modules/catalogue/moredetail.tmpl |3 +-- 1 files chan

[Koha-patches] [PATCH] Bug 3657 - Remove the requirement for librarian text in authority subfields

2009-09-23 Thread Colin Campbell
Previously could not add or update subfields in MARC Authority Subfield Structure if no Librarian Text supplied Requirement removed --- admin/auth_subfields_structure.pl |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfi

[Koha-patches] [PATCH] Bug 3647 Fix to summary item fields in Patron Info Response

2009-09-18 Thread Colin Campbell
Item is a hash reference. We need to specify the field in the hash to fill the data field not the hash itself. Where no barcode field is present but we have an itemnumber retrieve the item details to provide the barcode in the hash to fill the data field not the hash itself. --- C4/SIP/Sip/MsgType

[Koha-patches] [PATCH] add PTFS-Europe as a contributing company

2009-09-17 Thread Colin Campbell
--- koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl index 3a64ef9..e1fb45c 100644 --- a/koha-tmpl/intranet-tmpl/prog/

Re: [Koha-patches] [PATCH] bug 3638 On CheckIn via SIP update the Hold status to waiting if Reserved

2009-09-16 Thread Colin Campbell
the device checks-in and routes holds and transits as if a normal checkin and one where it checks in the book but needs a second manual checkin before placing the book on the hold-shelf (much as if the pickup location was another branch). Comments and suggestions welcome. C. -- Colin Campbel

[Koha-patches] [PATCH] Ensure op is defined in serials scripts

2009-09-16 Thread Colin Campbell
Set $op to an empty string if no value passed otherwise the error-log fills with warnings on comparison --- serials/serials-collection.pl |3 +-- serials/serials-recieve.pl |2 +- serials/statecollection.pl |2 +- serials/subscription-bib-search.pl |2 +- seria

[Koha-patches] [PATCH] bug 3638 On CheckIn via SIP update the Hold status to waiting if Reserved

2009-09-16 Thread Colin Campbell
Hold status was unchanged when on-hold items were returned via the SIP2 interface. --- C4/SIP/ILS/Transaction/Checkin.pm | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm index d3a4700..23d778

[Koha-patches] [PATCH] Avoid unnecessary warnings in reserve/modrequest.pl

2009-09-15 Thread Colin Campbell
--- reserve/modrequest.pl | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl index 8b7d8ee..f47e112 100755 --- a/reserve/modrequest.pl +++ b/reserve/modrequest.pl @@ -70,11 +70,12 @@ else { } } my $from=$query->pa

[Koha-patches] [PATCH 4/4] bug 3614 Fix incorrect setting of indicator

2009-09-14 Thread Colin Campbell
Pull the code into its own subr so that the dangers of inaccurate copy & paste are avoided in future --- C4/Biblio.pm | 27 +++ 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index cdb119f..b851bc0 100644 --- a/C4/Biblio.pm +++

[Koha-patches] [PATCH] bug 3614 Fix incorrect setting of indicator

2009-09-14 Thread Colin Campbell
--- C4/Biblio.pm |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index cdb119f..96e86a7 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1709,8 +1709,8 @@ sub TransformHtmlToXml { else { my $i

[Koha-patches] [PATCH] Update some DBI interactions

2009-09-07 Thread Colin Campbell
remove unnecessary calls to finish let DBI return an array instead of looping to create one make some SQL oneliners more succinct --- C4/Bookfund.pm | 43 --- 1 files changed, 8 insertions(+), 35 deletions(-) diff --git a/C4/Bookfund.pm b/C4/Bookfund.pm i

[Koha-patches] [PATCH] Enable warnings in serial scripts

2009-09-07 Thread Colin Campbell
Remove some superfluous variables Simplify some loops over lists Fix generated warnings Strip whitespace from line endings --- serials/acqui-search-result.pl | 45 ++- serials/acqui-search.pl| 28 +++--- serials/checkexpiration.pl

[Koha-patches] [PATCH] Return barcode as Sip hold_patron_id

2009-09-06 Thread Colin Campbell
Behave consistently with other patron_ids as many sip clients use this in a subsequent patron information or patron status request --- C4/SIP/ILS/Item.pm| 13 + C4/SIP/Sip/MsgType.pm |2 +- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/C4/SIP/ILS/Item.pm b/C

[Koha-patches] [PATCH] enable warnings in overduerules.pl Call GetBranchesLoop instead of duplicating code make countletters a count as it says check for definedness before doing string comparisons do

2009-09-04 Thread Colin Campbell
--- tools/overduerules.pl | 35 --- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/tools/overduerules.pl b/tools/overduerules.pl index ec50ff8..e14d1d8 100755 --- a/tools/overduerules.pl +++ b/tools/overduerules.pl @@ -18,12 +18,13 @@ # Suite 33

Re: [Koha-patches] [PATCH] Bug Fixing : Bullet Proofing

2009-08-26 Thread Colin Campbell
date_due'} } @$issues if > ($issues); > Would it not be preferable to declare @issue_list outside of the conditional? C. -- Colin Campbell Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) col

[Koha-patches] [PATCH] Avoid numeric comparisons with leading zeroes

2009-08-20 Thread Colin Campbell
Numbers in perl with leading zeros are interpreted in octal Ensure that comparisons are done using string operators or where appropriate use the MARC::Field method --- C4/Record.pm |2 +- cataloguing/addbiblio.pl |2 +- misc/batchCompareMARCvsFramewo

  1   2   >