Bug 17600: Fix tests
No idea why UpdateStats in C4::Circulation needs the fully qualified namespace! I kept getting Undefined subroutine &C4::Circulation::UpdateStats called at /kohadevbox/koha/C4/Circulation.pm line 1643. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9d6d641d1f
commit
f5bf73f722
|
|
@ -790,7 +790,7 @@ sub CanBookBeIssued {
|
|||
#
|
||||
if ( $patron->category->category_type eq 'X' && ( $item_object->barcode )) {
|
||||
# stats only borrower -- add entry to statistics table, and return issuingimpossible{STATS} = 1 .
|
||||
&UpdateStats({
|
||||
C4::Stats::UpdateStats({
|
||||
branch => C4::Context->userenv->{'branch'},
|
||||
type => 'localuse',
|
||||
itemnumber => $item_object->itemnumber,
|
||||
|
|
@ -1631,7 +1631,7 @@ sub AddIssue {
|
|||
}
|
||||
|
||||
# Record the fact that this book was issued.
|
||||
&UpdateStats(
|
||||
C4::Stats::UpdateStats(
|
||||
{
|
||||
branch => C4::Context->userenv->{'branch'},
|
||||
type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ),
|
||||
|
|
@ -2229,7 +2229,7 @@ sub AddReturn {
|
|||
}
|
||||
|
||||
# Record the fact that this book was returned.
|
||||
UpdateStats({
|
||||
C4::Stats::UpdateStats({
|
||||
branch => $branch,
|
||||
type => $stat_type,
|
||||
itemnumber => $itemnumber,
|
||||
|
|
@ -3117,7 +3117,7 @@ sub AddRenewal {
|
|||
}
|
||||
|
||||
# Add the renewal to stats
|
||||
UpdateStats(
|
||||
C4::Stats::UpdateStats(
|
||||
{
|
||||
branch => $item_object->renewal_branchcode({branch => $branch}),
|
||||
type => 'renew',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package C4::Stats;
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
require Exporter;
|
||||
use Carp qw( croak );
|
||||
use C4::Context;
|
||||
|
||||
|
|
@ -27,11 +26,11 @@ use Koha::DateUtils qw( dt_from_string );
|
|||
use Koha::Statistics;
|
||||
use Koha::PseudonymizedTransactions;
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
our (@ISA, @EXPORT_OK);
|
||||
BEGIN {
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
@EXPORT_OK = qw(
|
||||
UpdateStats
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use Encode;
|
|||
use C4::Context;
|
||||
use C4::Auth qw( get_template_and_user );
|
||||
use C4::Output qw( output_html_with_http_headers );
|
||||
use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches sub SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction );
|
||||
use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction );
|
||||
use C4::Matcher;
|
||||
use C4::Search qw( FindDuplicate );
|
||||
use C4::Acquisition qw( populate_order_with_prices );
|
||||
|
|
@ -41,7 +41,7 @@ use C4::Biblio qw(
|
|||
GetMarcQuantity
|
||||
TransformHtmlToXml
|
||||
);
|
||||
use C4::Items qw( PrepareItemrecordDisplay sub AddItemFromMarc );
|
||||
use C4::Items qw( PrepareItemrecordDisplay AddItemFromMarc );
|
||||
use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget GetBudgetByCode );
|
||||
use C4::Acquisition qw( populate_order_with_prices );
|
||||
use C4::Suggestions; # GetSuggestion
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
use Modern::Perl;
|
||||
|
||||
use CGI;
|
||||
use Koha::Databas;
|
||||
use Koha::Database;
|
||||
use C4::Koha;
|
||||
use C4::Auth qw( get_template_and_user );
|
||||
use C4::Output qw( output_html_with_http_headers );
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ use Modern::Perl;
|
|||
|
||||
use C4::Auth qw( get_template_and_user );
|
||||
use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price );
|
||||
use C4::Budgets qw( _round GetBudget GetBudgetByOrderNumber GetBudgetName );
|
||||
use C4::Budgets qw( GetBudget GetBudgetByOrderNumber GetBudgetName );
|
||||
use CGI qw ( -utf8 );
|
||||
use C4::Output qw( output_html_with_http_headers );
|
||||
use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ BEGIN {
|
|||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT_OK = qw(
|
||||
&pedantic_p
|
||||
&warn_additional
|
||||
&warn_normal
|
||||
&warn_pedantic
|
||||
&error_additional
|
||||
&error_normal
|
||||
pedantic_p
|
||||
warn_additional
|
||||
warn_normal
|
||||
warn_pedantic
|
||||
error_additional
|
||||
error_normal
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use File::Basename qw( fileparse );
|
|||
use Getopt::Long qw( GetOptions );
|
||||
use Locale::PO;
|
||||
use TmplTokenizer;
|
||||
use VerboseWarnings qw( :warn :die );
|
||||
use VerboseWarnings qw( pedantic_p warn_additional warn_normal warn_pedantic error_additional error_normal );
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue