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

(-)a/acqui/finishreceive.pl (+13 lines)
Lines 98-103 if ($quantityrec > $origquantityrec ) { Link Here
98
    my @received_items = ();
98
    my @received_items = ();
99
    if(C4::Context->preference('AcqCreateItem') eq 'ordering') {
99
    if(C4::Context->preference('AcqCreateItem') eq 'ordering') {
100
        @received_items = $input->param('items_to_receive');
100
        @received_items = $input->param('items_to_receive');
101
        my ( $field, $value ) = split '=', C4::Context->preference("AcqItemStatusWhenReceived");
102
        my $frameworkcode = GetFrameworkCode($biblionumber);
103
        my ( $itemfield ) = GetMarcFromKohaField( 'items.itemnumber', $frameworkcode );
104
        if ( $field and $field =~ /^$itemfield\$/ and $value ) {
105
            my ( $fv, $sfv ) = split '\$', $field;
106
            for my $in ( @received_items ) {
107
                my $item = C4::Items::GetMarcItem( $biblionumber, $in );
108
                foreach ( $item->field($itemfield) ) {
109
                    $_->update( $sfv => $value );
110
                }
111
                C4::Items::ModItemFromMarc( $item, $biblionumber, $in );
112
            }
113
        }
101
    }
114
    }
102
115
103
    # save the quantity received.
116
    # save the quantity received.
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 371-373 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
371
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo');
371
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo');
372
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('DefaultLanguageField008','','Fill in the default language for field 008 Range 35-37 (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>)','','Free');
372
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('DefaultLanguageField008','','Fill in the default language for field 008 Range 35-37 (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>)','','Free');
373
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo');
373
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo');
374
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 (+14 lines)
Lines 5392-5397 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
5392
    SetVersion ($DBversion);
5392
    SetVersion ($DBversion);
5393
}
5393
}
5394
5394
5395
5396
5397
5398
5399
$DBversion = "3.09.00.XXX";
5400
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5401
    $dbh->do("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');");
5402
    print "Upgrade to $DBversion done (Added AcqItemStatusWhenReceived syspref)\n";
5403
    SetVersion($DBversion);
5404
}
5405
5406
5407
5408
5395
=head1 FUNCTIONS
5409
=head1 FUNCTIONS
5396
5410
5397
=head2 TableExists($table)
5411
=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
            - The default tax rate is
35
            - The default tax rate is
36
            - pref: gist
36
            - pref: gist
37
            - (enter in numeric form, 0.12 for 12%)
37
            - (enter in numeric form, 0.12 for 12%)
38
        -
39
            - pref: AcqItemStatusWhenReceived
40
            - Set a status for item when items are created when receiving (e.g. 995$o=5)
38
41
39
    Printing:
42
    Printing:
40
        -
43
        -
41
- 

Return to bug 8307