Lines 45-50
use C4::Koha;
Link Here
|
45 |
|
45 |
|
46 |
use MARC::Field; |
46 |
use MARC::Field; |
47 |
use MARC::Record; |
47 |
use MARC::Record; |
|
|
48 |
use JSON qw(to_json); |
48 |
|
49 |
|
49 |
use Time::localtime; |
50 |
use Time::localtime; |
50 |
|
51 |
|
Lines 207-213
sub NewBasket {
Link Here
|
207 |
|
208 |
|
208 |
# Log the basket creation |
209 |
# Log the basket creation |
209 |
if (C4::Context->preference("AcqLog")) { |
210 |
if (C4::Context->preference("AcqLog")) { |
210 |
logaction('ACQUISITIONS', 'ADD_BASKET', $basket); |
211 |
my $created = Koha::Acquisition::Baskets->find( $basket ); |
|
|
212 |
logaction( |
213 |
'ACQUISITIONS', |
214 |
'ADD_BASKET', |
215 |
$basket, |
216 |
to_json($created->unblessed) |
217 |
); |
211 |
} |
218 |
} |
212 |
|
219 |
|
213 |
return $basket; |
220 |
return $basket; |
Lines 235-244
sub ReopenBasket {
Link Here
|
235 |
|
242 |
|
236 |
# Log the basket reopening |
243 |
# Log the basket reopening |
237 |
if (C4::Context->preference("AcqLog")) { |
244 |
if (C4::Context->preference("AcqLog")) { |
|
|
245 |
my $reopened = Koha::Acquisition::Baskets->find( $basketno ); |
238 |
logaction( |
246 |
logaction( |
239 |
'ACQUISITIONS', |
247 |
'ACQUISITIONS', |
240 |
'REOPEN_BASKET', |
248 |
'REOPEN_BASKET', |
241 |
$basketno |
249 |
$basketno, |
|
|
250 |
to_json($reopened->unblessed) |
242 |
); |
251 |
); |
243 |
} |
252 |
} |
244 |
return; |
253 |
return; |
Lines 518-527
sub ModBasket {
Link Here
|
518 |
|
527 |
|
519 |
# Log the basket update |
528 |
# Log the basket update |
520 |
if (C4::Context->preference("AcqLog")) { |
529 |
if (C4::Context->preference("AcqLog")) { |
|
|
530 |
my $modified = Koha::Acquisition::Baskets->find( |
531 |
$basketinfo->{basketno} |
532 |
); |
521 |
logaction( |
533 |
logaction( |
522 |
'ACQUISITIONS', |
534 |
'ACQUISITIONS', |
523 |
'MODIFY_BASKET', |
535 |
'MODIFY_BASKET', |
524 |
$basketinfo->{'basketno'} |
536 |
$basketinfo->{basketno}, |
|
|
537 |
to_json($modified->unblessed) |
525 |
); |
538 |
); |
526 |
} |
539 |
} |
527 |
|
540 |
|
Lines 585-594
sub ModBasketHeader {
Link Here
|
585 |
|
598 |
|
586 |
# Log the basket update |
599 |
# Log the basket update |
587 |
if (C4::Context->preference("AcqLog")) { |
600 |
if (C4::Context->preference("AcqLog")) { |
|
|
601 |
my $modified = Koha::Acquisition::Baskets->find( |
602 |
$basketno |
603 |
); |
588 |
logaction( |
604 |
logaction( |
589 |
'ACQUISITIONS', |
605 |
'ACQUISITIONS', |
590 |
'MODIFY_BASKET_HEADER', |
606 |
'MODIFY_BASKET_HEADER', |
591 |
$basketno |
607 |
$basketno, |
|
|
608 |
to_json($modified->unblessed) |
592 |
); |
609 |
); |
593 |
} |
610 |
} |
594 |
|
611 |
|
Lines 778-784
sub ModBasketUsers {
Link Here
|
778 |
logaction( |
795 |
logaction( |
779 |
'ACQUISITIONS', |
796 |
'ACQUISITIONS', |
780 |
'MODIFY_BASKET_USERS', |
797 |
'MODIFY_BASKET_USERS', |
781 |
$basketno |
798 |
$basketno, |
|
|
799 |
to_json({ |
800 |
basketno => $basketno, |
801 |
basketusers => @basketusers_ids |
802 |
}) |
782 |
); |
803 |
); |
783 |
} |
804 |
} |
784 |
|
805 |
|