Bugzilla – Attachment 110464 Details for
Bug 24381
ACCOUNT_CREDIT and ACCOUNT_DEBIT slip not printing information about paid fines/fees
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24381: Update notice params
Bug-24381-Update-notice-params.patch (text/plain), 3.43 KB, created by
Kyle M Hall (khall)
on 2020-09-21 12:57:02 UTC
(
hide
)
Description:
Bug 24381: Update notice params
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-09-21 12:57:02 UTC
Size:
3.43 KB
patch
obsolete
>From 86577293d21e280d6c06ca565668f06a0a0c06d1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 16 Jul 2020 17:01:50 +0100 >Subject: [PATCH] Bug 24381: Update notice params > >If the update to catch defaults fails, we need to attempt to update >renamed template variables > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_24381.perl | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_24381.perl b/installer/data/mysql/atomicupdate/bug_24381.perl >index 1d4dbb735e..1538d8a3ab 100644 >--- a/installer/data/mysql/atomicupdate/bug_24381.perl >+++ b/installer/data/mysql/atomicupdate/bug_24381.perl >@@ -84,6 +84,14 @@ q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_CREDIT' AND REPLACE(REPLAC > ); > $sth->execute( $account_credit, $account_credit_old ); > >+ # replace patron variable with credit.patron >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% patron', '[% credit.patron') WHERE code = 'ACCOUNT_CREDIT' "); >+ # replace library variable with credit.library.branchname >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% library', '[% credit.library.branchname') WHERE code = 'ACCOUNT_CREDIT' "); >+ # replace offsets variable with credit.offsets >+ $dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' credit.offsets %]') WHERE code = 'ACCOUNT_CREDIT' "); >+ # replace change_given variable with change >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% change_given', '[% change') WHERE code = 'ACCOUNT_CREDIT' "); > > # ACCOUNT_DEBIT > my $account_debit = q{ >@@ -170,6 +178,17 @@ q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_DEBIT' AND REPLACE(REPLACE > ); > $sth->execute($account_debit, $account_debit_old); > >+ # replace patron variable with debit.patron >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% patron', '[% debit.patron') WHERE code = 'ACCOUNT_DEBIT' "); >+ # replace library variable with debit.library.branchname >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% library', '[% debit.library.branchname') WHERE code = 'ACCOUNT_DEBIT' "); >+ # replace offsets variable with debit.offsets >+ $dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' debit.offsets %]') WHERE code = 'ACCOUNT_DEBIT' "); >+ # replace total variable with debit.patron.account.balance >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% total ', '[% debit.patron.account.balance ') WHERE code = 'ACCOUNT_DEBIT' "); >+ # replace totalcredit variable with debit.patron.account.balance <= 0 >+ $dbh->do("UPDATE letter SET content = REPLACE(content, 'totalcredit', 'debit.patron.account.balance <= 0') WHERE code = 'ACCOUNT_DEBIT' "); >+ > # RECEIPT > my $receipt = q{ > [% PROCESS "accounts.inc" %] >@@ -244,5 +263,10 @@ q{UPDATE letter SET content = ? WHERE code = 'RECEIPT' AND REPLACE(REPLACE(conte > ); > $sth->execute($receipt,$receipt_old); > >+ # replace offsets variable with debit.offsets >+ $dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' payment.offsets %]') WHERE code = 'RECEIPT' "); >+ # replace collected variable with tendered >+ $dbh->do("UPDATE letter SET content = REPLACE(content, '[% collected', '[% tendered') WHERE code = 'RECEIPT' "); >+ > NewVersion( $DBversion, 24381, "Update accounts notices" ); > } >-- >2.24.1 (Apple Git-126)
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 24381
:
106946
|
106947
|
106950
|
106951
|
106952
|
106953
|
106956
|
106957
|
106958
|
106959
|
106960
|
106974
|
106975
|
106976
|
106977
|
110210
|
110211
|
110212
|
110213
|
110461
|
110462
|
110463
|
110464
|
111530
|
111531
|
111532
|
111533
|
111534
|
111590
|
111591
|
111592
|
111593
|
111594
|
111595
|
116394
|
140868
|
140869
|
140870
|
140871
|
140872
|
140873
|
141619
|
141620
|
141621
|
141622
|
141623
|
142386
|
142387
|
142388
|
142389
|
142390