View | Details | Raw Unified | Return to bug 35927
Collapse All | Expand All

(-)a/acqui/neworderempty.pl (-10 / +8 lines)
Lines 115-120 my $suggestionid = $input->param('suggestionid'); Link Here
115
my $uncertainprice  = $input->param('uncertainprice');
115
my $uncertainprice  = $input->param('uncertainprice');
116
my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order !
116
my $import_batch_id = $input->param('import_batch_id'); # if this is filled, we come from a staged file, and we will return here after saving the order !
117
my $from_subscriptionid  = $input->param('from_subscriptionid');
117
my $from_subscriptionid  = $input->param('from_subscriptionid');
118
my $frameworkcode        = $input->param('frameworkcode') // q{};
119
our $breedingid          = $input->param('breedingid');
118
my $data;
120
my $data;
119
my $new = 'no';
121
my $new = 'no';
120
my $op = $input->param('op') || q{};
122
my $op = $input->param('op') || q{};
Lines 158-169 my $contract = GetContract({ Link Here
158
    contractnumber => $basket->{contractnumber}
160
    contractnumber => $basket->{contractnumber}
159
});
161
});
160
162
161
#simple parameters reading (all in one :-)
162
our $params = $input->Vars;
163
my $listprice=0; # the price, that can be in MARC record if we have one
163
my $listprice=0; # the price, that can be in MARC record if we have one
164
if ( $ordernumber eq '' and defined $params->{'breedingid'}){
164
if ( $ordernumber eq '' and defined $breedingid ){
165
#we want to import from the breeding reservoir (from a z3950 search)
165
#we want to import from the breeding reservoir (from a z3950 search)
166
    my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'});
166
    my ($marcrecord, $encoding) = MARCfindbreeding($breedingid);
167
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
167
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
168
168
169
    # Remove all the items (952) from the imported record
169
    # Remove all the items (952) from the imported record
Lines 183-195 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
183
    #from this point: add a new record
183
    #from this point: add a new record
184
    C4::Acquisition::FillWithDefaultValues($marcrecord, {only_mandatory => 1});
184
    C4::Acquisition::FillWithDefaultValues($marcrecord, {only_mandatory => 1});
185
    my $bibitemnum;
185
    my $bibitemnum;
186
    $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
186
    ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $frameworkcode );
187
    ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
188
    # get the price if there is one.
187
    # get the price if there is one.
189
    $listprice = GetMarcPrice($marcrecord, $marcflavour);
188
    $listprice = GetMarcPrice($marcrecord, $marcflavour);
190
    SetImportRecordStatus($params->{'breedingid'}, 'imported');
189
    SetImportRecordStatus( $breedingid, 'imported' );
191
190
192
    SetMatchedBiblionumber( $params->{breedingid}, $biblionumber );
191
    SetMatchedBiblionumber( $breedingid, $biblionumber );
193
}
192
}
194
193
195
194
Lines 625-631 sub Load_Duplicate { Link Here
625
    biblionumber        => $biblionumber,
624
    biblionumber        => $biblionumber,
626
    basketno            => $basketno,
625
    basketno            => $basketno,
627
    booksellerid        => $basket->{'booksellerid'},
626
    booksellerid        => $basket->{'booksellerid'},
628
    breedingid          => $params->{'breedingid'},
627
    breedingid          => $breedingid,
629
    duplicatetitle      => $duplicatetitle,
628
    duplicatetitle      => $duplicatetitle,
630
    (uc(C4::Context->preference("marcflavour"))) => 1
629
    (uc(C4::Context->preference("marcflavour"))) => 1
631
  );
630
  );
632
- 

Return to bug 35927