[Koha-bugs] [Bug 35892] New: Fallback to GetMarcPrice in addorderiso2907 no longer works

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 24 14:36:15 CET 2024


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

            Bug ID: 35892
           Summary: Fallback to GetMarcPrice in addorderiso2907 no longer
                    works
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Acquisitions
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: nick at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

Bug 34169 broke a fall back to the GetMarcPrice routine when ordering from a
file. Previously if there was no order, the field was blank and evaluated as
'false' and we used the price from the MARC record. Now the field is '0.00' if
no price is mapped in MarcFieldsToOrder.

  perl -e 'warn "True" if "0.00"';

IN addorderiso2907.pl:
  my $c_price             = $input->param( 'price_' .
$import_record->import_record_id )
      || GetMarcPrice( $marcrecord, C4::Context->preference('marcflavour') );

We could simply add 0 to tthe value to make it a number:
  perl -e 'warn "True" if "0.00"+ 0';

However, this would mean leaving the field at 0.00 when you didn't pay for
something would change it to the GetMarcPrice.

I think the solution may be to populate the field using the GetMarcPrice on the
initial load.

You can workaround this by adding the fallback to the MarcFieldsToOrder system
preference:
price: 947$c|020$c

Which may be a viable solution for updating/editing the default
values/documentatoin for that preference

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


More information about the Koha-bugs mailing list