Lines 46-52
can_ok( 'C4::Accounts',
Link Here
|
46 |
getrefunds |
46 |
getrefunds |
47 |
ReversePayment |
47 |
ReversePayment |
48 |
recordpayment_selectaccts |
48 |
recordpayment_selectaccts |
49 |
makepartialpayment |
|
|
50 |
WriteOffFee |
49 |
WriteOffFee |
51 |
purge_zero_balance_fees ) |
50 |
purge_zero_balance_fees ) |
52 |
); |
51 |
); |
Lines 302-308
subtest "makepayment() tests" => sub {
Link Here
|
302 |
} |
301 |
} |
303 |
}; |
302 |
}; |
304 |
|
303 |
|
305 |
subtest "makepartialpayment() tests" => sub { |
304 |
subtest "Even more Koha::Account::pay tests" => sub { |
306 |
|
305 |
|
307 |
plan tests => 6; |
306 |
plan tests => 6; |
308 |
|
307 |
|
Lines 330-342
subtest "makepartialpayment() tests" => sub {
Link Here
|
330 |
|
329 |
|
331 |
is( $rs->count(), 1, 'Accountline created' ); |
330 |
is( $rs->count(), 1, 'Accountline created' ); |
332 |
|
331 |
|
|
|
332 |
my $account = Koha::Account->new( { patron_id => $borrowernumber } ); |
333 |
my $line = Koha::Account::Lines->find( $accountline->{ accountlines_id } ); |
333 |
# make the full payment |
334 |
# make the full payment |
334 |
makepartialpayment( |
335 |
$account->pay({ lines => [$line], amount => $partialamount, library_id => $branch, note => 'A payment note' }); |
335 |
$accountline->{ accountlines_id }, $borrowernumber, |
|
|
336 |
$accountline->{ accountno }, $partialamount, |
337 |
$borrowernumber, $branch, 'A payment note' ); |
338 |
|
339 |
# TODO: someone should write actual tests for makepartialpayment() |
340 |
|
336 |
|
341 |
my $stat = $schema->resultset('Statistic')->search({ |
337 |
my $stat = $schema->resultset('Statistic')->search({ |
342 |
branch => $branch, |
338 |
branch => $branch, |
343 |
- |
|
|