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 647-654
C<$itemnum> is the item number
Link Here
|
647 |
sub ModDateLastSeen { |
647 |
sub ModDateLastSeen { |
648 |
my ($itemnumber) = @_; |
648 |
my ($itemnumber) = @_; |
649 |
|
649 |
|
650 |
my $today = C4::Dates->new(); |
650 |
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
651 |
ModItem({ itemlost => 0, datelastseen => $today->output("iso") }, undef, $itemnumber); |
651 |
ModItem({ itemlost => 0, datelastseen => $today }, undef, $itemnumber); |
652 |
} |
652 |
} |
653 |
|
653 |
|
654 |
=head2 DelItem |
654 |
=head2 DelItem |
Lines 2102-2108
C<items.withdrawn>
Link Here
|
2102 |
|
2102 |
|
2103 |
sub _set_defaults_for_add { |
2103 |
sub _set_defaults_for_add { |
2104 |
my $item = shift; |
2104 |
my $item = shift; |
2105 |
$item->{dateaccessioned} ||= C4::Dates->new->output('iso'); |
2105 |
$item->{dateaccessioned} || output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
2106 |
$item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); |
2106 |
$item->{$_} ||= 0 for (qw( notforloan damaged itemlost withdrawn)); |
2107 |
} |
2107 |
} |
2108 |
|
2108 |
|
Lines 2135-2141
sub _koha_new_item {
Link Here
|
2135 |
notforloan = ?, |
2135 |
notforloan = ?, |
2136 |
damaged = ?, |
2136 |
damaged = ?, |
2137 |
itemlost = ?, |
2137 |
itemlost = ?, |
2138 |
withdrawn = ?, |
2138 |
withdrawn = ?, |
2139 |
itemcallnumber = ?, |
2139 |
itemcallnumber = ?, |
2140 |
coded_location_qualifier = ?, |
2140 |
coded_location_qualifier = ?, |
2141 |
restricted = ?, |
2141 |
restricted = ?, |
Lines 2143-2149
sub _koha_new_item {
Link Here
|
2143 |
holdingbranch = ?, |
2143 |
holdingbranch = ?, |
2144 |
paidfor = ?, |
2144 |
paidfor = ?, |
2145 |
location = ?, |
2145 |
location = ?, |
2146 |
permanent_location = ?, |
2146 |
permanent_location = ?, |
2147 |
onloan = ?, |
2147 |
onloan = ?, |
2148 |
issues = ?, |
2148 |
issues = ?, |
2149 |
renewals = ?, |
2149 |
renewals = ?, |
Lines 2153-2166
sub _koha_new_item {
Link Here
|
2153 |
ccode = ?, |
2153 |
ccode = ?, |
2154 |
itype = ?, |
2154 |
itype = ?, |
2155 |
materials = ?, |
2155 |
materials = ?, |
2156 |
uri = ?, |
2156 |
uri = ?, |
2157 |
enumchron = ?, |
2157 |
enumchron = ?, |
2158 |
more_subfields_xml = ?, |
2158 |
more_subfields_xml = ?, |
2159 |
copynumber = ?, |
2159 |
copynumber = ?, |
2160 |
stocknumber = ? |
2160 |
stocknumber = ? |
2161 |
"; |
2161 |
"; |
2162 |
my $sth = $dbh->prepare($query); |
2162 |
my $sth = $dbh->prepare($query); |
2163 |
my $today = C4::Dates->today('iso'); |
2163 |
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }); |
2164 |
$sth->execute( |
2164 |
$sth->execute( |
2165 |
$item->{'biblionumber'}, |
2165 |
$item->{'biblionumber'}, |
2166 |
$item->{'biblioitemnumber'}, |
2166 |
$item->{'biblioitemnumber'}, |
2167 |
- |
|
|