View | Details | Raw Unified | Return to bug 8167
Collapse All | Expand All

(-)a/C4/Circulation.pm (-3 / +7 lines)
Lines 668-673 sub CanBookBeIssued { Link Here
668
    my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_;
668
    my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_;
669
    my %needsconfirmation;    # filled with problems that needs confirmations
669
    my %needsconfirmation;    # filled with problems that needs confirmations
670
    my %issuingimpossible;    # filled with problems that causes the issue to be IMPOSSIBLE
670
    my %issuingimpossible;    # filled with problems that causes the issue to be IMPOSSIBLE
671
    my %alerts;               # filled with messages that shouldn't stop issuing, but the librarian should be aware of.
672
671
    my $item = GetItem(GetItemnumberFromBarcode( $barcode ));
673
    my $item = GetItem(GetItemnumberFromBarcode( $barcode ));
672
    my $issue = GetItemIssue($item->{itemnumber});
674
    my $issue = GetItemIssue($item->{itemnumber});
673
	my $biblioitem = GetBiblioItemData($item->{biblioitemnumber});
675
	my $biblioitem = GetBiblioItemData($item->{biblioitemnumber});
Lines 849-856 sub CanBookBeIssued { Link Here
849
    {
851
    {
850
        $issuingimpossible{RESTRICTED} = 1;
852
        $issuingimpossible{RESTRICTED} = 1;
851
    }
853
    }
852
    if ( $item->{'itemlost'} ) {
854
    if ( $item->{'itemlost'} && C4::Context->preference("IssueLostItem") ne 'nothing' ) {
853
        $needsconfirmation{ITEM_LOST} = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} );
855
        my $code = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} );
856
        $needsconfirmation{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'confirm' );
857
        $alerts{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'alert' );
854
    }
858
    }
855
    if ( C4::Context->preference("IndependantBranches") ) {
859
    if ( C4::Context->preference("IndependantBranches") ) {
856
        my $userenv = C4::Context->userenv;
860
        my $userenv = C4::Context->userenv;
Lines 927-933 sub CanBookBeIssued { Link Here
927
            }
931
            }
928
        }
932
        }
929
    }
933
    }
930
    return ( \%issuingimpossible, \%needsconfirmation );
934
    return ( \%issuingimpossible, \%needsconfirmation, \%alerts );
931
}
935
}
932
936
933
=head2 AddIssue
937
=head2 AddIssue
(-)a/circ/circulation.pl (-1 / +3 lines)
Lines 279-288 if ($borrowernumber) { Link Here
279
#
279
#
280
if ($barcode) {
280
if ($barcode) {
281
    # always check for blockers on issuing
281
    # always check for blockers on issuing
282
    my ( $error, $question ) =
282
    my ( $error, $question, $alerts ) =
283
    CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
283
    CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess );
284
    my $blocker = $invalidduedate ? 1 : 0;
284
    my $blocker = $invalidduedate ? 1 : 0;
285
285
286
    $template->param( alert => $alerts );
287
286
    delete $question->{'DEBT'} if ($debt_confirmed);
288
    delete $question->{'DEBT'} if ($debt_confirmed);
287
    foreach my $impossible ( keys %$error ) {
289
    foreach my $impossible ( keys %$error ) {
288
        $template->param(
290
        $template->param(
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 365-367 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
365
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo');
365
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacBrowseResults','1','Disable/enable browsing and paging search results from the OPAC detail page.',NULL,'YesNo');
366
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer');
366
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SvcMaxReportRows','10','Maximum number of rows to return via the report web service.',NULL,'Integer');
367
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice');
367
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice');
368
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IssueLostItem', 'alert', 'alert|confirm|nothing', 'Defines what should be done when an attempt is made to issue an item that has been marked as lost.', 'Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 5307-5312 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
5307
    SetVersion ($DBversion);
5307
    SetVersion ($DBversion);
5308
}
5308
}
5309
5309
5310
$DBversion = "3.09.00.XXX";
5311
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5312
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IssueLostItem', 'alert', 'alert|confirm|nothing', 'Defines what should be done when an attempt is made to issue an item that has been marked as lost.', 'Choice')");
5313
    print "Upgrade to $DBversion done (Add system preference issuelostitem ))\n";
5314
    SetVersion($DBversion);
5315
}
5316
5310
=head1 FUNCTIONS
5317
=head1 FUNCTIONS
5311
5318
5312
=head2 TableExists($table)
5319
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 240-245 Circulation: Link Here
240
              choices:
240
              choices:
241
                  homebranch: the library the item is from.
241
                  homebranch: the library the item is from.
242
                  holdingbranch: the library the item was checked out from.
242
                  holdingbranch: the library the item was checked out from.
243
        -
244
            - "When issuing an item that has been marked as lost, "
245
            - pref: IssueLostItem
246
              choices:
247
                  confirm: "require confirmation"
248
                  alert: "display a message"
249
                  nothing : "do nothing"
250
            - .
243
    Holds Policy:
251
    Holds Policy:
244
        -
252
        -
245
            - pref: AllowHoldPolicyOverride
253
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +4 lines)
Lines 234-239 function refocus(calendar) { Link Here
234
    </div>
234
    </div>
235
[% END %]
235
[% END %]
236
236
237
[% IF ( alert.ITEM_LOST ) %]
238
    <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
239
[% END %]
240
237
[% IF ( NEEDSCONFIRMATION ) %]
241
[% IF ( NEEDSCONFIRMATION ) %]
238
<div class="yui-g">
242
<div class="yui-g">
239
243
240
- 

Return to bug 8167