https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19036
--- Comment #15 from Martin Renvoize <[email protected]> --- (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. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
