|
Lines 398-406
is( Check_Userid( C4::Context->config('user'), '' ), 0,
Link Here
|
| 398 |
|
398 |
|
| 399 |
subtest 'GetMemberAccountRecords' => sub { |
399 |
subtest 'GetMemberAccountRecords' => sub { |
| 400 |
|
400 |
|
| 401 |
plan tests => 2; |
401 |
plan tests => 3; |
| 402 |
|
402 |
|
| 403 |
my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
403 |
my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
|
|
404 |
my $borrowernumber2 = $builder->build({ source => 'Borrower' })->{ borrowernumber }; |
| 404 |
my $accountline_1 = $builder->build({ |
405 |
my $accountline_1 = $builder->build({ |
| 405 |
source => 'Accountline', |
406 |
source => 'Accountline', |
| 406 |
value => { |
407 |
value => { |
|
Lines 412-417
subtest 'GetMemberAccountRecords' => sub {
Link Here
|
| 412 |
my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); |
413 |
my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); |
| 413 |
is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); |
414 |
is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); |
| 414 |
|
415 |
|
|
|
416 |
my $accountline_3 = $builder->build({ |
| 417 |
source => 'Accountline', |
| 418 |
value => { |
| 419 |
borrowernumber => $borrowernumber2, |
| 420 |
amountoutstanding => 1.14 |
| 421 |
} |
| 422 |
}); |
| 423 |
|
| 424 |
my ($total2,undef,undef) = GetMemberAccountRecords( $borrowernumber2 ); |
| 425 |
ok($total2==1.14, "Rounding works correctly in total calculation (another single value)" ); |
| 426 |
|
| 415 |
my $accountline_2 = $builder->build({ |
427 |
my $accountline_2 = $builder->build({ |
| 416 |
source => 'Accountline', |
428 |
source => 'Accountline', |
| 417 |
value => { |
429 |
value => { |
| 418 |
- |
|
|