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

(-)a/C4/Items.pm (-1 lines)
Lines 202-208 sub AddItem { Link Here
202
        $unlinked_item_subfields = shift;
202
        $unlinked_item_subfields = shift;
203
    }
203
    }
204
204
205
    _set_derived_columns_for_add($item);
206
    $item->{'more_subfields_xml'} = _get_unlinked_subfields_xml($unlinked_item_subfields);
205
    $item->{'more_subfields_xml'} = _get_unlinked_subfields_xml($unlinked_item_subfields);
207
206
208
    my ( $itemnumber, $error ) = _koha_new_item( $item, $item->{barcode} );
207
    my ( $itemnumber, $error ) = _koha_new_item( $item, $item->{barcode} );
(-)a/Koha/Item.pm (-2 / +11 lines)
Lines 28-33 use Koha::DateUtils qw( dt_from_string ); Link Here
28
use C4::Context;
28
use C4::Context;
29
use C4::Circulation;
29
use C4::Circulation;
30
use C4::Reserves;
30
use C4::Reserves;
31
use C4::ClassSource; # FIXME We would like to avoid that
32
31
use Koha::Checkouts;
33
use Koha::Checkouts;
32
use Koha::CirculationRules;
34
use Koha::CirculationRules;
33
use Koha::Item::Transfer::Limits;
35
use Koha::Item::Transfer::Limits;
Lines 67-74 sub store { Link Here
67
        $self->itype($self->biblio->biblioitem->itemtype);
69
        $self->itype($self->biblio->biblioitem->itemtype);
68
    }
70
    }
69
71
72
    my $today = dt_from_string;
70
    unless ( $self->in_storage ) { #AddItem
73
    unless ( $self->in_storage ) { #AddItem
71
        my $today = dt_from_string;
72
        unless ( $self->permanent_location ) {
74
        unless ( $self->permanent_location ) {
73
            $self->permanent_location($self->location);
75
            $self->permanent_location($self->location);
74
        }
76
        }
Lines 79-84 sub store { Link Here
79
            $self->datelastseen($today);
81
            $self->datelastseen($today);
80
        }
82
        }
81
83
84
        unless ( $self->dateaccessioned ) {
85
            $self->dateaccessioned($today);
86
        }
87
88
        if ( $self->itemcallnumber ) { # This could be improved, we should recalculate it only if changed
89
            my $cn_sort = GetClassSort($self->cn_source, $self->itemcallnumber, "");
90
            $self->cn_sort($cn_sort);
91
        }
82
    }
92
    }
83
93
84
    unless ( $self->dateaccessioned ) {
94
    unless ( $self->dateaccessioned ) {
85
- 

Return to bug 23463