Lines 14-19
$dbh->{RaiseError} = 1;
Link Here
|
14 |
$dbh->do(q|DELETE FROM letter|); |
14 |
$dbh->do(q|DELETE FROM letter|); |
15 |
$dbh->do(q|DELETE FROM message_queue|); |
15 |
$dbh->do(q|DELETE FROM message_queue|); |
16 |
$dbh->do(q|DELETE FROM message_transport_types|); |
16 |
$dbh->do(q|DELETE FROM message_transport_types|); |
|
|
17 |
$dbh->do(q|DELETE FROM overduerules|); |
17 |
$dbh->do(q|DELETE FROM overduerules_transport_types|); |
18 |
$dbh->do(q|DELETE FROM overduerules_transport_types|); |
18 |
|
19 |
|
19 |
$dbh->do(q| |
20 |
$dbh->do(q| |
Lines 21-26
$dbh->do(q|
Link Here
|
21 |
|); |
22 |
|); |
22 |
|
23 |
|
23 |
$dbh->do(q| |
24 |
$dbh->do(q| |
|
|
25 |
INSERT INTO overduerules ( branchcode, categorycode ) VALUES |
26 |
('CPL', 'PT'), |
27 |
('CPL', 'YA'), |
28 |
('', 'PT'), |
29 |
('', 'YA') |
30 |
|); |
31 |
|
32 |
$dbh->do(q| |
24 |
INSERT INTO overduerules_transport_types( branchcode, categorycode, letternumber, message_transport_type ) VALUES |
33 |
INSERT INTO overduerules_transport_types( branchcode, categorycode, letternumber, message_transport_type ) VALUES |
25 |
('CPL', 'PT', 1, 'email'), |
34 |
('CPL', 'PT', 1, 'email'), |
26 |
('CPL', 'PT', 2, 'sms'), |
35 |
('CPL', 'PT', 2, 'sms'), |
Lines 53-59
is_deeply( $mtts, ['sms'], 'GetOverdueMessageTransportTypes: second overdue is b
Link Here
|
53 |
$mtts = C4::Overdues::GetOverdueMessageTransportTypes('CPL', 'PT', 3); |
62 |
$mtts = C4::Overdues::GetOverdueMessageTransportTypes('CPL', 'PT', 3); |
54 |
is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: third overdue is by email for PT (CPL)' ); |
63 |
is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: third overdue is by email for PT (CPL)' ); |
55 |
|
64 |
|
56 |
my $mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 1); |
65 |
$mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 1); |
57 |
is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: first overdue is by email for PT (default)' ); |
66 |
is_deeply( $mtts, ['email'], 'GetOverdueMessageTransportTypes: first overdue is by email for PT (default)' ); |
58 |
|
67 |
|
59 |
$mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 2); |
68 |
$mtts = C4::Overdues::GetOverdueMessageTransportTypes('', 'PT', 2); |
60 |
- |
|
|