[Koha-bugs] [Bug 15895] Add Koha::Account module, use Koha::Account::pay internally for recordpayment

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 7 20:25:02 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15895

--- Comment #3 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Jonathan Druart from comment #2)
> Comment on attachment 48331 [details] [review]
> Bug 15895 - Add Koha::Account module, use Koha::Account::pay internally for
> recordpayment
> 
> Review of attachment 48331 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: t/db_dependent/Accounts.t
> @@ +158,5 @@
> >  
> > +    my $line1 = Koha::Account::Line->new({ borrowernumber => $borrower->borrowernumber, amountoutstanding => 100 })->store();
> > +    my $line2 = Koha::Account::Line->new({ borrowernumber => $borrower->borrowernumber, amountoutstanding => 200 })->store();
> > +    $line1->_result->discard_changes;
> > +    $line2->_result->discard_changes;
> 
> Why do you need these 2 calls?

The discard_changes call updates the objects from the database. Without them,
any default values inserted by MySQL are not available in the initial object.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list