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

(-)a/Koha/Account.pm (-2 / +2 lines)
Lines 413-419 sub add_credit { Link Here
413
                $line = Koha::Account::Line->new(
413
                $line = Koha::Account::Line->new(
414
                    {
414
                    {
415
                        borrowernumber    => $self->{patron_id},
415
                        borrowernumber    => $self->{patron_id},
416
                        date              => \'NOW()',
416
                        date              => dt_from_string,
417
                        amount            => $amount,
417
                        amount            => $amount,
418
                        description       => $description,
418
                        description       => $description,
419
                        credit_type_code  => $credit_type,
419
                        credit_type_code  => $credit_type,
Lines 560-566 sub add_debit { Link Here
560
                $line = Koha::Account::Line->new(
560
                $line = Koha::Account::Line->new(
561
                    {
561
                    {
562
                        borrowernumber    => $self->{patron_id},
562
                        borrowernumber    => $self->{patron_id},
563
                        date              => \'NOW()',
563
                        date              => dt_from_string,
564
                        amount            => $amount,
564
                        amount            => $amount,
565
                        description       => $description,
565
                        description       => $description,
566
                        debit_type_code   => $debit_type,
566
                        debit_type_code   => $debit_type,
(-)a/Koha/Account/Line.pm (-5 / +4 lines)
Lines 341-347 sub cancel { Link Here
341
            # A 'cancellation' is a 'credit'
341
            # A 'cancellation' is a 'credit'
342
            $cancellation = Koha::Account::Line->new(
342
            $cancellation = Koha::Account::Line->new(
343
                {
343
                {
344
                    date              => \'NOW()',
344
                    date              => dt_from_string,
345
                    amount            => 0 - $self->amount,
345
                    amount            => 0 - $self->amount,
346
                    credit_type_code  => 'CANCELLATION',
346
                    credit_type_code  => 'CANCELLATION',
347
                    status            => 'ADDED',
347
                    status            => 'ADDED',
Lines 465-471 sub reduce { Link Here
465
            # A 'reduction' is a 'credit'
465
            # A 'reduction' is a 'credit'
466
            $reduction = Koha::Account::Line->new(
466
            $reduction = Koha::Account::Line->new(
467
                {
467
                {
468
                    date              => \'NOW()',
468
                    date              => dt_from_string,
469
                    amount            => 0 - $params->{amount},
469
                    amount            => 0 - $params->{amount},
470
                    credit_type_code  => $params->{reduction_type},
470
                    credit_type_code  => $params->{reduction_type},
471
                    status            => 'ADDED',
471
                    status            => 'ADDED',
Lines 687-693 sub payout { Link Here
687
            # A 'payout' is a 'debit'
687
            # A 'payout' is a 'debit'
688
            $payout = Koha::Account::Line->new(
688
            $payout = Koha::Account::Line->new(
689
                {
689
                {
690
                    date              => \'NOW()',
690
                    date              => dt_from_string,
691
                    amount            => $amount,
691
                    amount            => $amount,
692
                    debit_type_code   => 'PAYOUT',
692
                    debit_type_code   => 'PAYOUT',
693
                    payment_type      => $params->{payout_type},
693
                    payment_type      => $params->{payout_type},
Lines 801-807 sub adjust { Link Here
801
            # Update the account line
801
            # Update the account line
802
            $self->set(
802
            $self->set(
803
                {
803
                {
804
                    date              => \'NOW()',
804
                    date              => dt_from_string,
805
                    amount            => $amount,
805
                    amount            => $amount,
806
                    amountoutstanding => $new_outstanding,
806
                    amountoutstanding => $new_outstanding,
807
                }
807
                }
808
- 

Return to bug 27574