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

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

Return to bug 37398