Lines 381-387
is( Check_Userid( C4::Context->config('user'), '' ), 0,
Link Here
|
381 |
|
381 |
|
382 |
subtest 'GetMemberAccountRecords' => sub { |
382 |
subtest 'GetMemberAccountRecords' => sub { |
383 |
|
383 |
|
384 |
plan tests => 2; |
384 |
plan tests => 3; |
385 |
|
385 |
|
386 |
my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
386 |
my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
387 |
my $accountline_1 = $builder->build({ |
387 |
my $accountline_1 = $builder->build({ |
Lines 395-400
subtest 'GetMemberAccountRecords' => sub {
Link Here
|
395 |
my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); |
395 |
my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); |
396 |
is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); |
396 |
is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); |
397 |
|
397 |
|
|
|
398 |
my $borrowernumber2 = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
399 |
my $accountline_2 = $builder->build({ |
400 |
source => 'Accountline', |
401 |
value => { |
402 |
borrowernumber => $borrowernumber2, |
403 |
amountoutstanding => 7.56 |
404 |
} |
405 |
}); |
406 |
($total,undef,undef) = GetMemberAccountRecords( $borrowernumber2 ); |
407 |
is( $total , 7.56, "Rounding works correctly in total calculation (single value)" ); |
408 |
|
398 |
my $accountline_2 = $builder->build({ |
409 |
my $accountline_2 = $builder->build({ |
399 |
source => 'Accountline', |
410 |
source => 'Accountline', |
400 |
value => { |
411 |
value => { |
401 |
- |
|
|