Bugzilla – Attachment 7529 Details for
Bug 7231
ordering from staged file not using price
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports
bug7231-Call-GetMarcPrice-in-acquineworderemptypl-.patch (text/plain), 2.68 KB, created by
Kyle M Hall
on 2012-02-09 15:00:05 UTC
(
hide
)
Description:
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-02-09 15:00:05 UTC
Size:
2.68 KB
patch
obsolete
>From 2770a236e94808099e4d99ac90da1bd0e2702204 Mon Sep 17 00:00:00 2001 >From: Srdjan Jankovic <srdjan@catalyst.net.nz> >Date: Fri, 27 Jan 2012 15:19:25 +1300 >Subject: [PATCH] bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > acqui/neworderempty.pl | 26 ++++---------------------- > 1 files changed, 4 insertions(+), 22 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 459dfe8..5ca0d64 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -80,7 +80,7 @@ use C4::Dates; > use C4::Bookseller qw/ GetBookSellerFromId /; > use C4::Acquisition; > use C4::Suggestions; # GetSuggestion >-use C4::Biblio; # GetBiblioData >+use C4::Biblio; # GetBiblioData GetMarcPrice > use C4::Output; > use C4::Input; > use C4::Koha; >@@ -121,6 +121,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+my $marcflavour = C4::Context->preference('marcflavour'); > my $basket = GetBasket($basketno); > my $contract = &GetContract($basket->{contractnumber}); > >@@ -154,26 +155,7 @@ if ( $ordernumber eq '' and defined $params->{'breedingid'}){ > $params->{'frameworkcode'} or $params->{'frameworkcode'} = ""; > ( $biblionumber, $bibitemnum ) = AddBiblio( $marcrecord, $params->{'frameworkcode'} ); > # get the price if there is one. >- # filter by storing only the 1st number >- # we suppose the currency is correct, as we have no possibilities to get it. >- if ($marcrecord->subfield("345","d")) { >- $listprice = $marcrecord->subfield("345","d"); >- if ($listprice =~ /^([\d\.,]*)/) { >- $listprice = $1; >- $listprice =~ s/,/\./; >- } else { >- $listprice = 0; >- } >- } >- elsif ($marcrecord->subfield("010","d")) { >- $listprice = $marcrecord->subfield("010","d"); >- if ($listprice =~ /^([\d\.,]*)/) { >- $listprice = $1; >- $listprice =~ s/,/\./; >- } else { >- $listprice = 0; >- } >- } >+ $listprice = GetMarcPrice($marcrecord, $marcflavour); > SetImportRecordStatus($params->{'breedingid'}, 'imported'); > } > >@@ -429,7 +411,7 @@ sub MARCfindbreeding { > } > } > # fix the unimarc 100 coded field (with unicode information) >- if (C4::Context->preference('marcflavour') eq 'UNIMARC' && $record->subfield(100,'a')) { >+ if ($marcflavour eq 'UNIMARC' && $record->subfield(100,'a')) { > my $f100a=$record->subfield(100,'a'); > my $f100 = $record->field(100); > my $f100temp = $f100->as_string; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7231
:
7341
|
7528
|
7529
|
7530
|
7531