[Koha-bugs] [Bug 14999] Adding to basket orders from staged files mixes up the prices and quantities between different orders

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Oct 4 12:27:15 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14999

Emmi Takkinen <emmi.takkinen at koha-suomi.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #125648|0                           |1
        is obsolete|                            |

--- Comment #12 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 125689
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125689&action=edit
Bug 14999: Make sure order prices are not mixed-up

We were shifting the price and replacement price for imported orders
only after the line:

> $duplinbatch = $import_batch_id and next if $duplifound;

This lead to the "replacementprice" and "price" query parameters not
being shifted/removed from the list if a duplicate record came across
and caused the prices be applied to the next record being imported.

To reproduce:
 1) Download two records from koha to marcxml file, then cat those:
   cat bib1.marcxml bib2.marcxml > bibs.marcxml
 2) Delete bib2 from koha
 3) Stage bibs.marcxml for import
 4) Create a new order basket, then "Add to basket" using "From a
    staged file" option
 5) Select both bib1 and bib2 and set price & replacement price for
    bib1 to be 99.00 and for bib2 to be 88.00
 6) Click save and notice bib2 was imported with the wrong prices, 99.00!
 7) Apply patch and notice the prices are now correctly set to 88.00.

Signed-off-by: Emmi Takkinen <emmi.takkinen at koha-suomi.fi>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list