Lines 25-31
use Carp;
Link Here
|
25 |
use C4::Context; |
25 |
use C4::Context; |
26 |
use C4::Koha; |
26 |
use C4::Koha; |
27 |
use C4::Biblio; |
27 |
use C4::Biblio; |
28 |
use C4::Dates qw/format_date format_date_in_iso/; |
28 |
use Koha::DateUtils; |
29 |
use MARC::Record; |
29 |
use MARC::Record; |
30 |
use C4::ClassSource; |
30 |
use C4::ClassSource; |
31 |
use C4::Log; |
31 |
use C4::Log; |
Lines 645-652
C<$itemnum> is the item number
Link Here
|
645 |
sub ModDateLastSeen { |
645 |
sub ModDateLastSeen { |
646 |
my ($itemnumber) = @_; |
646 |
my ($itemnumber) = @_; |
647 |
|
647 |
|
648 |
my $today = C4::Dates->new(); |
648 |
my $today = output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 }); |
649 |
ModItem({ itemlost => 0, datelastseen => $today->output("iso") }, undef, $itemnumber); |
649 |
ModItem({ itemlost => 0, datelastseen => $today }, undef, $itemnumber); |
650 |
} |
650 |
} |
651 |
|
651 |
|
652 |
=head2 DelItem |
652 |
=head2 DelItem |
Lines 2109-2115
C<items.withdrawn>
Link Here
|
2109 |
|
2109 |
|
2110 |
sub _set_defaults_for_add { |
2110 |
sub _set_defaults_for_add { |
2111 |
my $item = shift; |
2111 |
my $item = shift; |
2112 |
$item->{dateaccessioned} ||= C4::Dates->new->output('iso'); |
2112 |
$item->{dateaccessioned} || output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 }); |
2113 |
$item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); |
2113 |
$item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); |
2114 |
} |
2114 |
} |
2115 |
|
2115 |
|
Lines 2142-2148
sub _koha_new_item {
Link Here
|
2142 |
notforloan = ?, |
2142 |
notforloan = ?, |
2143 |
damaged = ?, |
2143 |
damaged = ?, |
2144 |
itemlost = ?, |
2144 |
itemlost = ?, |
2145 |
withdrawn = ?, |
2145 |
withdrawn = ?, |
2146 |
itemcallnumber = ?, |
2146 |
itemcallnumber = ?, |
2147 |
coded_location_qualifier = ?, |
2147 |
coded_location_qualifier = ?, |
2148 |
restricted = ?, |
2148 |
restricted = ?, |
Lines 2150-2156
sub _koha_new_item {
Link Here
|
2150 |
holdingbranch = ?, |
2150 |
holdingbranch = ?, |
2151 |
paidfor = ?, |
2151 |
paidfor = ?, |
2152 |
location = ?, |
2152 |
location = ?, |
2153 |
permanent_location = ?, |
2153 |
permanent_location = ?, |
2154 |
onloan = ?, |
2154 |
onloan = ?, |
2155 |
issues = ?, |
2155 |
issues = ?, |
2156 |
renewals = ?, |
2156 |
renewals = ?, |
Lines 2160-2173
sub _koha_new_item {
Link Here
|
2160 |
ccode = ?, |
2160 |
ccode = ?, |
2161 |
itype = ?, |
2161 |
itype = ?, |
2162 |
materials = ?, |
2162 |
materials = ?, |
2163 |
uri = ?, |
2163 |
uri = ?, |
2164 |
enumchron = ?, |
2164 |
enumchron = ?, |
2165 |
more_subfields_xml = ?, |
2165 |
more_subfields_xml = ?, |
2166 |
copynumber = ?, |
2166 |
copynumber = ?, |
2167 |
stocknumber = ? |
2167 |
stocknumber = ? |
2168 |
"; |
2168 |
"; |
2169 |
my $sth = $dbh->prepare($query); |
2169 |
my $sth = $dbh->prepare($query); |
2170 |
my $today = C4::Dates->today('iso'); |
2170 |
my $today = output_pref({ dt => DateTime->now(), dateformat => 'iso', dateonly => 1 }); |
2171 |
$sth->execute( |
2171 |
$sth->execute( |
2172 |
$item->{'biblionumber'}, |
2172 |
$item->{'biblionumber'}, |
2173 |
$item->{'biblioitemnumber'}, |
2173 |
$item->{'biblioitemnumber'}, |
2174 |
- |
|
|