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
122
Lines 157-168 my $contract = GetContract({ Link Here
157
    contractnumber => $basket->{contractnumber}
159
    contractnumber => $basket->{contractnumber}
158
});
160
});
159
161
160
#simple parameters reading (all in one :-)
161
our $params = $input->Vars;
162
my $listprice=0; # the price, that can be in MARC record if we have one
162
my $listprice=0; # the price, that can be in MARC record if we have one
163
if ( $ordernumber eq '' and defined $params->{'breedingid'}){
163
if ( $ordernumber eq '' and defined $breedingid ){
164
#we want to import from the breeding reservoir (from a z3950 search)
164
#we want to import from the breeding reservoir (from a z3950 search)
165
    my ($marcrecord, $encoding) = MARCfindbreeding($params->{'breedingid'});
165
    my ($marcrecord, $encoding) = MARCfindbreeding($breedingid);
166
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
166
    die("Could not find the selected record in the reservoir, bailing") unless $marcrecord;
167
167
168
    # Remove all the items (952) from the imported record
168
    # Remove all the items (952) from the imported record
Lines 182-194 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
182
    #from this point: add a new record
182
    #from this point: add a new record
183
    C4::Acquisition::FillWithDefaultValues($marcrecord, {only_mandatory => 1});
183
    C4::Acquisition::FillWithDefaultValues($marcrecord, {only_mandatory => 1});
184
    my $bibitemnum;
184
    my $bibitemnum;
185
    $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
185
    ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $frameworkcode );
186
    ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
187
    # get the price if there is one.
186
    # get the price if there is one.
188
    $listprice = GetMarcPrice($marcrecord, $marcflavour);
187
    $listprice = GetMarcPrice($marcrecord, $marcflavour);
189
    SetImportRecordStatus($params->{'breedingid'}, 'imported');
188
    SetImportRecordStatus( $breedingid, 'imported' );
190
189
191
    SetMatchedBiblionumber( $params->{breedingid}, $biblionumber );
190
    SetMatchedBiblionumber( $breedingid, $biblionumber );
192
}
191
}
193
192
194
193
Lines 624-630 sub Load_Duplicate { Link Here
624
    biblionumber        => $biblionumber,
623
    biblionumber        => $biblionumber,
625
    basketno            => $basketno,
624
    basketno            => $basketno,
626
    booksellerid        => $basket->{'booksellerid'},
625
    booksellerid        => $basket->{'booksellerid'},
627
    breedingid          => $params->{'breedingid'},
626
    breedingid          => $breedingid,
628
    duplicatetitle      => $duplicatetitle,
627
    duplicatetitle      => $duplicatetitle,
629
    (uc(C4::Context->preference("marcflavour"))) => 1
628
    (uc(C4::Context->preference("marcflavour"))) => 1
630
  );
629
  );
631
- 

Return to bug 35927