<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Greetings,</DIV>
<DIV> </DIV>
<DIV>One of the bugs I was working on needs a function which is duplicated in a
a couple places, so I was thinking it would be best to place it somewhere. The
question is where?</DIV>
<DIV> </DIV>
<DIV>sub getUserBranchAndCategorycode {</DIV>
<DIV> my $borrowernumber = 0;</DIV>
<DIV> my $homebranch = q{};</DIV>
<DIV> my $categorycode = q{};</DIV>
<DIV> if (C4::Context->userenv) {</DIV>
<DIV> $borrowernumber =
C4::Context->userenv->{'number'} || 0;</DIV>
<DIV> $homebranch =
C4::Context->userenv->{'branch'} || q{};</DIV>
<DIV> }</DIV>
<DIV> if ($borrowernumber) {</DIV>
<DIV> $categorycode =
C4::Members::GetBorrowerCategorycode($borrowernumber);</DIV>
<DIV> }</DIV>
<DIV> return { ‘branch’ => $homebranch, ‘categorycode’
=> $categorycode };</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>GPML,</DIV>
<DIV>Mark Tompsett</DIV></DIV></DIV></BODY></HTML>