View | Details | Raw Unified | Return to bug 23971
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-5 / +26 lines)
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
(-)a/Koha/EDI.pm (+11 lines)
Lines 622-630 sub process_quote { Link Here
622
                }
622
                }
623
            );
623
            );
624
            Koha::Acquisition::Baskets->find($b)->close;
624
            Koha::Acquisition::Baskets->find($b)->close;
625
            # Log the approval
626
            if (C4::Context->preference("AcqLog")) {
627
                my $approved = Koha::Acquisition::Baskets->find( $b );
628
                logaction(
629
                    'ACQUISITIONS',
630
                    'APPROVE_BASKET',
631
                    $b,
632
                    to_json($approved->unblessed)
633
                );
634
            }
625
        }
635
        }
626
    }
636
    }
627
637
638
628
    return;
639
    return;
629
}
640
}
630
641
(-)a/acqui/addorder.pl (-2 / +5 lines)
Lines 119-124 if it is an order from an existing suggestion : the id of this suggestion. Link Here
119
119
120
use Modern::Perl;
120
use Modern::Perl;
121
use CGI qw ( -utf8 );
121
use CGI qw ( -utf8 );
122
use JSON qw ( to_json );
122
use C4::Auth;           # get_template_and_user
123
use C4::Auth;           # get_template_and_user
123
use C4::Acquisition;    # ModOrder
124
use C4::Acquisition;    # ModOrder
124
use C4::Suggestions;    # ModStatus
125
use C4::Suggestions;    # ModStatus
Lines 129-134 use C4::Output; Link Here
129
use C4::Log qw(logaction);
130
use C4::Log qw(logaction);
130
use Koha::Acquisition::Currencies;
131
use Koha::Acquisition::Currencies;
131
use Koha::Acquisition::Orders;
132
use Koha::Acquisition::Orders;
133
use Koha::Acquisition::Baskets;
132
use C4::Barcodes;
134
use C4::Barcodes;
133
135
134
### "-------------------- addorder.pl ----------"
136
### "-------------------- addorder.pl ----------"
Lines 362-371 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
362
}
364
}
363
365
364
if (C4::Context->preference("AcqLog") && $basketno) {
366
if (C4::Context->preference("AcqLog") && $basketno) {
367
    my $modified = Koha::Acquisition::Baskets->find( $basketno );
365
    logaction(
368
    logaction(
366
        'ACQUISITIONS',
369
        'ACQUISITIONS',
367
        'MODIFY_BASKET',
370
        'MODIFY_BASKET',
368
        $basketno
371
        $basketno,
372
        to_json($modified->unblessed)
369
    );
373
    );
370
}
374
}
371
375
372
- 

Return to bug 23971