Bugzilla – Attachment 89500 Details for
Bug 22610
SIP Payment Types should be moved out of accountype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22610: (follow-up) Catch non-standard SIP codes
Bug-22610-follow-up-Catch-non-standard-SIP-codes.patch (text/plain), 1.79 KB, created by
Kyle M Hall (khall)
on 2019-05-09 11:06:17 UTC
(
hide
)
Description:
Bug 22610: (follow-up) Catch non-standard SIP codes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-05-09 11:06:17 UTC
Size:
1.79 KB
patch
obsolete
>From b8f068080017fad667d2c96f66c48b6bb789b064 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 8 May 2019 12:53:15 +0100 >Subject: [PATCH] Bug 22610: (follow-up) Catch non-standard SIP codes > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_22610.perl | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_22610.perl b/installer/data/mysql/atomicupdate/bug_22610.perl >index ea122a18c5..b2948dbd5a 100644 >--- a/installer/data/mysql/atomicupdate/bug_22610.perl >+++ b/installer/data/mysql/atomicupdate/bug_22610.perl >@@ -40,6 +40,35 @@ if ( CheckVersion($DBversion) ) { > accounttype = 'Pay02'; > }); > >+ my $sth = $dbh->prepare( qq{SELECT * FROM accountlines WHERE accounttype LIKE "Pay%" AND accounttype != "Pay" } ); >+ $sth->execute(); >+ my $seen = {}; >+ while (my $row = $sth->fetchrow_hashref) { >+ my $type = $row->{accounttype}; >+ my $sipcode = $type; >+ $sipcode =~ s/Pay/SIP/g; >+ unless ($seen->{$sipcode}) { >+ $dbh->do(qq{ >+ INSERT INTO >+ authorised_values (category,authorised_value,lib) >+ VALUES >+ ('PAYMENT_TYPE',"$sipcode",'Unrecognised SIP2 payment type') >+ }); >+ >+ $dbh->do(qq{ >+ UPDATE >+ accountlines >+ SET >+ accounttype = 'Pay', >+ payment_type = "$sipcode" >+ WHERE >+ accounttype = "$type"; >+ }); >+ >+ $seen->{$sipcode} = 1; >+ } >+ } >+ > SetVersion($DBversion); > print "Upgrade to $DBversion done (Bug 22610 - Fix accounttypes for SIP2 payments)\n"; > } >-- >2.20.1 (Apple Git-117)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22610
:
88619
|
88620
|
89460
|
89461
|
89470
|
89471
|
89492
|
89493
|
89494
|
89495
|
89496
|
89498
|
89499
|
89500
|
89501
|
89502
|
89503
|
91638
|
91639
|
91640
|
91641
|
91642
|
91643