|
Lines 19-77
package C4::Circulation;
Link Here
|
| 19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 20 |
|
20 |
|
| 21 |
use Modern::Perl; |
21 |
use Modern::Perl; |
|
|
22 |
|
| 23 |
use Algorithm::CheckDigits; |
| 24 |
use Carp; |
| 25 |
use Data::Dumper; |
| 26 |
use Date::Calc qw( |
| 27 |
Today |
| 28 |
Today_and_Now |
| 29 |
Add_Delta_YM |
| 30 |
Add_Delta_DHMS |
| 31 |
Date_to_Days |
| 32 |
Day_of_Week |
| 33 |
Add_Delta_Days |
| 34 |
); |
| 22 |
use DateTime; |
35 |
use DateTime; |
|
|
36 |
use List::MoreUtils qw( uniq any ); |
| 23 |
use POSIX qw( floor ); |
37 |
use POSIX qw( floor ); |
| 24 |
use Koha::DateUtils; |
38 |
use Scalar::Util qw( looks_like_number ); |
| 25 |
use C4::Context; |
39 |
use Try::Tiny; |
| 26 |
use C4::Stats; |
40 |
|
| 27 |
use C4::Reserves; |
41 |
use C4::Accounts; |
| 28 |
use C4::Biblio; |
42 |
use C4::Biblio; |
|
|
43 |
use C4::Context; |
| 44 |
use C4::Debug; |
| 45 |
use C4::ItemCirculationAlertPreference; |
| 29 |
use C4::Items; |
46 |
use C4::Items; |
|
|
47 |
use C4::Log; # logaction |
| 30 |
use C4::Members; |
48 |
use C4::Members; |
| 31 |
use C4::Accounts; |
|
|
| 32 |
use C4::ItemCirculationAlertPreference; |
| 33 |
use C4::Message; |
49 |
use C4::Message; |
| 34 |
use C4::Debug; |
|
|
| 35 |
use C4::Log; # logaction |
| 36 |
use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); |
50 |
use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); |
|
|
51 |
use C4::Reserves; |
| 37 |
use C4::RotatingCollections qw(GetCollectionItemBranches); |
52 |
use C4::RotatingCollections qw(GetCollectionItemBranches); |
| 38 |
use Algorithm::CheckDigits; |
53 |
use C4::Stats; |
| 39 |
|
54 |
|
| 40 |
use Data::Dumper; |
55 |
use Koha::Account::Lines; |
|
|
56 |
use Koha::Account::Offsets; |
| 41 |
use Koha::Account; |
57 |
use Koha::Account; |
| 42 |
use Koha::AuthorisedValues; |
58 |
use Koha::AuthorisedValues; |
| 43 |
use Koha::Biblioitems; |
59 |
use Koha::Biblioitems; |
| 44 |
use Koha::DateUtils; |
|
|
| 45 |
use Koha::Calendar; |
60 |
use Koha::Calendar; |
|
|
61 |
use Koha::Charges::Fees; |
| 62 |
use Koha::Checkouts::ReturnClaims; |
| 46 |
use Koha::Checkouts; |
63 |
use Koha::Checkouts; |
|
|
64 |
use Koha::Config::SysPrefs; |
| 65 |
use Koha::Database; |
| 66 |
use Koha::DateUtils; |
| 67 |
use Koha::Holds; |
| 47 |
use Koha::Illrequests; |
68 |
use Koha::Illrequests; |
| 48 |
use Koha::Items; |
69 |
use Koha::Items; |
| 49 |
use Koha::Patrons; |
|
|
| 50 |
use Koha::Patron::Debarments; |
| 51 |
use Koha::Database; |
| 52 |
use Koha::Libraries; |
70 |
use Koha::Libraries; |
| 53 |
use Koha::Account::Lines; |
71 |
use Koha::Patron::Debarments; |
| 54 |
use Koha::Holds; |
72 |
use Koha::Patrons; |
| 55 |
use Koha::Account::Lines; |
73 |
use Koha::Plugins; |
| 56 |
use Koha::Account::Offsets; |
|
|
| 57 |
use Koha::Config::SysPrefs; |
| 58 |
use Koha::Charges::Fees; |
| 59 |
use Koha::Util::SystemPreferences; |
| 60 |
use Koha::Checkouts::ReturnClaims; |
| 61 |
use Koha::SearchEngine::Indexer; |
74 |
use Koha::SearchEngine::Indexer; |
| 62 |
use Carp; |
75 |
use Koha::Util::SystemPreferences; |
| 63 |
use List::MoreUtils qw( uniq any ); |
76 |
|
| 64 |
use Scalar::Util qw( looks_like_number ); |
|
|
| 65 |
use Try::Tiny; |
| 66 |
use Date::Calc qw( |
| 67 |
Today |
| 68 |
Today_and_Now |
| 69 |
Add_Delta_YM |
| 70 |
Add_Delta_DHMS |
| 71 |
Date_to_Days |
| 72 |
Day_of_Week |
| 73 |
Add_Delta_Days |
| 74 |
); |
| 75 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
77 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
| 76 |
|
78 |
|
| 77 |
BEGIN { |
79 |
BEGIN { |
|
Lines 174-179
sub barcodedecode {
Link Here
|
| 174 |
my ($barcode, $filter) = @_; |
176 |
my ($barcode, $filter) = @_; |
| 175 |
my $branch = C4::Context::mybranch(); |
177 |
my $branch = C4::Context::mybranch(); |
| 176 |
$filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter; |
178 |
$filter = C4::Context->preference('itemBarcodeInputFilter') unless $filter; |
|
|
179 |
($barcode) = Koha::Plugins->call('barcode_transform', 'item', $barcode ) || $barcode; |
| 177 |
$filter or return $barcode; # ensure filter is defined, else return untouched barcode |
180 |
$filter or return $barcode; # ensure filter is defined, else return untouched barcode |
| 178 |
if ($filter eq 'whitespace') { |
181 |
if ($filter eq 'whitespace') { |
| 179 |
$barcode =~ s/\s//g; |
182 |
$barcode =~ s/\s//g; |