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

(-)a/Koha/UI/Form/Builder/Item.pm (-5 / +4 lines)
Lines 147-157 sub generate_subfield_form { Link Here
147
        }
147
        }
148
    }
148
    }
149
149
150
    if ($subfield->{kohafield} =~ /items\.(replacementpricedate|dateaccessioned|datelastborrowed|onloan)/) {
150
    if ( defined $subfield->{kohafield}  && $subfield->{kohafield} =~ /items\.(replacementpricedate|dateaccessioned|datelastborrowed|onloan)/) {
151
        $subfield_data{datetype} = 'date';
151
        $subfield_data{datetype} = 'date';
152
    }
152
    }
153
153
154
    if ($subfield->{kohafield} =~ /items\.(datelastseen|damaged_on|itemlost_on|withdrawn_on|deleted_on)/) {
154
    if ( defined $subfield->{kohafield} && $subfield->{kohafield} =~ /items\.(datelastseen|damaged_on|itemlost_on|withdrawn_on|deleted_on)/) {
155
        $subfield_data{datetype} = 'datetime';
155
        $subfield_data{datetype} = 'datetime';
156
    }
156
    }
157
157
Lines 319-332 sub generate_subfield_form { Link Here
319
            authtypecode => $subfield->{authtypecode},
319
            authtypecode => $subfield->{authtypecode},
320
        };
320
        };
321
    }
321
    }
322
    elsif ( $subfield_data{datetype} eq 'date' ) {
322
    elsif ( defined $subfield_data{datetype} && $subfield_data{datetype} eq 'date' ) {
323
        $subfield_data{marc_value} = {
323
        $subfield_data{marc_value} = {
324
            type => 'date_field',
324
            type => 'date_field',
325
            id => $subfield_data{id},
325
            id => $subfield_data{id},
326
            value => $value,
326
            value => $value,
327
        }
327
        }
328
    }
328
    }
329
    elsif ( $subfield_data{datetype} eq 'datetime' ) {
329
    elsif ( defined $subfield_data{datetype} && $subfield_data{datetype} eq 'datetime' ) {
330
        $subfield_data{marc_value} = {
330
        $subfield_data{marc_value} = {
331
            type => 'datetime_field',
331
            type => 'datetime_field',
332
            id => $subfield_data{id},
332
            id => $subfield_data{id},
333
- 

Return to bug 37398