|
Lines 30-35
my $dbh = C4::Context->dbh;
Link Here
|
| 30 |
$dbh->{AutoCommit} = 0; |
30 |
$dbh->{AutoCommit} = 0; |
| 31 |
$dbh->{RaiseError} = 1; |
31 |
$dbh->{RaiseError} = 1; |
| 32 |
|
32 |
|
|
|
33 |
$dbh->do("DELETE FROM reserves"); |
| 34 |
$dbh->do("DELETE FROM issues"); |
| 35 |
$dbh->do("DELETE FROM items"); |
| 36 |
$dbh->do("DELETE FROM biblio"); |
| 37 |
$dbh->do("DELETE FROM biblioitems"); |
| 38 |
$dbh->do("DELETE FROM transport_cost"); |
| 39 |
$dbh->do("DELETE FROM tmp_holdsqueue"); |
| 40 |
$dbh->do("DELETE FROM hold_fill_targets"); |
| 41 |
$dbh->do("DELETE FROM default_branch_circ_rules"); |
| 42 |
$dbh->do("DELETE FROM default_branch_item_rules"); |
| 43 |
$dbh->do("DELETE FROM default_circ_rules"); |
| 44 |
$dbh->do("DELETE FROM branch_item_rules"); |
| 45 |
|
| 33 |
my $TITLE = "Test Holds Queue XXX"; |
46 |
my $TITLE = "Test Holds Queue XXX"; |
| 34 |
|
47 |
|
| 35 |
my %data = ( |
48 |
my %data = ( |
|
Lines 59-65
$dbh->do("UPDATE systempreferences SET value = ? WHERE variable = 'StaticHoldsQu
Link Here
|
| 59 |
join( ',', @other_branches, $borrower_branchcode, $least_cost_branch_code)); |
72 |
join( ',', @other_branches, $borrower_branchcode, $least_cost_branch_code)); |
| 60 |
$dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'RandomizeHoldsQueueWeight'"); |
73 |
$dbh->do("UPDATE systempreferences SET value = '0' WHERE variable = 'RandomizeHoldsQueueWeight'"); |
| 61 |
|
74 |
|
| 62 |
$dbh->do("DELETE FROM transport_cost"); |
|
|
| 63 |
my $transport_cost_insert_sth = $dbh->prepare("insert into transport_cost (frombranch, tobranch, cost) values (?, ?, ?)"); |
75 |
my $transport_cost_insert_sth = $dbh->prepare("insert into transport_cost (frombranch, tobranch, cost) values (?, ?, ?)"); |
| 64 |
# Favour $least_cost_branch_code |
76 |
# Favour $least_cost_branch_code |
| 65 |
$transport_cost_insert_sth->execute($borrower_branchcode, $least_cost_branch_code, 0.2); |
77 |
$transport_cost_insert_sth->execute($borrower_branchcode, $least_cost_branch_code, 0.2); |
|
Lines 93-100
foreach ( $borrower_branchcode, $least_cost_branch_code, @other_branches ) {
Link Here
|
| 93 |
$items_insert_sth->execute($barcode++, $_, $borrower_branchcode); |
105 |
$items_insert_sth->execute($barcode++, $_, $borrower_branchcode); |
| 94 |
} |
106 |
} |
| 95 |
|
107 |
|
| 96 |
# Remove existing reserves, makes debugging easier |
|
|
| 97 |
$dbh->do("DELETE FROM reserves"); |
| 98 |
my $bibitems = undef; |
108 |
my $bibitems = undef; |
| 99 |
my $priority = 1; |
109 |
my $priority = 1; |
| 100 |
# Make a reserve |
110 |
# Make a reserve |
| 101 |
- |
|
|