Bugzilla – Attachment 97008 Details for
Bug 23442
Add a 'refund' process to accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23442: Add account credit types
Bug-23442-Add-account-credit-types.patch (text/plain), 2.59 KB, created by
Kyle M Hall (khall)
on 2020-01-08 15:53:10 UTC
(
hide
)
Description:
Bug 23442: Add account credit types
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-01-08 15:53:10 UTC
Size:
2.59 KB
patch
obsolete
>From ba4998caacf19c90b18b35536e8409243dd14f90 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 21 Nov 2019 15:20:45 +0000 >Subject: [PATCH] Bug 23442: Add account credit types > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/account_credit_types.sql | 2 ++ > installer/data/mysql/account_offset_types.sql | 4 +++- > .../data/mysql/atomicupdate/bug_23442.perl | 20 +++++++++++++++++++ > 3 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_23442.perl > >diff --git a/installer/data/mysql/account_credit_types.sql b/installer/data/mysql/account_credit_types.sql >index 1105ab9b85..03954025b4 100644 >--- a/installer/data/mysql/account_credit_types.sql >+++ b/installer/data/mysql/account_credit_types.sql >@@ -3,4 +3,6 @@ INSERT INTO account_credit_types ( code, description, can_be_added_manually, is_ > ('WRITEOFF', 'Writeoff', 0, 1), > ('FORGIVEN', 'Forgiven', 1, 1), > ('CREDIT', 'Credit', 1, 1), >+('DISCOUNT', 'A discount applied to a patrons fine', 0, 1), >+('REFUND', 'A refund applied to a patrons fine', 0, 1), > ('LOST_RETURN', 'Lost item fee refund', 0, 1); >diff --git a/installer/data/mysql/account_offset_types.sql b/installer/data/mysql/account_offset_types.sql >index 95d4296f06..076d49619b 100644 >--- a/installer/data/mysql/account_offset_types.sql >+++ b/installer/data/mysql/account_offset_types.sql >@@ -17,4 +17,6 @@ INSERT INTO account_offset_types ( type ) VALUES > ('OVERDUE'), > ('Void Payment'), > ('Credit Applied'), >-('PAYOUT'); >+('PAYOUT'), >+('DISOUNT'), >+('REFUND'); >diff --git a/installer/data/mysql/atomicupdate/bug_23442.perl b/installer/data/mysql/atomicupdate/bug_23442.perl >new file mode 100644 >index 0000000000..6900fd259d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23442.perl >@@ -0,0 +1,20 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion($DBversion) ) { >+ >+ $dbh->do( >+ qq{ >+ INSERT IGNORE INTO account_credit_types (code, description, can_be_added_manually, is_system) >+ VALUES >+ ('DISCOUNT', 'A discount applied to a patrons fine', 0, 1), >+ ('REFUND', 'A refund applied to a patrons fine', 0, 1) >+ } >+ ); >+ >+ $dbh->do(qq{ >+ INSERT IGNORE INTO account_offset_types ( type ) VALUES ('DISCOUNT'), ('REFUND'); >+ }); >+ >+ SetVersion($DBversion); >+ print "Upgrade to $DBversion done (Bug 23442 - Add REFUND and DISCOUNT account_credit_types)\n"; >+ print "Upgrade to $DBversion done (Bug 23442 - Add REFUNDED and DISCOUNTED account_offset_types)\n"; >+} >-- >2.21.0 (Apple Git-122.2)
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 23442
:
92954
|
92955
|
92956
|
95674
|
95675
|
95676
|
95677
|
96400
|
96401
|
96402
|
96403
|
96414
|
96415
|
96416
|
96417
|
97008
|
97009
|
97010
|
97011
|
97012
|
97062
|
97063
|
97064
|
97065
|
97066
|
97067
|
97151
|
97152
|
97153
|
97154
|
97155
|
97156