Bugzilla – Attachment 159987 Details for
Bug 34077
writeoff_debts without --confirm doesn't show which accountline records it would have been written off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34077: Update output to match POD
Bug-34077-Update-output-to-match-POD.patch (text/plain), 1.72 KB, created by
Caroline Cyr La Rose
on 2023-12-18 21:43:33 UTC
(
hide
)
Description:
Bug 34077: Update output to match POD
Filename:
MIME Type:
Creator:
Caroline Cyr La Rose
Created:
2023-12-18 21:43:33 UTC
Size:
1.72 KB
patch
obsolete
>From bb8ab69ec27186813bdfcf688648a48ccd98bb36 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 17 Oct 2023 12:49:55 +0100 >Subject: [PATCH] Bug 34077: Update output to match POD > >This patch adds a check on !$confirm such that we enable verbose output >should the confirm flag not be passed. This adheres with what the >documentation already states. > >Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> >--- > misc/cronjobs/writeoff_debts.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl >index dad36ffaf9..085f6dbd2d 100755 >--- a/misc/cronjobs/writeoff_debts.pl >+++ b/misc/cronjobs/writeoff_debts.pl >@@ -24,7 +24,7 @@ GetOptions( > ); > @type = split( /,/, join( ',', @type ) ); > >-pod2usage(1) if ( $help || !$confirm && !$verbose || !$file && !@type && !$before && !$after ); >+pod2usage(1) if ( $help || !$file && !@type && !$before && !$after ); > > my $where = { 'amountoutstanding' => { '>' => 0 } }; > my $attr = {}; >@@ -66,10 +66,15 @@ if (@category_code) { > } > > my $lines = Koha::Account::Lines->search( $where, $attr ); >+ >+$verbose //= !$confirm; > if ( $verbose ) { >- print "Attempting to write off " . $lines->count . " debts"; >+ print "Attempting to write off " . $lines->count . " debts" if $confirm; >+ print "With --confirm we would write off " . $lines->count . " debts" if !$confirm; > print " of type " . join(',',@type) if @type; >+ print " for patron categories " . join(', ', @category_code) if @category_code; > print " added before " . $before if $before; >+ print " added after " . $after if $after; > print " from the passed list" if $file; > print "\n"; > } >-- >2.34.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 34077
:
157230
|
159598
|
159987
|
161772
|
161773
|
161774
|
162234
|
162235
|
167403
|
167404