https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35421
--- Comment #4 from Emmi Takkinen <[email protected]> --- As a side note, I realized that we don't really need to check if patron is child when "ChildNeedsGuarantor" is enabled. It's enough to check if patrons category has "Can be guarantee" set. Secondly, I'm now second guessing this line: if ( ( $op eq 'save' || $op eq 'insert' ) && $guarantor->is_child || $guarantor->category->can_be_guarantee ) { push @errors, 'ERROR_guarantor_is_guarantee'; } In this too, we could get rid of $guarantor->is_child. And yeah, I can see where the confusion comes. This doesn't prevent all situations where of someone being both guarantee and guarantor. They can be also guarantor as long as their category type doesn't have "Can be guarantee" set. And "ChildNeedsGuarantor" and error "Child patron needs guarantor." have to be changed. Actually, I'm not sure anymore if "ChildNeedsGuarantor" should be a global syspref. Instead it should be category specific like "Can be guarantee" (something like "Guarantor is mandatory"). It would be more flexible. -- You are receiving this mail because: You are the assignee for the bug. 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/
