Lines 9-15
return {
Link Here
|
9 |
my %default_rule_values = ( |
9 |
my %default_rule_values = ( |
10 |
issuelength => 0, |
10 |
issuelength => 0, |
11 |
hardduedate => '', |
11 |
hardduedate => '', |
12 |
unseenrenewalsallowed => '', |
12 |
unseen_renewals_allowed => '', |
13 |
rentaldiscount => 0, |
13 |
rentaldiscount => 0, |
14 |
decreaseloanholds => '', |
14 |
decreaseloanholds => '', |
15 |
); |
15 |
); |
Lines 17-23
return {
Link Here
|
17 |
$dbh->do(q{ |
17 |
$dbh->do(q{ |
18 |
INSERT IGNORE INTO circulation_rules (branchcode, categorycode, itemtype, rule_name, rule_value) |
18 |
INSERT IGNORE INTO circulation_rules (branchcode, categorycode, itemtype, rule_name, rule_value) |
19 |
SELECT branchcode, categorycode, itemtype, ?, ? FROM circulation_rules cr |
19 |
SELECT branchcode, categorycode, itemtype, ?, ? FROM circulation_rules cr |
20 |
WHERE NOT EXISTS ( |
20 |
WHERE EXISTS ( |
|
|
21 |
SELECT * FROM circulation_rules cr2 |
22 |
WHERE |
23 |
cr2.rule_name="suspension_chargeperiod" |
24 |
AND ( (cr2.branchcode=cr.branchcode) OR ( ISNULL(cr2.branchcode) AND ISNULL(cr.branchcode) ) ) |
25 |
AND ( (cr2.categorycode=cr.categorycode) OR ( ISNULL(cr2.categorycode) AND ISNULL(cr.categorycode) ) ) |
26 |
AND ( (cr2.itemtype=cr.itemtype) OR ( ISNULL(cr2.itemtype) AND ISNULL(cr.itemtype) ) ) |
27 |
) |
28 |
AND NOT EXISTS ( |
21 |
SELECT * FROM circulation_rules cr2 |
29 |
SELECT * FROM circulation_rules cr2 |
22 |
WHERE |
30 |
WHERE |
23 |
cr2.rule_name=? |
31 |
cr2.rule_name=? |
24 |
- |
|
|