From 4d33850122c06308aa36d36e967c7eba829a2960 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 9 Mar 2018 10:43:41 -0500 Subject: [PATCH] Bug 15985: Add new method Koha::Account::Line::checkout --- Koha/Account/Line.pm | 1 + Koha/Old/Checkout.pm | 2 +- Koha/Old/Checkouts.pm | 2 +- Koha/Schema/Result/OldIssue.pm | 10 ++++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm index 155ae4e29b..b4d6685925 100644 --- a/Koha/Account/Line.pm +++ b/Koha/Account/Line.pm @@ -29,6 +29,7 @@ use Koha::Account::Offsets; use Koha::Database; use Koha::Exceptions::Account; use Koha::Items; +use Koha::Checkouts; use base qw(Koha::Object); diff --git a/Koha/Old/Checkout.pm b/Koha/Old/Checkout.pm index 9dbc58e3a8..f7be2c9783 100644 --- a/Koha/Old/Checkout.pm +++ b/Koha/Old/Checkout.pm @@ -19,7 +19,7 @@ use Modern::Perl; use Koha::Database; -use base qw(Koha::Object); +use base qw(Koha::Checkout); =head1 NAME diff --git a/Koha/Old/Checkouts.pm b/Koha/Old/Checkouts.pm index af598efab1..ed961428cc 100644 --- a/Koha/Old/Checkouts.pm +++ b/Koha/Old/Checkouts.pm @@ -20,7 +20,7 @@ use Modern::Perl; use Koha::Database; use Koha::Old::Checkout; -use base qw(Koha::Objects); +use base qw(Koha::Checkouts); sub _type { return 'OldIssue'; diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm index f1ff5c2fa6..2ecbcab0d6 100644 --- a/Koha/Schema/Result/OldIssue.pm +++ b/Koha/Schema/Result/OldIssue.pm @@ -233,6 +233,16 @@ __PACKAGE__->belongs_to( }, ); +__PACKAGE__->belongs_to( + "branch", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { + is_deferrable => 1, + join_type => "LEFT", + }, +); + # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-10 19:55:44 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E2N2paWcCHg916100ry+2A -- 2.24.2 (Apple Git-127)