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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 3293-3299 sub ReturnLostItem{ Link Here
3293
3293
3294
3294
3295
sub LostItem{
3295
sub LostItem{
3296
    my ($itemnumber, $mark_returned, $charge_fee) = @_;
3296
    my ( $itemnumber, $charge_fee ) = @_;
3297
3297
3298
    my $dbh = C4::Context->dbh();
3298
    my $dbh = C4::Context->dbh();
3299
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
3299
    my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title 
Lines 3313-3319 sub LostItem{ Link Here
3313
          if $charge_fee;
3313
          if $charge_fee;
3314
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3314
        #FIXME : Should probably have a way to distinguish this from an item that really was returned.
3315
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3315
        #warn " $issues->{'borrowernumber'}  /  $itemnumber ";
3316
        MarkIssueReturned($borrowernumber,$itemnumber,undef,undef,$borrower->{'privacy'}) if $mark_returned;
3316
        MarkIssueReturned( $borrowernumber, $itemnumber, undef, undef, $borrower->{'privacy'} ) if C4::Context->preference("WhenLostReturnItems");
3317
    }
3317
    }
3318
}
3318
}
3319
3319
(-)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, 'MARK RETURNED', '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 lines)
Lines 409-414 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
409
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
409
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
410
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
410
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
411
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
411
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
412
('WhenLostReturnItems',  '1', NULL, 'If enabled, items marked as lost will be automatically returned.', 'YesNo'),
412
('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'),
413
('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'),
413
('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'),
414
('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'),
414
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
415
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 7104-7109 if ( CheckVersion($DBversion) ) { Link Here
7104
    SetVersion($DBversion);
7104
    SetVersion($DBversion);
7105
}
7105
}
7106
7106
7107
$DBversion ="3.13.00.XXX";
7108
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7109
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostReturnItems', '1', '','If enabled, items marked as lost will be automatically returned.', 'YesNo')");
7110
    print "Upgrade to $DBversion done (Add system preference WhenLostReturnItems)\n";
7111
    SetVersion($DBversion);
7112
}
7113
7107
=head1 FUNCTIONS
7114
=head1 FUNCTIONS
7108
7115
7109
=head2 TableExists($table)
7116
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 569-571 Circulation: Link Here
569
                  yes: Use
569
                  yes: Use
570
                  no: "Don't use"
570
                  no: "Don't use"
571
            - course reserves
571
            - course reserves
572
    Lost Items Policy:
573
        -
574
            - pref: WhenLostReturnItems
575
              type: choice
576
              choices:
577
                  yes: "Check in"
578
                  no: "Don't check in"
579
            - items marked as lost that are checked out to a patron.
(-)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, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost};
192
                                LostItem($itemnumber, 'CHARGE FEE') if $item->{itemlost};
193
                            }
193
                            }
194
                        };
194
                        };
195
		    }
195
		    }
196
- 

Return to bug 8484