Koha-clms/acqui
Kyle M Hall d4f21ef40c Bug 7112 - Having two prices in 020$c causes basket creation to fail from staged marc import
The root problem here is that the price is being pulled from the MARC record
and is then run through Number::Format::unformat_number. This routine is
really being misused, and should only be used to reverse the effects of
Number::Format on a number string. We are apparently using it to strip
out currency characters and the like.

Number::Format::unformat_number will choke if there is more than one period (.)
in the price field. MARC standards do not limit this field to a single period,
so unless there is only one period, we should skip number unformatting.
Examples of that break unformat_number include '18.95 (U.S.)', and
'$5.99 ($7.75 CAN)', both of which are perfectly valid.

This commit adds the function MungeMarcPrice that will better handle
find a real price value in a given price field. It does a very good
job at finding a price in any currency format, and attempts to find
a price in whichever currency is active before falling back to
the first valid price it can find.

The variable $price may fail to have an actual price, in which case
the price then defaults to '0.00', which would be rarely if ever the
correct price. To combat this, I have added highlighting to any
price in the Order Details table that begins with 0 ( i.e. '0.00' ).

Also, fixed the incomplete table footer, adding a new td with a
span of 3 to fill in the nonexistant cells.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2012-05-25 09:31:49 +12:00
..
pdfformat Bug 7476 Remove executable bit from files that probably should not be executed 2012-02-03 14:22:15 +01:00
acqui-home.pl bug 6834 followup removing param_map 2011-09-03 06:39:24 +12:00
addorder.pl Bug 7289: Adds editionstatement field in neworderempty 2012-02-17 11:13:34 +01:00
addorderiso2709.pl Bug 7112 - Having two prices in 020$c causes basket creation to fail from staged marc import 2012-05-25 09:31:49 +12:00
basket.pl Bug 7291: Adds new field aqbooksellers.deliverytime 2012-04-03 18:19:46 +02:00
basketgroup.pl Bug 7767 - acqui/basketgroup.pl: our $template scoping for plack 2012-03-22 17:52:03 +01:00
basketheader.pl Bug 7113: Standardize vendor id name in templates and scripts 2012-02-17 19:04:00 +01:00
booksellers.pl Bug 7737: applies date filters on vendor pages 2012-03-22 17:18:03 +01:00
check_budget_total.pl Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
check_duplicate_barcode_ajax.pl Bug 6963: Corrects a problem when a new order is created with a duplicate barcode. 2011-11-04 10:22:28 +01:00
check_uniqueness.pl Bug 7178: Follow-up Improve order item creation 2012-05-15 09:10:13 +12:00
currency.pl Fix FSF address in directory acqui/ 2010-03-16 20:17:51 -04:00
fetch_sort_dropbox.pl bug 7343 - Fix empty values in statistic 1 and 2 dropboxes in neworderempty 2012-01-23 18:15:09 +01:00
finishreceive.pl Bug 6296: allow users to be authenticated by SSL client certs 2012-03-19 17:02:44 +01:00
histsearch.pl Bug 7301: 'From' field is 1 year ago by default 2012-03-19 18:28:17 +01:00
lateorders.pl Bug 5347: Followup: FIX 2 bugs in lateorders 2012-04-18 17:05:23 +02:00
modordernotes.pl Bug 7166: Adds edit order notes when the basket is closed 2012-03-20 16:45:37 +01:00
neworderbiblio.pl Bug 6994: Wrong 'no budget defined' alert 2011-11-06 11:43:30 +01:00
neworderempty.pl Bug 7178: Follwup - Remove warning on uninitialized value in sprintf for neworderempty 2012-05-15 09:10:34 +12:00
newordersuggestion.pl Bug 7113: Standardize vendor id name in templates and scripts 2012-02-17 19:04:00 +01:00
ordered.pl Bug 7735: removal of C4::Dates when unused 2012-03-20 18:11:04 +01:00
orderreceive.pl Bug 7178: Acquisition item creation improvement 2012-03-26 11:07:23 +02:00
parcel.pl Bug 7113: Standardize vendor id name in templates and scripts 2012-02-17 19:04:00 +01:00
parcels.pl Bug 7113: Standardize vendor id name in templates and scripts 2012-02-17 19:04:00 +01:00
spent.pl Bug 7735: removal of C4::Dates when unused 2012-03-20 18:11:04 +01:00
supplier.pl Bug 7291: Adds new field aqbooksellers.deliverytime 2012-04-03 18:19:46 +02:00
uncertainprice.pl Fix FSF address in directory acqui/ 2010-03-16 20:17:51 -04:00
updatesupplier.pl Bug 7291: Adds new field aqbooksellers.deliverytime 2012-04-03 18:19:46 +02:00
z3950_search.pl Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping 2012-03-22 17:48:42 +01:00