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

(-)a/Koha/Account.pm (-4 / +23 lines)
Lines 486-491 sub add_debit { Link Here
486
    my $item_id          = $params->{item_id};
486
    my $item_id          = $params->{item_id};
487
    my $issue_id         = $params->{issue_id};
487
    my $issue_id         = $params->{issue_id};
488
488
489
    my $old_issue_id;
490
    if ( $issue_id ) {
491
        my $issue = Koha::Checkouts->find($issue_id);
492
        unless ( $issue ) {
493
            my $old_issue = Koha::Old::Checkouts->find($issue_id);
494
            $issue_id = undef;
495
            $old_issue_id = $old_issue->id;
496
        }
497
    }
498
499
489
    my $line;
500
    my $line;
490
    my $schema = Koha::Database->new->schema;
501
    my $schema = Koha::Database->new->schema;
491
    try {
502
    try {
Lines 506-514 sub add_debit { Link Here
506
                        manager_id        => $user_id,
517
                        manager_id        => $user_id,
507
                        interface         => $interface,
518
                        interface         => $interface,
508
                        itemnumber        => $item_id,
519
                        itemnumber        => $item_id,
509
                        issue_id          => $issue_id,
520
                        (
510
                        branchcode        => $library_id,
521
                            $issue_id
511
                        register_id       => $cash_register,
522
                            ? ( issue_id => $issue_id )
523
                            : ()
524
                        ),
525
                        (
526
                            $old_issue_id
527
                            ? ( old_issue_id => $old_issue_id )
528
                            : ()
529
                        ),
530
                        branchcode  => $library_id,
531
                        register_id => $cash_register,
512
                        (
532
                        (
513
                            $debit_type eq 'OVERDUE'
533
                            $debit_type eq 'OVERDUE'
514
                            ? ( status => 'UNRETURNED' )
534
                            ? ( status => 'UNRETURNED' )
515
- 

Return to bug 22421