Takes a Koha::Item object and the return branch branchcode as arguments.
Uses the contents of the SIP2SortBinMapping syspref to determine the sort_bin value that should be returned for an item checked in via SIP2.
The mapping should be:
<branchcode>:<item field>:<comparator>:<item field value>:<sort bin number>
The field comparison triplet is repeatable, so you may include multiple sections
:<item field>:<comparator>:<item field value>:
For example:
CPL:itype:eq:BOOK:1 CPL:location:eq:OFFICE:2 CPL:classmark:<:339.6:3 CPL:itype:eq:BOOK:ccode:eq:TEEN:4
This will give:
Returns the ID of the appropriate sort_bin, if there is one, or undef.