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

(-)a/C4/Items.pm (+2 lines)
Lines 403-408 The last optional parameter allows for passing skip_record_index through to the Link Here
403
403
404
sub ModDateLastSeen {
404
sub ModDateLastSeen {
405
    my ( $itemnumber, $leave_item_lost, $params ) = @_;
405
    my ( $itemnumber, $leave_item_lost, $params ) = @_;
406
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 0 });
406
407
407
    my $item = Koha::Items->find($itemnumber);
408
    my $item = Koha::Items->find($itemnumber);
408
    $item->datelastseen(dt_from_string->ymd);
409
    $item->datelastseen(dt_from_string->ymd);
Lines 587-592 sub GetItemsForInventory { Link Here
587
    }
588
    }
588
589
589
    if ($datelastseen) {
590
    if ($datelastseen) {
591
        $datelastseen = output_pref({ str => $datelastseen, dateformat => 'iso', dateonly => 0 });
590
        push @where_strings, '(datelastseen < ? OR datelastseen IS NULL)';
592
        push @where_strings, '(datelastseen < ? OR datelastseen IS NULL)';
591
        push @bind_params, $datelastseen;
593
        push @bind_params, $datelastseen;
592
    }
594
    }
(-)a/Koha/Schema/Result/Deleteditem.pm (-2 / +2 lines)
Lines 112-118 the date the item was last checked out Link Here
112
112
113
=head2 datelastseen
113
=head2 datelastseen
114
114
115
  data_type: 'date'
115
  data_type: 'datetime'
116
  datetime_undef_if_invalid: 1
116
  datetime_undef_if_invalid: 1
117
  is_nullable: 1
117
  is_nullable: 1
118
118
Lines 404-410 __PACKAGE__->add_columns( Link Here
404
  "datelastborrowed",
404
  "datelastborrowed",
405
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
405
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
406
  "datelastseen",
406
  "datelastseen",
407
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
407
  { data_type => "datetime", datetime_undef_if_invalid => 1, is_nullable => 1 },
408
  "stack",
408
  "stack",
409
  { data_type => "tinyint", is_nullable => 1 },
409
  { data_type => "tinyint", is_nullable => 1 },
410
  "notforloan",
410
  "notforloan",
(-)a/Koha/Schema/Result/Item.pm (-2 / +2 lines)
Lines 115-121 the date the item was last checked out/issued Link Here
115
115
116
=head2 datelastseen
116
=head2 datelastseen
117
117
118
  data_type: 'date'
118
  data_type: 'datetime'
119
  datetime_undef_if_invalid: 1
119
  datetime_undef_if_invalid: 1
120
  is_nullable: 1
120
  is_nullable: 1
121
121
Lines 418-424 __PACKAGE__->add_columns( Link Here
418
  "datelastborrowed",
418
  "datelastborrowed",
419
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
419
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
420
  "datelastseen",
420
  "datelastseen",
421
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
421
  { data_type => "datetime", datetime_undef_if_invalid => 1, is_nullable => 1 },
422
  "stack",
422
  "stack",
423
  { data_type => "tinyint", is_nullable => 1 },
423
  { data_type => "tinyint", is_nullable => 1 },
424
  "notforloan",
424
  "notforloan",
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 2622-2628 CREATE TABLE `deleteditems` ( Link Here
2622
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
2622
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
2623
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
2623
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
2624
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out',
2624
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out',
2625
  `datelastseen` date DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
2625
  `datelastseen` datetime DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
2626
  `stack` tinyint(1) DEFAULT NULL,
2626
  `stack` tinyint(1) DEFAULT NULL,
2627
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
2627
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
2628
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
2628
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
Lines 3590-3596 CREATE TABLE `items` ( Link Here
3590
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
3590
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
3591
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
3591
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
3592
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out/issued',
3592
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out/issued',
3593
  `datelastseen` date DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
3593
  `datelastseen` datetime DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
3594
  `stack` tinyint(1) DEFAULT NULL,
3594
  `stack` tinyint(1) DEFAULT NULL,
3595
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
3595
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
3596
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
3596
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-1 / +1 lines)
Lines 567-573 Note that permanent location is a code, and location may be an authval. Link Here
567
                        [% END %]
567
                        [% END %]
568
568
569
                    </td>
569
                    </td>
570
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
570
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates with_hours => 1 %]</td>
571
                    <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
571
                    <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
572
                    <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
572
                    <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
573
                    <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
573
                    <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-1 / +1 lines)
Lines 393-399 Link Here
393
                                        <li>
393
                                        <li>
394
                                            <span class="label">Last seen:</span>
394
                                            <span class="label">Last seen:</span>
395
                                            [% IF ( ITEM_DAT.datelastseen ) %]
395
                                            [% IF ( ITEM_DAT.datelastseen ) %]
396
                                                [% ITEM_DAT.datelastseen | $KohaDates %]
396
                                                [% ITEM_DAT.datelastseen | $KohaDates with_hours => 1 %]
397
                                            [%END %]
397
                                            [%END %]
398
                                        </li>
398
                                        </li>
399
                                        <li>
399
                                        <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +5 lines)
