From 12a8dfb934bf3819d6581f9df82987475334a302 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 17 Dec 2018 08:56:53 +0000 Subject: [PATCH] Bug 21756: Add deprecation warning to manualinvoice https://bugs.koha-community.org/show_bug.cgi?id=21756 Signed-off-by: Kyle M Hall Signed-off-by: Nick Clemens --- C4/Accounts.pm | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/C4/Accounts.pm b/C4/Accounts.pm index eb31f6cc46..0339e68f9b 100644 --- a/C4/Accounts.pm +++ b/C4/Accounts.pm @@ -29,6 +29,7 @@ use Koha::Account::Lines; use Koha::Account::Offsets; use Koha::Items; +use Mojo::Util qw(deprecated); use Data::Dumper qw(Dumper); use vars qw(@ISA @EXPORT); @@ -37,7 +38,6 @@ BEGIN { require Exporter; @ISA = qw(Exporter); @EXPORT = qw( - &manualinvoice &getnextacctno &chargelostitem &purge_zero_balance_fees @@ -161,29 +161,15 @@ sub chargelostitem{ &manualinvoice($borrowernumber, $itemnumber, $description, $type, $amount, $note); -C<$borrowernumber> is the patron's borrower number. -C<$description> is a description of the transaction. -C<$type> may be one of C, C, C, C, C, C, C, -or C. -C<$itemnumber> is the item involved, if pertinent; otherwise, it -should be the empty string. +This function is now deprecated and not used anywhere within koha. It is due for complete removal in 19.11 =cut -#' -# FIXME: In Koha 3.0 , the only account adjustment 'types' passed to this function -# are: -# 'C' = CREDIT -# 'FOR' = FORGIVEN (Formerly 'F', but 'F' is taken to mean 'FINE' elsewhere) -# 'N' = New Card fee -# 'F' = Fine -# 'A' = Account Management fee -# 'M' = Sundry -# 'L' = Lost Item -# - sub manualinvoice { my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note ) = @_; + + deprecated "C4::Accounts::manualinvoice is deprecated in favor of Koha::Account->add_debit"; + my $manager_id = 0; $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv; my $dbh = C4::Context->dbh; -- 2.39.5