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

(-)a/acqui/finishreceive.pl (-1 / +15 lines)
Lines 63-68 if ($quantityrec > $origquantityrec ) { Link Here
63
    my @received_items = ();
63
    my @received_items = ();
64
    if(C4::Context->preference('AcqCreateItem') eq 'ordering') {
64
    if(C4::Context->preference('AcqCreateItem') eq 'ordering') {
65
        @received_items = $input->param('items_to_receive');
65
        @received_items = $input->param('items_to_receive');
66
        my @affects = split q{\|}, C4::Context->preference("AcqItemSetSubfieldsWhenReceived");
67
        if ( @affects ) {
68
            my $frameworkcode = GetFrameworkCode($biblionumber);
69
            my ( $itemfield ) = GetMarcFromKohaField( 'items.itemnumber', $frameworkcode );
70
            for my $in ( @received_items ) {
71
                my $item = C4::Items::GetMarcItem( $biblionumber, $in );
72
                for my $affect ( @affects ) {
73
                    my ( $sf, $v ) = split q{=}, $affect;
74
                    foreach ( $item->field($itemfield) ) {
75
                        $_->update( $sf => $v );
76
                    }
77
                }
78
                C4::Items::ModItemFromMarc( $item, $biblionumber, $in );
79
            }
80
        }
66
    }
81
    }
67
82
68
    $order->{rrp} = $rrp;
83
    $order->{rrp} = $rrp;
Lines 137-143 if ($quantityrec > $origquantityrec ) { Link Here
137
            NewOrderItem($itemnumber, $new_ordernumber);
152
            NewOrderItem($itemnumber, $new_ordernumber);
138
        }
153
        }
139
    }
154
    }
140
141
}
155
}
142
156
143
update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber );
157
update_item( $_ ) foreach GetItemnumbersFromOrder( $ordernumber );
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 421-423 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES( Link Here
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
421
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('PatronSelfRegistrationAdditionalInstructions','','A free text field to display additional instructions to newly self registered patrons.','','free');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
422
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UseQueryParser', '0', 'If enabled, try to use QueryParser for queries.', NULL, 'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
423
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('FinesIncludeGracePeriod','1','If enabled, fines calculations will include the grace period.',NULL,'YesNo');
424
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AcqItemStatusWhenReceived','0','This syspref set a status for item when items are created when receiving (e.g. 995\$o=5)','','Free');
(-)a/installer/data/mysql/updatedatabase.pl (+13 lines)
Lines 6532-6537 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6532
    SetVersion ($DBversion);
6532
    SetVersion ($DBversion);
6533
}
6533
}
6534
6534
6535
6536
$DBversion = "3.11.00.XXX";
6537
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6538
    $dbh->do(q{
6539
        INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AcqItemSetSubfieldsWhenReceived','','Set subfields for item when items are created when receiving (e.g. o=5|a="foo bar")','','Free');
6540
    });
6541
    print "Upgrade to $DBversion done (Added AcqItemSetSubfieldsWhenReceived syspref)\n";
6542
    SetVersion($DBversion);
6543
}
6544
6545
6546
6547
6535
=head1 FUNCTIONS
6548
=head1 FUNCTIONS
6536
6549
6537
=head2 TableExists($table)
6550
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +3 lines)
Lines 35-40 Acquisitions: Link Here
35
            - Default tax rates are
35
            - Default tax rates are
36
            - pref: gist
36
            - pref: gist
37
            - (enter in numeric form, 0.12 for 12%. First is the default. If you want more than 1 value, please separate with |)
37
            - (enter in numeric form, 0.12 for 12%. First is the default. If you want more than 1 value, please separate with |)
38
        -
39
            - pref: AcqItemSetSubfieldsWhenReceived
40
            - Set subfields for item when items are created when receiving (e.g. o=5|a="foo bar")
38
41
39
    Printing:
42
    Printing:
40
        -
43
        -
41
- 

Return to bug 8307