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 374-376 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
374
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('EnableBorrowerFiles','0','If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
375
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UpdateTotalIssuesOnCirc','0','Whether to update the totalissues field in the biblio on each circ.',NULL,'YesNo');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
376
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('IntranetSlipPrinterJS','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','','Free');
377
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 5635-5640 if(C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5635
    SetVersion($DBversion);
5635
    SetVersion($DBversion);
5636
}
5636
}
5637
5637
5638
5639
5640
5641
$DBversion = "3.09.00.XXX";
5642
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
5643
    $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');");
5644
    print "Upgrade to $DBversion done (Added AcqItemStatusWhenReceived syspref)\n";
5645
    SetVersion($DBversion);
5646
}
5647
5648
5649
5650
5638
=head1 FUNCTIONS
5651
=head1 FUNCTIONS
5639
5652
5640
=head2 TableExists($table)
5653
=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