Lines 1-5
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
use Test::More tests => 3; |
2 |
use Test::More tests => 4; |
3 |
|
3 |
|
4 |
use C4::Context; |
4 |
use C4::Context; |
5 |
use C4::Members; |
5 |
use C4::Members; |
Lines 43-48
$borrower_data{borrowernumber} = $borrowernumber;
Link Here
|
43 |
my ( $total ) = C4::Members::GetMemberAccountRecords( $borrowernumber ); |
43 |
my ( $total ) = C4::Members::GetMemberAccountRecords( $borrowernumber ); |
44 |
is( $total, $enrolmentfee_K, "New kid pay $enrolmentfee_K" ); |
44 |
is( $total, $enrolmentfee_K, "New kid pay $enrolmentfee_K" ); |
45 |
|
45 |
|
|
|
46 |
C4::Context->set_preference( 'FeeOnChangePatronCategory', 0 ); |
47 |
$borrower_data{categorycode} = 'J'; |
48 |
C4::Members::ModMember( %borrower_data ); |
49 |
( $total ) = C4::Members::GetMemberAccountRecords( $borrowernumber ); |
50 |
is( $total, $enrolmentfee_K , "Kid growing and become a juvenile, but shouldn't pay for the upgrade "); |
51 |
|
52 |
$borrower_data{categorycode} = 'K'; |
53 |
C4::Members::ModMember( %borrower_data ); |
54 |
C4::Context->set_preference( 'FeeOnChangePatronCategory', 1 ); |
55 |
|
46 |
$borrower_data{categorycode} = 'J'; |
56 |
$borrower_data{categorycode} = 'J'; |
47 |
C4::Members::ModMember( %borrower_data ); |
57 |
C4::Members::ModMember( %borrower_data ); |
48 |
( $total ) = C4::Members::GetMemberAccountRecords( $borrowernumber ); |
58 |
( $total ) = C4::Members::GetMemberAccountRecords( $borrowernumber ); |
49 |
- |
|
|