|
Lines 378-383
sub receipt_items {
Link Here
|
| 378 |
} |
378 |
} |
| 379 |
push @{ $branch_map{$b} }, $item; |
379 |
push @{ $branch_map{$b} }, $item; |
| 380 |
} |
380 |
} |
|
|
381 |
|
| 382 |
# Handling for 'AcqItemSetSubfieldsWhenReceived' |
| 383 |
my @affects; |
| 384 |
my $biblionumber; |
| 385 |
my $itemfield; |
| 386 |
if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { |
| 387 |
@affects = split q{\|}, |
| 388 |
C4::Context->preference("AcqItemSetSubfieldsWhenReceived"); |
| 389 |
if (@affects) { |
| 390 |
$biblionumber = $schema->resultset('Aqorder')->find($ordernumber) |
| 391 |
->biblionumber->biblionumber; |
| 392 |
my $frameworkcode = GetFrameworkCode($biblionumber); |
| 393 |
($itemfield) = GetMarcFromKohaField( 'items.itemnumber', |
| 394 |
$frameworkcode ); |
| 395 |
} |
| 396 |
} |
| 397 |
|
| 381 |
my $gir_occurrence = 0; |
398 |
my $gir_occurrence = 0; |
| 382 |
while ( $gir_occurrence < $quantity ) { |
399 |
while ( $gir_occurrence < $quantity ) { |
| 383 |
my $branch = $inv_line->girfield( 'branch', $gir_occurrence ); |
400 |
my $branch = $inv_line->girfield( 'branch', $gir_occurrence ); |
|
Lines 400-405
sub receipt_items {
Link Here
|
| 400 |
} |
417 |
} |
| 401 |
} |
418 |
} |
| 402 |
|
419 |
|
|
|
420 |
# Handling for 'AcqItemSetSubfieldsWhenReceived' |
| 421 |
if (@affects) { |
| 422 |
my $item_marc = C4::Items::GetMarcItem( $biblionumber, $item->itemnumber ); |
| 423 |
for my $affect (@affects) { |
| 424 |
my ( $sf, $v ) = split q{=}, $affect, 2; |
| 425 |
foreach ( $item_marc->field($itemfield) ) { |
| 426 |
$_->update( $sf => $v ); |
| 427 |
} |
| 428 |
} |
| 429 |
C4::Items::ModItemFromMarc( $item_marc, $biblionumber, $item->itemnumber ); |
| 430 |
} |
| 431 |
|
| 403 |
$item->update; |
432 |
$item->update; |
| 404 |
} |
433 |
} |
| 405 |
else { |
434 |
else { |
| 406 |
- |
|
|