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 2643-2649 CREATE TABLE `deleteditems` ( Link Here
2643
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
2643
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
2644
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
2644
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
2645
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out',
2645
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out',
2646
  `datelastseen` date DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
2646
  `datelastseen` datetime DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
2647
  `stack` tinyint(1) DEFAULT NULL,
2647
  `stack` tinyint(1) DEFAULT NULL,
2648
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
2648
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
2649
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
2649
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
Lines 3612-3618 CREATE TABLE `items` ( Link Here
3612
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
3612
  `replacementprice` decimal(8,2) DEFAULT NULL COMMENT 'cost the library charges to replace the item if it has been marked lost (MARC21 952$v)',
3613
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
3613
  `replacementpricedate` date DEFAULT NULL COMMENT 'the date the price is effective from (MARC21 952$w)',
3614
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out/issued',
3614
  `datelastborrowed` date DEFAULT NULL COMMENT 'the date the item was last checked out/issued',
3615
  `datelastseen` date DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
3615
  `datelastseen` datetime DEFAULT NULL COMMENT 'the date the item was last see (usually the last time the barcode was scanned or inventory was done)',
3616
  `stack` tinyint(1) DEFAULT NULL,
3616
  `stack` tinyint(1) DEFAULT NULL,
3617
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
3617
  `notforloan` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining why this item is not for loan (MARC21 952$7)',
3618
  `damaged` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'authorized value defining this item as damaged (MARC21 952$4)',
3618
  `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 563-569 Note that permanent location is a code, and location may be an authval. Link Here
563
                        [% END %]
563
                        [% END %]
564
564
565
                    </td>
565
                    </td>
566
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
566
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates with_hours => 1 %]</td>
567
                    <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
567
                    <td class="issues" data-order="[% item.issues || 0 | html %]">[% item.issues || 0 | html %]</td>
568
                    <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
568
                    <td class="renewals" data-order="[% item.renewals || 0 | html %]">[% item.renewals || 0 | html %]</td>
569
                    <td class="dateaccessioned" data-order="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</td>
569
                    <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 386-392 Link Here
386
                                        <li>
386
                                        <li>
387
                                            <span class="label">Last seen:</span>
387
                                            <span class="label">Last seen:</span>
388
                                            [% IF ( ITEM_DAT.datelastseen ) %]
388
                                            [% IF ( ITEM_DAT.datelastseen ) %]
389
                                                [% ITEM_DAT.datelastseen | $KohaDates %]
389
                                                [% ITEM_DAT.datelastseen | $KohaDates with_hours => 1 %]
390
                                            [%END %]
390
                                            [%END %]
391
                                        </li>
391
                                        </li>
392
                                        <li>
392
                                        <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +5 lines)
Lines 140-146 Link Here
140
                        [% SET attribute = header.attribute %]
140
                        [% SET attribute = header.attribute %]
141
                        [% SET can_mod = item.nomod ? "nomod" : "canmod" %]
141
                        [% SET can_mod = item.nomod ? "nomod" : "canmod" %]
142
                        [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
142
                        [% IF header.attribute AND date_fields.grep('^' _ attribute _ '$').size %]
143
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
143
                            [% IF header.attribute == 'datelastseen' %]
144
                                <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates with_hours => 1 %]</td>
145
                            [% ELSE %]
146
                                <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $KohaDates %]</td>
147
                            [% END %]
144
                        [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %]
148
                        [% ELSIF ( item.$attribute && ( attribute == 'price' || attribute == 'replacementprice' ) ) %]
145
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $Price %]</td>
149
                            <td class="[% can_mod | html %]" data-order="[% item.$attribute | html %]">[% item.$attribute | $Price %]</td>
146
                        [% ELSE %]
150
                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt (-1 / +1 lines)
Lines 119-125 Link Here
119
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
119
                            <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
120
                        </td>
120
                        </td>
121
                        <td>[% item.itemcallnumber | html %]</td>
121
                        <td>[% item.itemcallnumber | html %]</td>
122
                        <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
122
                        <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates with_hours => 1 %]</td>
123
                        <td>[% item.price | $Price %]</td>
123
                        <td>[% item.price | $Price %]</td>
124
                        <td>[% item.replacementprice | $Price %]</td>
124
                        <td>[% item.replacementprice | $Price %]</td>
125
                        <td>[% Branches.GetName(item.homebranch) | html %]</td>
125
                        <td>[% Branches.GetName(item.homebranch) | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt (-3 / +2 lines)
Lines 41-47 Link Here
41
            <main>
41
            <main>
42
42
43
    <h1>Inventory</h1>
43
    <h1>Inventory</h1>
44
    [% IF (moddatecount) %]<div class="dialog message">[% moddatecount | html %] items modified : datelastseen set to [% date | $KohaDates %]</div>
44
    [% IF (moddatecount) %]<div class="dialog message">[% moddatecount | html %] items modified : datelastseen set to [% date | $KohaDates with_hours => 1 %]</div>
45
    <div class="dialog alert">Number of potential barcodes read: [% LinesRead | html %]</div>[% END %]
45
    <div class="dialog alert">Number of potential barcodes read: [% LinesRead | html %]</div>[% END %]
46
    [% IF (errorfile) %]<div class="dialog alert">[% errorfile | html %] can't be opened</div>[% END %]
46
    [% IF (errorfile) %]<div class="dialog alert">[% errorfile | html %] can't be opened</div>[% END %]
47
    [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
47
    [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
Lines 303-309 Link Here
303
            [% result.withdrawn | html %]
303
            [% result.withdrawn | html %]
304
            </td>
304
            </td>
305
            <td data-order="[% result.datelastseen | html %]">
305
            <td data-order="[% result.datelastseen | html %]">
306
                [% result.datelastseen | $KohaDates%]
306
                [% result.datelastseen | $KohaDates with_hours => 1 %]
307
            </td>
307
            </td>
308
            <td>
308
            <td>
309
            [% FOREACH problem IN result.problems %]
309
            [% FOREACH problem IN result.problems %]
310
- 

Return to bug 31212