Bug 7231 - ordering from staged file not using price
Summary: ordering from staged file not using price
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low major (vote)
Assignee: Srdjan Jankovic
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 22:21 UTC by Nicole C. Engard
Modified: 2013-12-05 19:59 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
patch (2.63 KB, patch)
2012-01-27 02:23 UTC, Srdjan Jankovic
Details | Diff | Splinter Review
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports (2.63 KB, patch)
2012-02-09 14:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports (2.68 KB, patch)
2012-02-09 15:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports (2.70 KB, patch)
2012-02-09 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports (2.70 KB, patch)
2012-02-09 15:05 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2011-11-15 22:21:34 UTC
when you're ordering from a staged file if you import all the price comes over, if you do it one by one you don't get the price.  the price should fill in in both instances.
Comment 1 Srdjan Jankovic 2012-01-24 04:42:35 UTC
Can you please provide more details, maybe a screenshot if it is not a problem. I tried ordering a single record from a file, which took me to the new empty order with the price fields. On the other hand, I could not see price on the "Import All" screen.
Comment 2 Nicole C. Engard 2012-01-24 05:04:53 UTC
Srdjan,

When you ordered from the single record, there were price fields but they were not populated - or were they?  When you order from a full file there is no price field, but when you finish the import you see the price on each line item.

Video: http://screencast.com/t/JU7RrfmoVf
Comment 3 Srdjan Jankovic 2012-01-27 02:23:04 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-02-07 13:21:59 UTC
If price in 020$c has a currency symbol ( e.g. $12.00 ), this price will not be pulled over. If it is just a bare number ( e.g. 12.00 ), it works just fine. Is this expected behavior?

As an aside, why does GetMarcPrice look for the price in 345$c? Field 345 is "Projection Characteristics of Moving Image", and doesn't even have a subfield c, let alone a price in it.
Comment 5 Kyle M Hall 2012-02-07 14:05:55 UTC
I'm going to revise my previous comment and state that this is good functionality. The price is only pulled if we are sure it is really a price. 020$c can contain many different things, not just prices. From the LOC 022 Page:

020	##$a0802142176 (pbk.) :$c$1.95
020	##$c$8.95
020	##$cRs15.76 ($5.60 U.S.)
020	##$cRental material
020	##$cFor sale ($450.00) or rent ($45.00)
020	##$cFor sale ($200.00 for 3/4 in.; $150.00 for 1/2 in.)
020	##$c$4.95 (lib. bdg.)
020	##$c$3.60 (pbk.)
[Two prices for two items on one catalog record; no ISBNs are known.]

I think ignoring 020$c if it doesn't contain just a numeral is safe, but stripping out currency characters, or using them to decide the currency would be better. Perhaps that should be a separate bug report.
Comment 6 Kyle M Hall 2012-02-07 14:11:05 UTC
I need to switch my opinion *again*. I stand by my previous statement, but the "Import All" option works with or without a dollar sign in 020$c. Since both should be functionally equivalent, the single record import needs to be able to handle this as well.
Comment 7 Srdjan Jankovic 2012-02-08 23:43:00 UTC
Can you please check if the behaviour was different before the patch? If it was, I will correct it. Otherwise, we should file a separate bug to make it work correctly.
Comment 8 Kyle M Hall 2012-02-09 14:56:28 UTC
(In reply to comment #7)

I believe this behavior should not be considered different than before, and I have created and attached a separate bug report, Bug 7516 - Create Subroutine For GetMarcPrice that will discern the actual price from a given price field value. for this issue.

> Can you please check if the behaviour was different before the patch? If it
> was, I will correct it. Otherwise, we should file a separate bug to make it
> work correctly.
Comment 9 Kyle M Hall 2012-02-09 14:58:31 UTC Comment hidden (obsolete)
Comment 10 Kyle M Hall 2012-02-09 15:00:05 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall 2012-02-09 15:05:00 UTC Comment hidden (obsolete)
Comment 12 Kyle M Hall 2012-02-09 15:05:38 UTC
Created attachment 7531 [details] [review]
[SIGNED-OFF] bug_7231: Call GetMarcPrice() in acqui/neworderempty.pl for staged imports
Comment 13 Paul Poulain 2012-02-20 21:25:19 UTC
QA comment:
small patch, use a sub instead of a copy/paste of some code
Comment 14 Paul Poulain 2012-02-20 21:29:44 UTC
(In reply to comment #4)
> As an aside, why does GetMarcPrice look for the price in 345$c? Field 345 is
> "Projection Characteristics of Moving Image", and doesn't even have a subfield
> c, let alone a price in it.

The 345 is an alternate place for the price in UNIMARC. I don't know for MARC21
Comment 15 Jared Camins-Esakov 2012-05-23 23:21:40 UTC
This patch will be included in the forthcoming 3.6.5 release (no string changes).