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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 3262-3268 sub ReturnLostItem{ Link Here
3262
3262
3263
3263
3264
sub LostItem{
3264
sub LostItem{
3265
    my ($itemnumber, $mark_returned, $charge_fee) = @_;
3265
    my ( $itemnumber, $charge_fee ) = @_;
3266
3266
3267
    my $dbh = C4::Context->dbh();
3267
    my $dbh = C4::Context->dbh();
3268
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
3268
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
Lines 3282-3288 sub LostItem{ Link Here
3282
          if $charge_fee;
3282
          if $charge_fee;
3283
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3283
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3284
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3284
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3285
        MarkIssueReturned($borrowernumber,$itemnumber,undef,undef,$borrower->{'privacy'}) if $mark_returned;
3285
        MarkIssueReturned( $borrowernumber, $itemnumber, undef, undef, $borrower->{'privacy'} ) if C4::Context->preference("WhenLostReturnItems");
3286
    }
3286
    }
3287
}
3287
}
3288
3288
(-)a/catalogue/updateitem.pl (-1 / +1 lines)
Lines 74-79 if (defined $itemnotes) { # i.e., itemnotes parameter passed from form Link Here
74
74
75
ModItem($item_changes, $biblionumber, $itemnumber);
75
ModItem($item_changes, $biblionumber, $itemnumber);
76
76
77
LostItem($itemnumber, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if $itemlost;
77
LostItem($itemnumber, 'CHARGE FEE') if $itemlost;
78
78
79
print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");
79
print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber");
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 423-426 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
423
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('DisplayIconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.', 'YesNo');
423
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('DisplayIconsXSLT', '1', '', 'If ON, displays the format, audience, and material type icons in XSLT MARC21 results and detail pages.', 'YesNo');
424
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo');
424
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo');
425
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice')
425
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice')
426
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ReturnLostItems',  '1', 'If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.','', 'YesNo');
426
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('WhenLostReturnItems',  '1', 'If enabled, items marked as lost will be automatically returned.','', 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +2 lines)
Lines 6773-6780 if ( CheckVersion($DBversion) ) { Link Here
6773
6773
6774
$DBversion ="3.11.00.XXX";
6774
$DBversion ="3.11.00.XXX";
6775
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6775
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6776
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('ReturnLostItems', '1', '','If enabled, items marked as lost via the librarian intranet will be automatically returned. Note, the cronjob for marking items as lost has its own command line switch and is not affected by this system preference.', 'YesNo')");
6776
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostReturnItems', '1', '','If enabled, items marked as lost will be automatically returned.', 'YesNo')");
6777
    print "Upgrade to $DBversion done (Add system preference ReturnLostItems)\n";
6777
    print "Upgrade to $DBversion done (Add system preference WhenLostReturnItems)\n";
6778
    SetVersion($DBversion);
6778
    SetVersion($DBversion);
6779
}
6779
}
6780
6780
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +1 lines)
Lines 545-551 Circulation: Link Here
545
            - .
545
            - .
546
    Lost Items Policy:
546
    Lost Items Policy:
547
        -
547
        -
548
            - pref: ReturnLostItems
548
            - pref: WhenLostReturnItems
549
              type: choice
549
              type: choice
550
              choices:
550
              choices:
551
                  yes: "Check in"
551
                  yes: "Check in"
(-)a/misc/cronjobs/longoverdue.pl (-4 / +1 lines)
Lines 50-56 GetOptions( Link Here
50
    'verbose'       => \$verbose,
50
    'verbose'       => \$verbose,
51
    'quiet'         => \$quiet,
51
    'quiet'         => \$quiet,
52
    'maxdays=s'     => \$endrange,
52
    'maxdays=s'     => \$endrange,
53
    'mark-returned' => \$mark_returned,
54
);
53
);
55
54
56
my $usage = << 'ENDUSAGE';
55
my $usage = << 'ENDUSAGE';
Lines 77-84 This script takes the following parameters : Link Here
77
    --maxdays           Specifies the end of the range of overdue days to deal with (defaults to 366).  This
76
    --maxdays           Specifies the end of the range of overdue days to deal with (defaults to 366).  This
78
                        value is universal to all lost num days overdue passed.
77
                        value is universal to all lost num days overdue passed.
79
78
80
    --mark-returned     When an item is marked lost, remove it from the borrowers issued items.
81
82
  examples :
79
  examples :
83
  $PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1
80
  $PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1
84
    Would set LOST=1 after 30 days (up to one year), but not charge the account.
81
    Would set LOST=1 after 30 days (up to one year), but not charge the account.
Lines 165-171 foreach my $startrange (sort keys %$lost) { Link Here
165
            printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose);
162
            printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose);
166
            if($confirm) {
163
            if($confirm) {
167
                ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'});
164
                ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'});
168
                LostItem($row->{'itemnumber'}, $mark_returned, 'CHARGE FEE') if( $charge && $charge eq $lostvalue);
165
                LostItem($row->{'itemnumber'}, 'CHARGE FEE') if( $charge && $charge eq $lostvalue);
169
            }
166
            }
170
            $count++;
167
            $count++;
171
        }
168
        }
(-)a/tools/batchMod.pl (-2 / +1 lines)
Lines 190-196 if ($op eq "action") { Link Here
190
			UpdateMarcWith( $marcitem, $localmarcitem );
190
			UpdateMarcWith( $marcitem, $localmarcitem );
191
			eval{
191
			eval{
192
                            if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
192
                            if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
193
                                LostItem($itemnumber, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if $item->{itemlost};
193
                                LostItem($itemnumber, 'CHARGE FEE') if $item->{itemlost};
194
                            }
194
                            }
195
                        };
195
                        };
196
		    }
196
		    }
197
- 

Return to bug 8484