Bugzilla – Attachment 182313 Details for
Bug 39620
Price not populating from 020$c when creating a basket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39620: Fallback to GetMarcPrice if nessesary
Bug-39620-Fallback-to-GetMarcPrice-if-nessesary.patch (text/plain), 1.64 KB, created by
David Nind
on 2025-05-12 21:14:00 UTC
(
hide
)
Description:
Bug 39620: Fallback to GetMarcPrice if nessesary
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-05-12 21:14:00 UTC
Size:
1.64 KB
patch
obsolete
>From f25312e0a4db8e7256e1a0cf9e2392d72b393121 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 12 May 2025 15:00:03 +0000 >Subject: [PATCH] Bug 39620: Fallback to GetMarcPrice if nessesary > >To test: >1. Have a MRC file with price populated in the 020$c >2. Have nothing the MarcFieldsToOrder or MarcItemFieldsToOrder sys prefs >3. Create a new basket and import from a new file >4. The price is not imported. >5. APPLY PATCH and restart_all >6. Try again, this time the price should be populated correctly. > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/MarcOrder.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index e58cc5634a..13053c588d 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -49,6 +49,7 @@ use C4::Biblio qw( > GetMarcFromKohaField > TransformHtmlToXml > GetMarcQuantity >+ GetMarcPrice > ); > use C4::Items qw( AddItemFromMarc ); > use C4::Budgets qw( GetBudgetByCode ); >@@ -722,8 +723,8 @@ sub import_biblios_list { > my $marcrecord = $import_record->get_marc_record || die "couldn't translate MARC information"; > > my $infos = _get_syspref_mappings( $marcrecord, 'MarcFieldsToOrder' ); >- >- my $price = $infos->{price} || undef; >+ my $price = >+ $infos->{price} ? $infos->{price} : GetMarcPrice( $marcrecord, C4::Context->preference('marcflavour') ); > my $replacementprice = $infos->{replacementprice} || undef; > my $quantity = $infos->{quantity} || undef; > my $budget_code = $infos->{budget_code} || undef; >-- >2.39.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 39620
:
182298
|
182313
|
182333