# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
+#use warnings; FIXME - Bug 2505
use C4::Context;
use C4::Stats;
use C4::Members;
sub chargelostitem{
-# http://wiki.koha.org/doku.php?id=en:development:kohastatuses
# lost ==1 Lost, lost==2 longoverdue, lost==3 lost and paid for
# FIXME: itemlost should be set to 3 after payment is made, should be a warning to the interface that
# a charge has been added
my $dbh = C4::Context->dbh();
my ($itemnumber) = @_;
- my $sth=$dbh->prepare("SELECT * FROM issues, items WHERE issues.itemnumber=items.itemnumber and issues.itemnumber=?");
+ my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title
+ FROM issues
+ JOIN items USING (itemnumber)
+ JOIN biblio USING (biblionumber)
+ WHERE issues.itemnumber=?");
$sth->execute($itemnumber);
my $issues=$sth->fetchrow_hashref();
warn " $issues->{'borrowernumber'} / $itemnumber ";
C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber);
# Shouldn't MarkIssueReturned do this?
- ModItem({ onloan => undef }, undef, $itemnumber);
+ C4::Items::ModItem({ onloan => undef }, undef, $itemnumber);
}
$sth->finish;
}