Lines 58-63
my $itemtype = $builder->build(
Link Here
|
58 |
value => { notforloan => undef, rentalcharge => 0 } |
58 |
value => { notforloan => undef, rentalcharge => 0 } |
59 |
} |
59 |
} |
60 |
)->{itemtype}; |
60 |
)->{itemtype}; |
|
|
61 |
my $patron_category = $builder->build({ source => 'Category', value => { enrolmentfee => 0 } }); |
61 |
|
62 |
|
62 |
my $CircControl = C4::Context->preference('CircControl'); |
63 |
my $CircControl = C4::Context->preference('CircControl'); |
63 |
my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch'); |
64 |
my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch'); |
Lines 190-196
my $sth = C4::Context->dbh->prepare("SELECT COUNT(*) FROM accountlines WHERE amo
Link Here
|
190 |
$sth->execute(); |
191 |
$sth->execute(); |
191 |
my ( $original_count ) = $sth->fetchrow_array(); |
192 |
my ( $original_count ) = $sth->fetchrow_array(); |
192 |
|
193 |
|
193 |
C4::Context->dbh->do("INSERT INTO borrowers ( cardnumber, surname, firstname, categorycode, branchcode ) VALUES ( '99999999999', 'Hall', 'Kyle', 'S', ? )", undef, $library2->{branchcode} ); |
194 |
C4::Context->dbh->do("INSERT INTO borrowers ( cardnumber, surname, firstname, categorycode, branchcode ) VALUES ( '99999999999', 'Hall', 'Kyle', ?, ? )", undef, $patron_category->{categorycode}, $library2->{branchcode} ); |
194 |
|
195 |
|
195 |
C4::Circulation::ProcessOfflinePayment({ cardnumber => '99999999999', amount => '123.45' }); |
196 |
C4::Circulation::ProcessOfflinePayment({ cardnumber => '99999999999', amount => '123.45' }); |
196 |
|
197 |
|
Lines 260-287
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
260 |
my %renewing_borrower_data = ( |
261 |
my %renewing_borrower_data = ( |
261 |
firstname => 'John', |
262 |
firstname => 'John', |
262 |
surname => 'Renewal', |
263 |
surname => 'Renewal', |
263 |
categorycode => 'S', |
264 |
categorycode => $patron_category->{categorycode}, |
264 |
branchcode => $branch, |
265 |
branchcode => $branch, |
265 |
); |
266 |
); |
266 |
|
267 |
|
267 |
my %reserving_borrower_data = ( |
268 |
my %reserving_borrower_data = ( |
268 |
firstname => 'Katrin', |
269 |
firstname => 'Katrin', |
269 |
surname => 'Reservation', |
270 |
surname => 'Reservation', |
270 |
categorycode => 'S', |
271 |
categorycode => $patron_category->{categorycode}, |
271 |
branchcode => $branch, |
272 |
branchcode => $branch, |
272 |
); |
273 |
); |
273 |
|
274 |
|
274 |
my %hold_waiting_borrower_data = ( |
275 |
my %hold_waiting_borrower_data = ( |
275 |
firstname => 'Kyle', |
276 |
firstname => 'Kyle', |
276 |
surname => 'Reservation', |
277 |
surname => 'Reservation', |
277 |
categorycode => 'S', |
278 |
categorycode => $patron_category->{categorycode}, |
278 |
branchcode => $branch, |
279 |
branchcode => $branch, |
279 |
); |
280 |
); |
280 |
|
281 |
|
281 |
my %restricted_borrower_data = ( |
282 |
my %restricted_borrower_data = ( |
282 |
firstname => 'Alice', |
283 |
firstname => 'Alice', |
283 |
surname => 'Reservation', |
284 |
surname => 'Reservation', |
284 |
categorycode => 'S', |
285 |
categorycode => $patron_category->{categorycode}, |
285 |
debarred => '3228-01-01', |
286 |
debarred => '3228-01-01', |
286 |
branchcode => $branch, |
287 |
branchcode => $branch, |
287 |
); |
288 |
); |
Lines 761-767
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
761 |
my %a_borrower_data = ( |
762 |
my %a_borrower_data = ( |
762 |
firstname => 'Fridolyn', |
763 |
firstname => 'Fridolyn', |
763 |
surname => 'SOMERS', |
764 |
surname => 'SOMERS', |
764 |
categorycode => 'S', |
765 |
categorycode => $patron_category->{categorycode}, |
765 |
branchcode => $branch, |
766 |
branchcode => $branch, |
766 |
); |
767 |
); |
767 |
|
768 |
|
Lines 841-847
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
841 |
my %a_borrower_data = ( |
842 |
my %a_borrower_data = ( |
842 |
firstname => 'Kyle', |
843 |
firstname => 'Kyle', |
843 |
surname => 'Hall', |
844 |
surname => 'Hall', |
844 |
categorycode => 'S', |
845 |
categorycode => $patron_category->{categorycode}, |
845 |
branchcode => $branch, |
846 |
branchcode => $branch, |
846 |
); |
847 |
); |
847 |
|
848 |
|
Lines 907-919
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
907 |
my $borrowernumber1 = AddMember( |
908 |
my $borrowernumber1 = AddMember( |
908 |
firstname => 'Kyle', |
909 |
firstname => 'Kyle', |
909 |
surname => 'Hall', |
910 |
surname => 'Hall', |
910 |
categorycode => 'S', |
911 |
categorycode => $patron_category->{categorycode}, |
911 |
branchcode => $library2->{branchcode}, |
912 |
branchcode => $library2->{branchcode}, |
912 |
); |
913 |
); |
913 |
my $borrowernumber2 = AddMember( |
914 |
my $borrowernumber2 = AddMember( |
914 |
firstname => 'Chelsea', |
915 |
firstname => 'Chelsea', |
915 |
surname => 'Hall', |
916 |
surname => 'Hall', |
916 |
categorycode => 'S', |
917 |
categorycode => $patron_category->{categorycode}, |
917 |
branchcode => $library2->{branchcode}, |
918 |
branchcode => $library2->{branchcode}, |
918 |
); |
919 |
); |
919 |
|
920 |
|
Lines 984-990
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
984 |
my $borrowernumber = AddMember( |
985 |
my $borrowernumber = AddMember( |
985 |
firstname => 'fn', |
986 |
firstname => 'fn', |
986 |
surname => 'dn', |
987 |
surname => 'dn', |
987 |
categorycode => 'S', |
988 |
categorycode => $patron_category->{categorycode}, |
988 |
branchcode => $branch, |
989 |
branchcode => $branch, |
989 |
); |
990 |
); |
990 |
|
991 |
|
Lines 1310-1316
subtest 'MultipleReserves' => sub {
Link Here
|
1310 |
my %renewing_borrower_data = ( |
1311 |
my %renewing_borrower_data = ( |
1311 |
firstname => 'John', |
1312 |
firstname => 'John', |
1312 |
surname => 'Renewal', |
1313 |
surname => 'Renewal', |
1313 |
categorycode => 'S', |
1314 |
categorycode => $patron_category->{categorycode}, |
1314 |
branchcode => $branch, |
1315 |
branchcode => $branch, |
1315 |
); |
1316 |
); |
1316 |
my $renewing_borrowernumber = AddMember(%renewing_borrower_data); |
1317 |
my $renewing_borrowernumber = AddMember(%renewing_borrower_data); |
Lines 1323-1329
subtest 'MultipleReserves' => sub {
Link Here
|
1323 |
my %reserving_borrower_data1 = ( |
1324 |
my %reserving_borrower_data1 = ( |
1324 |
firstname => 'Katrin', |
1325 |
firstname => 'Katrin', |
1325 |
surname => 'Reservation', |
1326 |
surname => 'Reservation', |
1326 |
categorycode => 'S', |
1327 |
categorycode => $patron_category->{categorycode}, |
1327 |
branchcode => $branch, |
1328 |
branchcode => $branch, |
1328 |
); |
1329 |
); |
1329 |
my $reserving_borrowernumber1 = AddMember(%reserving_borrower_data1); |
1330 |
my $reserving_borrowernumber1 = AddMember(%reserving_borrower_data1); |
Lines 1336-1342
subtest 'MultipleReserves' => sub {
Link Here
|
1336 |
my %reserving_borrower_data2 = ( |
1337 |
my %reserving_borrower_data2 = ( |
1337 |
firstname => 'Kirk', |
1338 |
firstname => 'Kirk', |
1338 |
surname => 'Reservation', |
1339 |
surname => 'Reservation', |
1339 |
categorycode => 'S', |
1340 |
categorycode => $patron_category->{categorycode}, |
1340 |
branchcode => $branch, |
1341 |
branchcode => $branch, |
1341 |
); |
1342 |
); |
1342 |
my $reserving_borrowernumber2 = AddMember(%reserving_borrower_data2); |
1343 |
my $reserving_borrowernumber2 = AddMember(%reserving_borrower_data2); |