@@ -, +, @@ defined --- Koha/Account/Offset.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- a/Koha/Account/Offset.pm +++ a/Koha/Account/Offset.pm @@ -36,6 +36,19 @@ Account offsets are used to track the changes in account lines =cut +=head3 new + +=cut + +sub new { + my ($class, $params) = @_; + + $params->{transaction_library} //= + defined C4::Context->userenv ? C4::Context->userenv->{branch} : undef; + + return $class->SUPER::new($params); +} + =head3 debit my $debit = $account_offset->debit; --