Bugzilla – Attachment 98812 Details for
Bug 24532
Some account types are converted to debits when they shouldn't be
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24532: Fix misidentified credit_types from bug 23049
Bug-24532-Fix-misidentified-credittypes-from-bug-2.patch (text/plain), 1.80 KB, created by
Kyle M Hall (khall)
on 2020-02-13 11:18:59 UTC
(
hide
)
Description:
Bug 24532: Fix misidentified credit_types from bug 23049
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-02-13 11:18:59 UTC
Size:
1.80 KB
patch
obsolete
>From 5c80e85faa962b0e737c73660d693a1e03834818 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 30 Jan 2020 14:39:22 +0000 >Subject: [PATCH] Bug 24532: Fix misidentified credit_types from bug 23049 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_24532.perl | 43 +++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_24532.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_24532.perl b/installer/data/mysql/atomicupdate/bug_24532.perl >new file mode 100644 >index 0000000000..f5347e8728 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_24532.perl >@@ -0,0 +1,43 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ # Add any pathalogical incorrect debit_types as credit_types as appropriate >+ $dbh->do( >+ qq{ >+ INSERT IGNORE INTO account_credit_types ( >+ code, >+ description, >+ can_be_added_manually, >+ is_system >+ ) >+ SELECT >+ DISTINCT(debit_type_code), >+ "Unexpected type found during upgrade", >+ 1, >+ 0 >+ FROM >+ accountlines >+ WHERE >+ amount < 0 >+ AND >+ debit_type_code IS NOT NULL >+ } >+ ); >+ >+ # Correct any pathalogical cases >+ $dbh->do( qq{ >+ UPDATE >+ accountlines >+ SET >+ credit_type_code = debit_type_code, >+ debit_type_code = NULL >+ WHERE >+ amount < 0 >+ AND >+ debit_type_code IS NOT NULL >+ }); >+ >+ # Always end with this (adjust the bug info) >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >+} >-- >2.21.1 (Apple Git-122.3)
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 24532
:
98161
|
98162
|
98811
| 98812