Bugzilla – Attachment 179155 Details for
Bug 39236
writeoff_debts.pl does not run
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39236: writeoff_debts.pl needs adjustments
Bug-39236-writeoffdebtspl-needs-adjustments.patch (text/plain), 1.76 KB, created by
Martin Renvoize (ashimema)
on 2025-03-11 11:03:04 UTC
(
hide
)
Description:
Bug 39236: writeoff_debts.pl needs adjustments
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-03-11 11:03:04 UTC
Size:
1.76 KB
patch
obsolete
>From 0ea0716517eab936bb57bbdce4ed656f70f7a26f Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 4 Mar 2025 13:44:53 +0000 >Subject: [PATCH] Bug 39236: writeoff_debts.pl needs adjustments > >From bug 22435 - we need to use 'CREATE' as the account_offset type >From bug 31095 - we need to 'use Koha::Patrons;' > >To test: >1 - Add a fine to a patron account >2 - perl misc/cronjobs/writeoff_debts.pl -v -c --added-after 2025-01-01 >3 - Cronjob dies >4 - Apply patch >5 - Rerun >6 - Job succeeds! >7 - Confirm patron's fine is written off >8 - Sign off > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron/Debarments.pm | 1 + > misc/cronjobs/writeoff_debts.pl | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron/Debarments.pm b/Koha/Patron/Debarments.pm >index 27ac527f284..b46cc968443 100644 >--- a/Koha/Patron/Debarments.pm >+++ b/Koha/Patron/Debarments.pm >@@ -23,6 +23,7 @@ use C4::Context; > use C4::Log qw( logaction ); > > use Koha::Database; >+use Koha::Patrons; > use Koha::Patron::Restriction::Types; > use Koha::Patron::Restrictions; > >diff --git a/misc/cronjobs/writeoff_debts.pl b/misc/cronjobs/writeoff_debts.pl >index 4c9dea6fc39..6ac740b765a 100755 >--- a/misc/cronjobs/writeoff_debts.pl >+++ b/misc/cronjobs/writeoff_debts.pl >@@ -113,7 +113,7 @@ while ( my $line = $lines->next ) { > my $writeoff_offset = Koha::Account::Offset->new( > { > credit_id => $writeoff->accountlines_id, >- type => 'WRITEOFF', >+ type => 'CREATE', > amount => $line->amountoutstanding > } > )->store(); >-- >2.48.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 39236
:
178916
|
179142
| 179155