Lines 135-141 Link Here
135
                        [% SET attribute = header.attribute %]
135
                        [% SET attribute = header.attribute %]
136
                        [% SET can_mod = item.nomod ? "nomod" : "canmod" %]
136
                        [% SET can_mod = item.nomod ? "nomod" : "canmod" %]
137
                        [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
137
                        [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
138
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
138
                            [% IF header.attribute == 'datelastseen' %]
139
                                <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates with_hours => 1 %]</td>
140
                            [% ELSE %]
141
                                <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
142
                            [% END %]
139
                        [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %]
143
                        [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %]
140
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $Price %]</td>
144
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $Price %]</td>
141
                        [% ELSE %]
145
                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-1 / +1 lines)
Lines 129-135 Link Here
129
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
129
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
130
                        </td>
130
                        </td>
131
                        <td>[% item.itemcallnumber | html %]</td>
131
                        <td>[% item.itemcallnumber | html %]</td>
132
                        <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
132
                        <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates with_hours => 1 %]</td>
133
                        <td>[% item.price | $Price %]</td>
133
                        <td>[% item.price | $Price %]</td>
134
                        <td>[% item.replacementprice | $Price %]</td>
134
                        <td>[% item.replacementprice | $Price %]</td>
135
                        <td>[% Branches.GetName(item.homebranch) | html %]</td>
135
                        <td>[% Branches.GetName(item.homebranch) | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-3 / +2 lines)
Lines 50-56 Link Here
50
            <main>
50
            <main>
51
51
52
    <h1>Inventory</h1>
52
    <h1>Inventory</h1>
53
    [% IF (moddatecount) %]<div class="dialog message">[% moddatecount | html %] items modified : datelastseen set to [% date | $KohaDates %]</div>
53
    [% IF (moddatecount) %]<div class="dialog message">[% moddatecount | html %] items modified : datelastseen set to [% date | $KohaDates with_hours => 1 %]</div>
54
    <div class="dialog alert">Number of potential barcodes read: [% LinesRead | html %]</div>[% END %]
54
    <div class="dialog alert">Number of potential barcodes read: [% LinesRead | html %]</div>[% END %]
55
    [% IF (errorfile) %]<div class="dialog alert">[% errorfile | html %] can't be opened</div>[% END %]
55
    [% IF (errorfile) %]<div class="dialog alert">[% errorfile | html %] can't be opened</div>[% END %]
56
    [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
56
    [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
Lines 312-318 Link Here
312
            [% result.withdrawn | html %]
312
            [% result.withdrawn | html %]
313
            </td>
313
            </td>
314
            <td data-order="[% result.datelastseen | html %]">
314
            <td data-order="[% result.datelastseen | html %]">
315
                [% result.datelastseen | $KohaDates%]
315
                [% result.datelastseen | $KohaDates with_hours => 1 %]
316
            </td>
316
            </td>
317
            <td>
317
            <td>
318
            [% FOREACH problem IN result.problems %]
318
            [% FOREACH problem IN result.problems %]
319
- 

Return to bug 31212