Lines 113-118
use Koha::Plugins;
Link Here
|
113 |
use Koha::RecordProcessor; |
113 |
use Koha::RecordProcessor; |
114 |
use Koha::SearchEngine; |
114 |
use Koha::SearchEngine; |
115 |
use Koha::SearchEngine::Indexer; |
115 |
use Koha::SearchEngine::Indexer; |
|
|
116 |
use Koha::SimpleMARC; |
116 |
use Koha::Libraries; |
117 |
use Koha::Libraries; |
117 |
use Koha::Util::MARC; |
118 |
use Koha::Util::MARC; |
118 |
|
119 |
|
Lines 430-439
sub ModBiblio {
Link Here
|
430 |
# load the koha-table data object |
431 |
# load the koha-table data object |
431 |
my $oldbiblio = TransformMarcToKoha({ record => $record }); |
432 |
my $oldbiblio = TransformMarcToKoha({ record => $record }); |
432 |
|
433 |
|
433 |
# update MARC subfield that stores biblioitems.cn_sort |
434 |
# update the MARC record (that now contains biblio and items) with the new record data |
434 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
435 |
_koha_marc_update_biblioitem_cn_sort( $record, $oldbiblio, $frameworkcode ); |
435 |
|
436 |
|
436 |
# update the MARC record (that now contains biblio and items) with the new record data |
437 |
# Insert or update the MARC record (that now contains biblio and items) with the new record data |
437 |
ModBiblioMarc( $record, $biblionumber, { skip_record_index => $skip_record_index } ); |
438 |
ModBiblioMarc( $record, $biblionumber, { skip_record_index => $skip_record_index } ); |
438 |
|
439 |
|
439 |
# modify the other koha tables |
440 |
# modify the other koha tables |
Lines 2831-2842
sub ModBiblioMarc {
Link Here
|
2831 |
} |
2832 |
} |
2832 |
} |
2833 |
} |
2833 |
|
2834 |
|
2834 |
#enhancement 5374: update transaction date (005) for marc21/unimarc |
2835 |
# Insert/update transaction time (005) for marc21/unimarc |
2835 |
if($encoding =~ /MARC21|UNIMARC/) { |
2836 |
if($encoding =~ /MARC21|UNIMARC/) { |
2836 |
my @a= (localtime) [5,4,3,2,1,0]; $a[0]+=1900; $a[1]++; |
2837 |
Koha::SimpleMARC::update_last_transaction_time( { record => $record } ); |
2837 |
# YY MM DD HH MM SS (update year and month) |
|
|
2838 |
my $f005= $record->field('005'); |
2839 |
$f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f",@a)) if $f005; |
2840 |
} |
2838 |
} |
2841 |
|
2839 |
|
2842 |
if ( C4::Context->preference('StripWhitespaceChars') ) { |
2840 |
if ( C4::Context->preference('StripWhitespaceChars') ) { |