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

(-)a/C4/Budgets.pm (-3 / +3 lines)
Lines 645-651 sub AddBudget { Link Here
645
    my $id = $resultset->create($budget)->id;
645
    my $id = $resultset->create($budget)->id;
646
646
647
    # Log the addition
647
    # Log the addition
648
    if (C4::Context->preference("AcqLog")) {
648
    if (C4::Context->preference("AcquisitionLog")) {
649
        my $infos = {
649
        my $infos = {
650
            budget_amount => $budget->{budget_amount},
650
            budget_amount => $budget->{budget_amount},
651
            budget_encumb => $budget->{budget_encumb},
651
            budget_encumb => $budget->{budget_encumb},
Lines 669-675 sub ModBudget { Link Here
669
    return unless($result);
669
    return unless($result);
670
670
671
    # Log this modification
671
    # Log this modification
672
    if (C4::Context->preference("AcqLog")) {
672
    if (C4::Context->preference("AcquisitionLog")) {
673
        my $infos = {
673
        my $infos = {
674
            budget_amount_new    => $budget->{budget_amount},
674
            budget_amount_new    => $budget->{budget_amount},
675
            budget_encumb_new    => $budget->{budget_encumb},
675
            budget_encumb_new    => $budget->{budget_encumb},
Lines 701-707 sub DelBudget { Link Here
701
	my $sth         = $dbh->prepare("delete from aqbudgets where budget_id=?");
701
	my $sth         = $dbh->prepare("delete from aqbudgets where budget_id=?");
702
	my $rc          = $sth->execute($budget_id);
702
	my $rc          = $sth->execute($budget_id);
703
    # Log the deletion
703
    # Log the deletion
704
    if (C4::Context->preference("AcqLog")) {
704
    if (C4::Context->preference("AcquisitionLog")) {
705
        logaction(
705
        logaction(
706
            'ACQUISITIONS',
706
            'ACQUISITIONS',
707
            'DELETE_FUND',
707
            'DELETE_FUND',
(-)a/acqui/addorder.pl (-2 / +2 lines)
Lines 319-325 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
319
    if ( $orderinfo->{ordernumber} ) {
319
    if ( $orderinfo->{ordernumber} ) {
320
        ModOrder($orderinfo);
320
        ModOrder($orderinfo);
321
        # Log the order modification
321
        # Log the order modification
322
        if (C4::Context->preference("AcqLog")) {
322
        if (C4::Context->preference("AcquisitionLog")) {
323
            my $infos = {};
323
            my $infos = {};
324
            foreach my $field(@log_order_fields) {
324
            foreach my $field(@log_order_fields) {
325
                $infos->{$field} = $orderinfo->{$field};
325
                $infos->{$field} = $orderinfo->{$field};
Lines 335-341 if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { Link Here
335
    else { # else, it's a new line
335
    else { # else, it's a new line
336
        $order->store;
336
        $order->store;
337
        # Log the order creation
337
        # Log the order creation
338
        if (C4::Context->preference("AcqLog")) {
338
        if (C4::Context->preference("AcquisitionLog")) {
339
            my $infos = {};
339
            my $infos = {};
340
            foreach my $field(@log_order_fields) {
340
            foreach my $field(@log_order_fields) {
341
                $infos->{$field} = $orderinfo->{$field};
341
                $infos->{$field} = $orderinfo->{$field};
(-)a/acqui/cancelorder.pl (-1 / +1 lines)
Lines 66-72 if( $action and $action eq "confirmcancel" ) { Link Here
66
            if $messages[0]->message eq 'error_delbiblio';
66
            if $messages[0]->message eq 'error_delbiblio';
67
    } else {
67
    } else {
68
        # Log the cancellation of the order
68
        # Log the cancellation of the order
69
        if (C4::Context->preference("AcqLog")) {
69
        if (C4::Context->preference("AcquisitionLog")) {
70
            logaction('ACQUISITIONS', 'CANCEL_ORDER', $ordernumber);
70
            logaction('ACQUISITIONS', 'CANCEL_ORDER', $ordernumber);
71
        }
71
        }
72
        $template->param(success_cancelorder => 1);
72
        $template->param(success_cancelorder => 1);
(-)a/acqui/finishreceive.pl (-1 / +1 lines)
Lines 192-198 if ($suggestion_id) { Link Here
192
}
192
}
193
193
194
# Log the receipt
194
# Log the receipt
195
if (C4::Context->preference("AcqLog")) {
195
if (C4::Context->preference("AcquisitionLog")) {
196
    my $infos = {
196
    my $infos = {
197
        quantityrec      => $quantityrec,
197
        quantityrec      => $quantityrec,
198
        bookfund         => $bookfund,
198
        bookfund         => $bookfund,
(-)a/acqui/invoice.pl (-3 / +3 lines)
Lines 148-154 elsif ( $op && $op eq 'del_adj' ) { Link Here
148
    my $adjustment_id  = $input->param('adjustment_id');
148
    my $adjustment_id  = $input->param('adjustment_id');
149
    my $del_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id );
149
    my $del_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id );
150
    if ($del_adj) {
150
    if ($del_adj) {
151
        if (C4::Context->preference("AcqLog")) {
151
        if (C4::Context->preference("AcquisitionLog")) {
152
            my $infos = {
152
            my $infos = {
153
                invoiceid     => $del_adj->invoiceid,
153
                invoiceid     => $del_adj->invoiceid,
154
                budget_id     => $del_adj->budget_id,
154
                budget_id     => $del_adj->budget_id,
Lines 194-200 elsif ( $op && $op eq 'mod_adj' ) { Link Here
194
            my $new_adj = Koha::Acquisition::Invoice::Adjustment->new($adj);
194
            my $new_adj = Koha::Acquisition::Invoice::Adjustment->new($adj);
195
            $new_adj->store();
195
            $new_adj->store();
196
            # Log this addition
196
            # Log this addition
197
            if (C4::Context->preference("AcqLog")) {
197
            if (C4::Context->preference("AcquisitionLog")) {
198
                logaction(
198
                logaction(
199
                    'ACQUISITIONS',
199
                    'ACQUISITIONS',
200
                    'CREATE_INVOICE_ADJUSTMENT',
200
                    'CREATE_INVOICE_ADJUSTMENT',
Lines 207-213 elsif ( $op && $op eq 'mod_adj' ) { Link Here
207
            my $old_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id[$i] );
207
            my $old_adj = Koha::Acquisition::Invoice::Adjustments->find( $adjustment_id[$i] );
208
            unless ( $old_adj->adjustment == $adjustment[$i] && $old_adj->reason eq $reason[$i] && $old_adj->budget_id == $budget_id[$i] && $old_adj->encumber_open == $e_open{$adjustment_id[$i]} && $old_adj->note eq $note[$i] ){
208
            unless ( $old_adj->adjustment == $adjustment[$i] && $old_adj->reason eq $reason[$i] && $old_adj->budget_id == $budget_id[$i] && $old_adj->encumber_open == $e_open{$adjustment_id[$i]} && $old_adj->note eq $note[$i] ){
209
                # Log this modification
209
                # Log this modification
210
                if (C4::Context->preference("AcqLog")) {
210
                if (C4::Context->preference("AcquisitionLog")) {
211
                    my $infos = {
211
                    my $infos = {
212
                        adjustment        => $adjustment[$i],
212
                        adjustment        => $adjustment[$i],
213
                        reason            => $reason[$i],
213
                        reason            => $reason[$i],
(-)a/admin/aqbudgetperiods.pl (-1 / +1 lines)
Lines 120-126 elsif ( $op eq 'add_validate' ) { Link Here
120
        $$budget_period_hashref{$_}||=0 for qw(budget_period_active budget_period_locked);
120
        $$budget_period_hashref{$_}||=0 for qw(budget_period_active budget_period_locked);
121
        my $status=ModBudgetPeriod($budget_period_hashref);
121
        my $status=ModBudgetPeriod($budget_period_hashref);
122
        # Log the budget modification
122
        # Log the budget modification
123
        if (C4::Context->preference("AcqLog")) {
123
        if (C4::Context->preference("AcquisitionLog")) {
124
            my $diff = 0 - ($budgetperiod_old->{budget_period_total} - $budget_period_hashref->{budget_period_total});
124
            my $diff = 0 - ($budgetperiod_old->{budget_period_total} - $budget_period_hashref->{budget_period_total});
125
            my $infos = {
125
            my $infos = {
126
                budget_period_startdate     => $input->param('budget_period_startdate'),
126
                budget_period_startdate     => $input->param('budget_period_startdate'),
(-)a/t/db_dependent/Budgets.t (-2 / +1 lines)
Lines 24-30 use Koha::DateUtils; Link Here
24
24
25
use t::lib::Mocks;
25
use t::lib::Mocks;
26
t::lib::Mocks::mock_preference('OrderPriceRounding','');
26
t::lib::Mocks::mock_preference('OrderPriceRounding','');
27
t::lib::Mocks::mock_preference('AcqLog','1');
27
t::lib::Mocks::mock_preference('AcquisitionLog','1');
28
28
29
my $schema  = Koha::Database->new->schema;
29
my $schema  = Koha::Database->new->schema;
30
$schema->storage->txn_begin;
30
$schema->storage->txn_begin;
31
- 

Return to bug 24190