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

(-)a/C4/Reserves.pm (-8 / +14 lines)
Lines 566-578 sub GetOtherReserves { Link Here
566
566
567
sub ChargeReserveFee {
567
sub ChargeReserveFee {
568
    my ( $borrowernumber, $fee, $title ) = @_;
568
    my ( $borrowernumber, $fee, $title ) = @_;
569
    return if !$fee || $fee==0; # the last test is needed to include 0.00
569
    return if !$fee || $fee == 0;    # the last test is needed to include 0.00
570
    my $accquery = qq{
570
    Koha::Account->new( { patron_id => $borrowernumber } )->add_debit(
571
INSERT INTO accountlines ( borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding ) VALUES (?, ?, NOW(), ?, ?, 'Res', ?)
571
        {
572
    };
572
            amount       => $fee,
573
    my $dbh = C4::Context->dbh;
573
            description  => "Reserve Charge - " . $title,
574
    my $nextacctno = &getnextacctno( $borrowernumber );
574
            note         => undef,
575
    $dbh->do( $accquery, undef, ( $borrowernumber, $nextacctno, $fee, "Reserve Charge - $title", $fee ) );
575
            user_id      => undef,
576
            library_id   => undef,
577
            sip          => undef,
578
            invoice_type => undef,
579
            type         => 'reserve',
580
            item_id      => undef
581
        }
582
    );
576
}
583
}
577
584
578
=head2 GetReserveFee
585
=head2 GetReserveFee
579
- 

Return to bug 21728