[Koha-patches] [PATCH] Bug 5872 : Circulation management enhancements

Mike Hafen mdhafen at tech.washk12.org
Wed Mar 16 16:08:23 CET 2011


Merge conflict marker snuck in there.

On Tue, Mar 15, 2011 at 6:44 PM, Chris Cormack <chrisc at catalyst.net.nz>wrote:

> See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5872 for
> details
> ---
>
> diff --git a/C4/Reserves.pm b/C4/Reserves.pm
> index 2dd2688..12756ee 100644
> --- a/C4/Reserves.pm
> +++ b/C4/Reserves.pm
> @@ -1418,18 +1654,50 @@ sub ToggleLowestPriority {
>          WHERE biblionumber = ?
>          AND borrowernumber = ?"
>     );
> -    $sth->execute(
> -        $biblionumber,
> -        $borrowernumber,
> -    );
> +    $sth->execute( $biblionumber, $borrowernumber, );
>     $sth->finish;
>
>     _FixPriority( $biblionumber, $borrowernumber, '999999' );
>  }
>
> +=head2 CanHoldOnShelf
> +
> +my $canhold = &CanHoldOnShelf($itemnumber);
> +
> + Check if a book can be hold on shelf.
> +
> +=cut
> +
> +sub CanHoldOnShelf {
> +    my ($itemnumber) = @_;
> +
> +    my $item = C4::Items::GetItem($itemnumber);
> +    my $itemtype = C4::Context->preference('item-level_itypes');
> +    $itemtype = $itemtype ? $item->{itype} : $item->{itemtype} ;
> +    my $branch = $item->{C4::Context->preference('HomeOrHoldingBranch')};
> +
> +    my $issuingrule = GetIssuingRule('*', $itemtype, $branch);
> +    return $issuingrule->{allowonshelfholds};
> +
> +}
> +
> +sub CanHoldMultipleItems {
> +  my ( $itemtype ) = @_;
> +
> +  my @multi_itemtypes = split( / /,
> C4::Context->preference('AllowMultipleHoldsPerBib') );
> +  for my $mtype ( @multi_itemtypes ) {
> +    if ( $itemtype eq $mtype ) {
> +      return 1;
> +    }
> +  }
> +
> +  return 0;
> +}
> +
>  =head2 _FixPriority
> +>>>>>>> [MT2355] Ergonomy improvement in smart rule management
>
> -  &_FixPriority($biblio,$borrowernumber,$rank,$ignoreSetLowestRank);
>
> +&_FixPriority($biblio,$borrowernumber,$rank,$ignoreSetLowestRank,$reservenumber);
>
>  Only used internally (so don't export it)
>  Changed how this functions works #
>
> [Message clipped]
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20110316/852e01f8/attachment.htm>


More information about the Koha-patches mailing list