1 $DBversion = 'XXX'; # will be replaced by the RM
2 if ( CheckVersion($DBversion) ) {
6 authorised_values (category,authorised_value,lib)
8 ('PAYMENT_TYPE','SIP00','Cash via SIP2'),
9 ('PAYMENT_TYPE','SIP01','VISA via SIP2'),
10 ('PAYMENT_TYPE','SIP02','Creditcard via SIP2')
18 payment_type = 'SIP00'
20 accounttype = 'Pay00';
28 payment_type = 'SIP01'
30 accounttype = 'Pay01';
38 payment_type = 'SIP02'
40 accounttype = 'Pay02';
43 my $sth = $dbh->prepare( qq{SELECT * FROM accountlines WHERE accounttype REGEXP '^Pay[[:digit:]]{2}$' } );
46 while (my $row = $sth->fetchrow_hashref) {
47 my $type = $row->{accounttype};
49 $sipcode =~ s/Pay/SIP/g;
50 unless ($seen->{$sipcode}) {
53 authorised_values (category,authorised_value,lib)
55 ('PAYMENT_TYPE',"$sipcode",'Unrecognised SIP2 payment type')
63 payment_type = "$sipcode"
65 accounttype = "$type";
68 $seen->{$sipcode} = 1;
72 SetVersion($DBversion);
73 print "Upgrade to $DBversion done (Bug 22610 - Fix accounttypes for SIP2 payments)\n";