[Koha-bugs] [Bug 10262] fine calculation at checkin not respecting CircControl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 28 21:25:43 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10262

--- Comment #13 from Kyle M Hall <kyle.m.hall at gmail.com> ---
(In reply to comment #12)
> Pushed to master because this patch resolves the discrepancy, but I must
> confess to a number of reservations:
> 
> - the same section of code sets and uses both $control_branchcode and
> $circControlBranch

Yes, that is rather ugly. _GetCircControlBranch does a lot of under the hood
logic, far more than the new statement, but I think the results would be this
same. So we can unify that.

> - the patch effectively adds copy-pasta rather than moving more of the
> fine-calculation code into a routine that could be shared by fines.pl and
> AddReturn()

Agreed, that should be remedied.

> - the fact that the patch couldn't use _GetCircControlBranch and is
> overloading the PickupLibrary value for CircControl, while consistent with
> fines.pl, is IMO stretching the CircControl syspref a bit too far.

Should we make fines.pl use _GetCircControlBranch as well?

> - the patch include whitespace changes that obscured its purpose

My bad, I have a perltidy addiction. I just can't help myself ; )

> - this patch is crying out for DB-dependent test cases

Agreed!

I'm willing to followup on this to clean up this code. It seems logical to
unify all this logic under the banner of _GetCircControlBranch, would you
agree?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list