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

(-)a/acqui/neworderempty.pl (-23 / +4 lines)
Lines 80-86 use C4::Dates; Link Here
80
use C4::Bookseller  qw/ GetBookSellerFromId /;
80
use C4::Bookseller  qw/ GetBookSellerFromId /;
81
use C4::Acquisition;
81
use C4::Acquisition;
82
use C4::Suggestions;	# GetSuggestion
82
use C4::Suggestions;	# GetSuggestion
83
use C4::Biblio;			# GetBiblioData
83
use C4::Biblio;			# GetBiblioData GetMarcPrice
84
use C4::Output;
84
use C4::Output;
85
use C4::Input;
85
use C4::Input;
86
use C4::Koha;
86
use C4::Koha;
Lines 121-126 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
121
    }
121
    }
122
);
122
);
123
123
124
my $marcflavour = C4::Context->preference('marcflavour');
124
my $basket = GetBasket($basketno);
125
my $basket = GetBasket($basketno);
125
my $contract = &GetContract($basket->{contractnumber});
126
my $contract = &GetContract($basket->{contractnumber});
126
127
Lines 154-179 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
154
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
155
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
155
        ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
156
        ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} );
156
        # get the price if there is one.
157
        # get the price if there is one.
157
        # filter by storing only the 1st number
158
        $listprice = GetMarcPrice($marcrecord, $marcflavour);
158
        # we suppose the currency is correct, as we have no possibilities to get it.
159
        if ($marcrecord->subfield("345","d")) {
160
            $listprice = $marcrecord->subfield("345","d");
161
            if ($listprice =~ /^([\d\.,]*)/) {
162
                $listprice = $1;
163
                $listprice =~ s/,/\./;
164
            } else {
165
                $listprice = 0;
166
            }
167
        }
168
        elsif ($marcrecord->subfield("010","d")) {
169
            $listprice = $marcrecord->subfield("010","d");
170
            if ($listprice =~ /^([\d\.,]*)/) {
171
                $listprice = $1;
172
                $listprice =~ s/,/\./;
173
            } else {
174
                $listprice = 0;
175
            }
176
        }
177
        SetImportRecordStatus($params->{'breedingid'}, 'imported');
159
        SetImportRecordStatus($params->{'breedingid'}, 'imported');
178
}
160
}
179
161
Lines 429-435 sub MARCfindbreeding { Link Here
429
            }
411
            }
430
        }
412
        }
431
        # fix the unimarc 100 coded field (with unicode information)
413
        # fix the unimarc 100 coded field (with unicode information)
432
        if (C4::Context->preference('marcflavour') eq 'UNIMARC' && $record->subfield(100,'a')) {
414
        if ($marcflavour eq 'UNIMARC' && $record->subfield(100,'a')) {
433
            my $f100a=$record->subfield(100,'a');
415
            my $f100a=$record->subfield(100,'a');
434
            my $f100 = $record->field(100);
416
            my $f100 = $record->field(100);
435
            my $f100temp = $f100->as_string;
417
            my $f100temp = $f100->as_string;
436
- 

Return to bug 7231