Skip to content

Commit

Permalink
[Fixes #10585697] Putting item on course reserve deletes its itemtype
Browse files Browse the repository at this point in the history
Use of "itemtype" instead of "itype" caused the value to be clobbered.
  • Loading branch information
ctfliblime committed Jun 1, 2011
1 parent 8a4b0fa commit 686b008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion C4/Courses.pm
Expand Up @@ -316,7 +316,7 @@ sub CreateCourseReserve {
$course_reserve->{ccode} = $item->{ccode} if $course_reserve->{ccode} eq 'NOCHANGE';
$course_reserve->{location} = $item->{location} if $course_reserve->{location} eq 'NOCHANGE';
$course_reserve->{branchcode} = $item->{homebranch} if $course_reserve->{branchcode} eq 'NOCHANGE';
$course_reserve->{itemtype} = $item->{itemtype} if $course_reserve->{itemtype} eq 'NOCHANGE';
$course_reserve->{itemtype} = $item->{itype} if $course_reserve->{itemtype} eq 'NOCHANGE';
my $sth2 = $dbh->prepare("INSERT INTO course_reserves (course_id,itemnumber,staff_note,public_note,itemtype,ccode,location,branchcode,original_itemtype,original_ccode,original_location,original_branchcode) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");
$sth2->execute($course_reserve->{course_id},$course_reserve->{itemnumber},$course_reserve->{staff_note},$course_reserve->{public_note},$course_reserve->{itemtype},$course_reserve->{ccode},$course_reserve->{location},$course_reserve->{branchcode},$item->{itype},$item->{ccode},$item->{location},$item->{homebranch});
$sth2->finish;
Expand Down

0 comments on commit 686b008

Please sign in to comment.