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

(-)a/C4/Circulation.pm (-5 / +7 lines)
Lines 1361-1368 sub AddIssue { Link Here
1361
            }
1361
            }
1362
            $datedue->truncate( to => 'minute' );
1362
            $datedue->truncate( to => 'minute' );
1363
1363
1364
            $issue = Koha::Database->new()->schema()->resultset('Issue')->update_or_create(
1364
            my $cols = {
1365
                {
1366
                    borrowernumber => $borrower->{'borrowernumber'},
1365
                    borrowernumber => $borrower->{'borrowernumber'},
1367
                    itemnumber     => $item->{'itemnumber'},
1366
                    itemnumber     => $item->{'itemnumber'},
1368
                    issuedate      => $issuedate->strftime('%Y-%m-%d %H:%M:%S'),
1367
                    issuedate      => $issuedate->strftime('%Y-%m-%d %H:%M:%S'),
Lines 1370-1377 sub AddIssue { Link Here
1370
                    branchcode     => C4::Context->userenv->{'branch'},
1369
                    branchcode     => C4::Context->userenv->{'branch'},
1371
                    onsite_checkout => $onsite_checkout,
1370
                    onsite_checkout => $onsite_checkout,
1372
                    auto_renew      => $auto_renew ? 1 : 0
1371
                    auto_renew      => $auto_renew ? 1 : 0
1373
                }
1372
            };
1374
              );
1373
            unless( Koha::Checkouts->search({ itemnumber => $item->{'itemnumber'}, borrowernumber => $borrower->{'borrowernumber'} }) ) {
1374
                my $id = Koha::Autoincrements->find('issues')->increment;
1375
                $cols->{issue_id} = $id;
1376
            }
1377
            $issue = Koha::Database->new->schema->resultset('Issue')->update_or_create( $cols );
1375
1378
1376
            if ( C4::Context->preference('ReturnToShelvingCart') ) {
1379
            if ( C4::Context->preference('ReturnToShelvingCart') ) {
1377
                # ReturnToShelvingCart is on, anything issued should be taken off the cart.
1380
                # ReturnToShelvingCart is on, anything issued should be taken off the cart.
1378
- 

Return to bug 18970