Lines 29-35
use C4::Circulation;
Link Here
|
29 |
use C4::Biblio; |
29 |
use C4::Biblio; |
30 |
use C4::Items; |
30 |
use C4::Items; |
31 |
use C4::Log; |
31 |
use C4::Log; |
32 |
use C4::Members; |
|
|
33 |
use C4::Reserves; |
32 |
use C4::Reserves; |
34 |
use C4::Overdues qw(UpdateFine CalcFine); |
33 |
use C4::Overdues qw(UpdateFine CalcFine); |
35 |
use Koha::DateUtils; |
34 |
use Koha::DateUtils; |
Lines 307-317
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
307 |
dateexpiry => dt_from_string->subtract( months => 1 ), |
306 |
dateexpiry => dt_from_string->subtract( months => 1 ), |
308 |
); |
307 |
); |
309 |
|
308 |
|
310 |
my $renewing_borrowernumber = AddMember(%renewing_borrower_data); |
309 |
my $renewing_borrowernumber = Koha::Patron->new(\%renewing_borrower_data)->store->borrowernumber; |
311 |
my $reserving_borrowernumber = AddMember(%reserving_borrower_data); |
310 |
my $reserving_borrowernumber = Koha::Patron->new(\%reserving_borrower_data)->store->borrowernumber; |
312 |
my $hold_waiting_borrowernumber = AddMember(%hold_waiting_borrower_data); |
311 |
my $hold_waiting_borrowernumber = Koha::Patron->new(\%hold_waiting_borrower_data)->store->borrowernumber; |
313 |
my $restricted_borrowernumber = AddMember(%restricted_borrower_data); |
312 |
my $restricted_borrowernumber = Koha::Patron->new(\%restricted_borrower_data)->store->borrowernumber; |
314 |
my $expired_borrowernumber = AddMember(%expired_borrower_data); |
313 |
my $expired_borrowernumber = Koha::Patron->new(\%expired_borrower_data)->store->borrowernumber; |
315 |
|
314 |
|
316 |
my $renewing_borrower = Koha::Patrons->find( $renewing_borrowernumber )->unblessed; |
315 |
my $renewing_borrower = Koha::Patrons->find( $renewing_borrowernumber )->unblessed; |
317 |
my $restricted_borrower = Koha::Patrons->find( $restricted_borrowernumber )->unblessed; |
316 |
my $restricted_borrower = Koha::Patrons->find( $restricted_borrowernumber )->unblessed; |
Lines 936-942
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
936 |
branchcode => $branch, |
935 |
branchcode => $branch, |
937 |
); |
936 |
); |
938 |
|
937 |
|
939 |
my $a_borrower_borrowernumber = AddMember(%a_borrower_data); |
938 |
my $a_borrower_borrowernumber = Koha::Patron->new(\%a_borrower_data)->store->borrowernumber; |
940 |
my $a_borrower = Koha::Patrons->find( $a_borrower_borrowernumber )->unblessed; |
939 |
my $a_borrower = Koha::Patrons->find( $a_borrower_borrowernumber )->unblessed; |
941 |
|
940 |
|
942 |
my $yesterday = DateTime->today(time_zone => C4::Context->tz())->add( days => -1 ); |
941 |
my $yesterday = DateTime->today(time_zone => C4::Context->tz())->add( days => -1 ); |
Lines 1015-1021
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
1015 |
branchcode => $branch, |
1014 |
branchcode => $branch, |
1016 |
); |
1015 |
); |
1017 |
|
1016 |
|
1018 |
my $borrowernumber = AddMember(%a_borrower_data); |
1017 |
my $borrowernumber = Koha::Patron->new(\%a_borrower_data)->store->borrowernumber; |
1019 |
|
1018 |
|
1020 |
my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; |
1019 |
my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; |
1021 |
my $issue = AddIssue( $borrower, $barcode ); |
1020 |
my $issue = AddIssue( $borrower, $barcode ); |
Lines 1074-1091
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
1074 |
$biblionumber |
1073 |
$biblionumber |
1075 |
); |
1074 |
); |
1076 |
|
1075 |
|
1077 |
my $borrowernumber1 = AddMember( |
1076 |
my $borrowernumber1 = Koha::Patron->new({ |
1078 |
firstname => 'Kyle', |
1077 |
firstname => 'Kyle', |
1079 |
surname => 'Hall', |
1078 |
surname => 'Hall', |
1080 |
categorycode => $patron_category->{categorycode}, |
1079 |
categorycode => $patron_category->{categorycode}, |
1081 |
branchcode => $library2->{branchcode}, |
1080 |
branchcode => $library2->{branchcode}, |
1082 |
); |
1081 |
})->store->borrowernumber; |
1083 |
my $borrowernumber2 = AddMember( |
1082 |
my $borrowernumber2 = Koha::Patron->new({ |
1084 |
firstname => 'Chelsea', |
1083 |
firstname => 'Chelsea', |
1085 |
surname => 'Hall', |
1084 |
surname => 'Hall', |
1086 |
categorycode => $patron_category->{categorycode}, |
1085 |
categorycode => $patron_category->{categorycode}, |
1087 |
branchcode => $library2->{branchcode}, |
1086 |
branchcode => $library2->{branchcode}, |
1088 |
); |
1087 |
})->store->borrowernumber; |
1089 |
|
1088 |
|
1090 |
my $borrower1 = Koha::Patrons->find( $borrowernumber1 )->unblessed; |
1089 |
my $borrower1 = Koha::Patrons->find( $borrowernumber1 )->unblessed; |
1091 |
my $borrower2 = Koha::Patrons->find( $borrowernumber2 )->unblessed; |
1090 |
my $borrower2 = Koha::Patrons->find( $borrowernumber2 )->unblessed; |
Lines 1146-1157
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
1146 |
$biblionumber |
1145 |
$biblionumber |
1147 |
); |
1146 |
); |
1148 |
|
1147 |
|
1149 |
my $borrowernumber = AddMember( |
1148 |
my $borrowernumber = Koha::Patron->new({ |
1150 |
firstname => 'fn', |
1149 |
firstname => 'fn', |
1151 |
surname => 'dn', |
1150 |
surname => 'dn', |
1152 |
categorycode => $patron_category->{categorycode}, |
1151 |
categorycode => $patron_category->{categorycode}, |
1153 |
branchcode => $branch, |
1152 |
branchcode => $branch, |
1154 |
); |
1153 |
})->store->borrowernumber; |
1155 |
|
1154 |
|
1156 |
my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; |
1155 |
my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; |
1157 |
|
1156 |
|
Lines 1507-1513
subtest 'MultipleReserves' => sub {
Link Here
|
1507 |
categorycode => $patron_category->{categorycode}, |
1506 |
categorycode => $patron_category->{categorycode}, |
1508 |
branchcode => $branch, |
1507 |
branchcode => $branch, |
1509 |
); |
1508 |
); |
1510 |
my $renewing_borrowernumber = AddMember(%renewing_borrower_data); |
1509 |
my $renewing_borrowernumber = Koha::Patron->new(\%renewing_borrower_data)->store->borrowernumber; |
1511 |
my $renewing_borrower = Koha::Patrons->find( $renewing_borrowernumber )->unblessed; |
1510 |
my $renewing_borrower = Koha::Patrons->find( $renewing_borrowernumber )->unblessed; |
1512 |
my $issue = AddIssue( $renewing_borrower, $barcode1); |
1511 |
my $issue = AddIssue( $renewing_borrower, $barcode1); |
1513 |
my $datedue = dt_from_string( $issue->date_due() ); |
1512 |
my $datedue = dt_from_string( $issue->date_due() ); |
Lines 1520-1526
subtest 'MultipleReserves' => sub {
Link Here
|
1520 |
categorycode => $patron_category->{categorycode}, |
1519 |
categorycode => $patron_category->{categorycode}, |
1521 |
branchcode => $branch, |
1520 |
branchcode => $branch, |
1522 |
); |
1521 |
); |
1523 |
my $reserving_borrowernumber1 = AddMember(%reserving_borrower_data1); |
1522 |
my $reserving_borrowernumber1 = Koha::Patron->new(\%reserving_borrower_data1)->store->borrowernumber; |
1524 |
AddReserve( |
1523 |
AddReserve( |
1525 |
$branch, $reserving_borrowernumber1, $biblionumber, |
1524 |
$branch, $reserving_borrowernumber1, $biblionumber, |
1526 |
$bibitems, $priority, $resdate, $expdate, $notes, |
1525 |
$bibitems, $priority, $resdate, $expdate, $notes, |
Lines 1533-1539
subtest 'MultipleReserves' => sub {
Link Here
|
1533 |
categorycode => $patron_category->{categorycode}, |
1532 |
categorycode => $patron_category->{categorycode}, |
1534 |
branchcode => $branch, |
1533 |
branchcode => $branch, |
1535 |
); |
1534 |
); |
1536 |
my $reserving_borrowernumber2 = AddMember(%reserving_borrower_data2); |
1535 |
my $reserving_borrowernumber2 = Koha::Patron->new(\%reserving_borrower_data2)->store->borrowernumber; |
1537 |
AddReserve( |
1536 |
AddReserve( |
1538 |
$branch, $reserving_borrowernumber2, $biblionumber, |
1537 |
$branch, $reserving_borrowernumber2, $biblionumber, |
1539 |
$bibitems, $priority, $resdate, $expdate, $notes, |
1538 |
$bibitems, $priority, $resdate, $expdate, $notes, |