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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 3290-3296 sub ReturnLostItem{ Link Here
3290
3290
3291
3291
3292
sub LostItem{
3292
sub LostItem{
3293
    my ($itemnumber, $mark_returned, $charge_fee) = @_;
3293
    my ( $itemnumber, $charge_fee ) = @_;
3294
3294
3295
    my $dbh = C4::Context->dbh();
3295
    my $dbh = C4::Context->dbh();
3296
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
3296
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
Lines 3310-3316 sub LostItem{ Link Here
3310
          if $charge_fee;
3310
          if $charge_fee;
3311
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3311
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3312
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3312
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3313
        MarkIssueReturned($borrowernumber,$itemnumber,undef,undef,$borrower->{'privacy'}) if $mark_returned;
3313
        MarkIssueReturned( $borrowernumber, $itemnumber, undef, undef, $borrower->{'privacy'} ) if C4::Context->preference("WhenLostReturnItems");
3314
    }
3314
    }
3315
}
3315
}
3316
3316
(-)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 314-320 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
314
('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'),
314
('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'),
315
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
315
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
316
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
316
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
317
('ReturnLostItems', '1', NULL, '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'),
318
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
317
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
319
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
318
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
320
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
319
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
Lines 407-412 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
407
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
406
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
408
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
407
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
409
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
408
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
409
('WhenLostReturnItems',  '1', NULL, 'If enabled, items marked as lost will be automatically returned.', 'YesNo'),
410
('XISBN','0','','Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','YesNo'),
410
('XISBN','0','','Use with FRBRizeEditions. If ON, Koha will use the OCLC xISBN web service in the Editions tab on the detail pages. See: http://www.worldcat.org/affiliate/webservices/xisbn/app.jsp','YesNo'),
411
('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'),
411
('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'),
412
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
412
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +2 lines)
Lines 7069-7076 if ( CheckVersion($DBversion) ) { Link Here
7069
7069
7070
$DBversion ="3.13.00.XXX";
7070
$DBversion ="3.13.00.XXX";
7071
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7071
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7072
    $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')");
7072
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostReturnItems', '1', '','If enabled, items marked as lost will be automatically returned.', 'YesNo')");
7073
    print "Upgrade to $DBversion done (Add system preference ReturnLostItems)\n";
7073
    print "Upgrade to $DBversion done (Add system preference WhenLostReturnItems)\n";
7074
    SetVersion($DBversion);
7074
    SetVersion($DBversion);
7075
}
7075
}
7076
7076
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +1 lines)
Lines 571-577 Circulation: Link Here
571
            - course reserves
571
            - course reserves
572
    Lost Items Policy:
572
    Lost Items Policy:
573
        -
573
        -
574
            - pref: ReturnLostItems
574
            - pref: WhenLostReturnItems
575
              type: choice
575
              type: choice
576
              choices:
576
              choices:
577
                  yes: "Check in"
577
                  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 189-195 if ($op eq "action") { Link Here
189
			UpdateMarcWith( $marcitem, $localmarcitem );
189
			UpdateMarcWith( $marcitem, $localmarcitem );
190
			eval{
190
			eval{
191
                            if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
191
                            if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) {
192
                                LostItem($itemnumber, C4::Context->preference("ReturnLostItems"), 'CHARGE FEE') if $item->{itemlost};
192
                                LostItem($itemnumber, 'CHARGE FEE') if $item->{itemlost};
193
                            }
193
                            }
194
                        };
194
                        };
195
		    }
195
		    }
196
- 

Return to bug 8484