Bugzilla – Attachment 125509 Details for
Bug 29139
Paying gives ISE if UseEmailReceipts is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29139: $line->debit_offsets doesn't honor list context
Bug-29139-line-debitoffsets-doesnt-honor-list-cont.patch (text/plain), 1.89 KB, created by
Andrew Fuerste-Henry
on 2021-09-30 13:41:43 UTC
(
hide
)
Description:
Bug 29139: $line->debit_offsets doesn't honor list context
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-09-30 13:41:43 UTC
Size:
1.89 KB
patch
obsolete
>From 970b03bbb6807126de34eaf798b9d2e4ee0326a1 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 29 Sep 2021 16:27:04 -0300 >Subject: [PATCH] Bug 29139: $line->debit_offsets doesn't honor list context > >Being based on _new_from_dbic (discussion on bug 28883), makes the >assignment incorrect: > >my @account_offsets = $payment->debit_offsets; > >This patch explicitly makes the resultset be assigned as a list by >calling *as_list*. > >To test: >1. Have UseEmailReceipts disabled >2. Have a patron with a debt of 6 >3. Make a payment of 2 >=> SUCCESS: All good >4. Enable UseEmailReceipts >5. Repeat 3 >=> FAIL: You get something like: > >ERROR PROCESSING TEMPLATE: undef error - The method Koha::Account::Offsets->debit is not covered by tests! > >Trace begun at /kohadevbox/koha/Koha/Objects.pm line 595 >Koha::Objects::AUTOLOAD('Koha::Account::Offsets=HASH(0x561cbe2ac930)') called at input text line 6 >eval {...} at input text line 6 >eval {...} at input text line 23 > >6. Apply this patch >7. Repeat 3 >=> SUCCESS: It doesn't explode anymore! >8. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > Koha/Account.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Account.pm b/Koha/Account.pm >index fe2465cae1..47961df279 100644 >--- a/Koha/Account.pm >+++ b/Koha/Account.pm >@@ -110,7 +110,7 @@ sub pay { > } > > my $patron = Koha::Patrons->find( $self->{patron_id} ); >- my @account_offsets = $payment->debit_offsets; >+ my @account_offsets = $payment->debit_offsets->as_list; > if ( C4::Context->preference('UseEmailReceipts') ) { > if ( > my $letter = C4::Letters::GetPreparedLetter( >-- >2.20.1
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 29139
:
125463
|
125464
|
125474
|
125475
|
125476
|
125504
|
125505
|
125506
|
125507
|
125508
|
125509
|
125510
|
125511
|
125512
|
125513
|
125592
|
125593
|
125594
|
125595
|
125596
|
125844
|
125845
|
125846
|
125847
|
125848