[Koha-bugs] [Bug 19036] Number payment receipts / payment slips

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 3 11:10:28 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036

--- Comment #15 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to Julian Maurice from comment #14)
> > Hmm, I slightly wonder if it's a good idea to allow passing
> > credit_number and allowing it to override the AudoCreditNumber
> > setting.. to me if it's set then we should throw an Exception if
> > someone is trying to pass in their own?
> 
> Since credit_number can only be automatically generated, it does not make
> sense to check if it's defined or not, so I can remove this check and always
> autogenerate a value.
> I can also throw an exception.
> To me, both solutions are acceptable.
> 
> I'll let you pick the one you prefer ;)

I like throwing exceptions as it highlights errors when future devs make
mistakes.. but at the same time they have a tiny performance impact by calling
additional checks so I'm happy without if you'd rather just stop checking for
it and add a note in the POD of the store method to highlight we will be
ignoring it if passed. Your call, I'll accept either :)

> 
> > The second question here.. should this apply to ALL credit types, or
> > just a subset of those that actually deal with taking money as apposed
> > to write-offs and other types of giving credit (like LOST_ITEM_RETURN)?
> 
> I don't know, but the answer is probably... it depends :)
> Should I add a "Auto generate credit number" parameter in credit types ?

That's not a bad idea at all, and is probably reasonably trivial to add if
you're happy to do so, and will keep everbody happy :)

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


More information about the Koha-bugs mailing list