projects
/
ferlib2koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1fd39a
)
borrower_message_preferences
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 27 Jun 2011 22:11:40 +0000
(
00:11
+0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 27 Jun 2011 22:11:40 +0000
(
00:11
+0200)
ferlib2koha.pl
patch
|
blob
|
history
diff --git
a/ferlib2koha.pl
b/ferlib2koha.pl
index
47e1a3c
..
fdec3c7
100755
(executable)
--- a/
ferlib2koha.pl
+++ b/
ferlib2koha.pl
@@
-107,12
+107,29
@@
sub borrowers {
insert 'borrowers' => $row;
insert 'borrowers' => $row;
+ my $borrowernumber = $k->{mysql_insertid};
+
insert 'borrower_attributes' => {
insert 'borrower_attributes' => {
- borrowernumber => $
k->{mysql_insertid}
,
+ borrowernumber => $
borrowernumber
,
code => 'JMBG',
attribute => $jmbg,
} if $jmbg;
code => 'JMBG',
attribute => $jmbg,
} if $jmbg;
+ foreach my $id ( 6,1,4,5,2 ) {
+
+ insert 'borrower_message_preferences' => {
+ borrowernumber => $borrowernumber,
+ message_attribute_id => $id,
+ days_in_advance => $id == 2 ? 0 : undef,
+ };
+
+ insert 'borrower_message_transport_preferences' => {
+ borrower_message_preference_id => $k->{mysql_insertid},
+ message_transport_type => 'email',
+ } if $id == 4;
+
+ }
+
}
}
}
}
@@
-132,6
+149,8
@@
delete from borrowers;
alter table borrowers auto_increment = 1;
delete from borrower_attributes;
alter table borrower_attributes auto_increment = 1;
alter table borrowers auto_increment = 1;
delete from borrower_attributes;
alter table borrower_attributes auto_increment = 1;
+delete from borrower_message_preferences where borrowernumber is not null ;
+alter table borrower_message_preferences auto_increment = 1;
};
};