|
Lines 222-238
sub fill_form {
Link Here
|
| 222 |
|
222 |
|
| 223 |
sub cleanup { |
223 |
sub cleanup { |
| 224 |
my $dbh = C4::Context->dbh; |
224 |
my $dbh = C4::Context->dbh; |
| 225 |
$dbh->do(q|DELETE FROM borrowers WHERE userid = ?|, {}, $sample_data->{patron}{userid}); |
|
|
| 226 |
$dbh->do(q|DELETE FROM categories WHERE categorycode = ?|, {}, $sample_data->{category}{categorycode}); |
| 227 |
for my $i ( 1 .. $number_of_biblios_to_insert ) { |
| 228 |
$dbh->do(qq|DELETE FROM biblio WHERE title = "test biblio $i"|); |
| 229 |
}; |
| 230 |
|
| 231 |
$dbh->do(q|DELETE FROM issues where borrowernumber=?|, {}, $borrowernumber); |
225 |
$dbh->do(q|DELETE FROM issues where borrowernumber=?|, {}, $borrowernumber); |
| 232 |
$dbh->do(q|DELETE FROM old_issues where borrowernumber=?|, {}, $borrowernumber); |
226 |
$dbh->do(q|DELETE FROM old_issues where borrowernumber=?|, {}, $borrowernumber); |
| 233 |
for my $i ( 1 .. $number_of_biblios_to_insert ) { |
227 |
for my $i ( 1 .. $number_of_biblios_to_insert ) { |
| 234 |
$dbh->do(qq|DELETE items, biblio FROM biblio INNER JOIN items ON biblio.biblionumber = items.biblionumber WHERE biblio.title = "test biblio$i"|); |
228 |
$dbh->do(qq|DELETE items, biblio FROM biblio INNER JOIN items ON biblio.biblionumber = items.biblionumber WHERE biblio.title = "test biblio$i"|); |
| 235 |
}; |
229 |
}; |
|
|
230 |
$dbh->do(q|DELETE FROM borrowers WHERE userid = ?|, {}, $sample_data->{patron}{userid}); |
| 231 |
$dbh->do(q|DELETE FROM categories WHERE categorycode = ?|, {}, $sample_data->{category}{categorycode}); |
| 232 |
for my $i ( 1 .. $number_of_biblios_to_insert ) { |
| 233 |
$dbh->do(qq|DELETE FROM biblio WHERE title = "test biblio $i"|); |
| 234 |
}; |
| 236 |
$dbh->do(q|DELETE FROM itemtypes WHERE itemtype=?|, undef, $sample_data->{itemtype}{itemtype}); |
235 |
$dbh->do(q|DELETE FROM itemtypes WHERE itemtype=?|, undef, $sample_data->{itemtype}{itemtype}); |
| 237 |
$dbh->do(q|DELETE FROM issuingrules WHERE categorycode=? AND itemtype=? AND branchcode=?|, undef, $sample_data->{issuingrule}{categorycode}, $sample_data->{issuingrule}{itemtype}, $sample_data->{issuingrule}{branchcode}); |
236 |
$dbh->do(q|DELETE FROM issuingrules WHERE categorycode=? AND itemtype=? AND branchcode=?|, undef, $sample_data->{issuingrule}{categorycode}, $sample_data->{issuingrule}{itemtype}, $sample_data->{issuingrule}{branchcode}); |
| 238 |
} |
237 |
} |
| 239 |
- |
|
|