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 386-388 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy Link Here
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
389
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 6055-6060 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6055
   SetVersion ($DBversion);
6055
   SetVersion ($DBversion);
6056
}
6056
}
6057
6057
6058
6059
6060
$DBversion = "3.09.00.XXX";
6061
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6062
    $dbh->do(q{
6063
        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');
6064
    });
6065
    print "Upgrade to $DBversion done (Added AcqItemSetSubfieldsWhenReceived syspref)\n";
6066
    SetVersion($DBversion);
6067
}
6068
6069
6070
6071
6058
=head1 FUNCTIONS
6072
=head1 FUNCTIONS
6059
6073
6060
=head2 TableExists($table)
6074
=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