[Koha-bugs] [Bug 11755] New: Argument 'booksellerid' not properly handled in orderreceive.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 13 13:40:11 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11755

            Bug ID: 11755
           Summary: Argument 'booksellerid' not properly handled in
                    orderreceive.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P5 - low
         Component: Acquisitions
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: abl at biblos.pk.edu.pl
        QA Contact: testopia at bugs.koha-community.org

In orderreceive.pl, argument 'booksellerid' passed to the template is always
empty (= because we don't have booksellerid field in order records);
subsequently, finishreceive.pl script is also not getting this parameter (and
it relies on it to do some possibly important work). This has the following
consequences:

1) link to vendor in the breadcrumbs on the receiving page is not working
2) this code block (introduced by Bug 5335 - More granular VAT)

 if ( $bookseller->{listincgst} ) {
        if ( not $bookseller->{invoiceincgst} ) {
            $order->{rrp} = $order->{rrp} * ( 1 + $order->{gstrate} );
            $order->{ecost} = $order->{ecost} * ( 1 + $order->{gstrate} );
            $order->{unitprice} = $order->{unitprice} * ( 1 + $order->{gstrate}
);
        }
    } else {
        if ( $bookseller->{invoiceincgst} ) {
            $order->{rrp} = $order->{rrp} / ( 1 + $order->{gstrate} );
            $order->{ecost} = $order->{ecost} / ( 1 + $order->{gstrate} );
            $order->{unitprice} = $order->{unitprice} / ( 1 + $order->{gstrate}
);
        }
    }
 }

in finishreceive.pl never runs

3) in the received item records, booksellerid (952 $e) field is not updated
with the correct value by ModItem(), it always becomes '' after receiving.

Regarding 2), I'm not quite sure it is neceserilly the bad thing ;). But it
(partially) explains to me why tax calculations in Koha are occasionally
working seemingly weird (at least for some less usual invoiceincgst &
listincgst settings in vendor record).

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


More information about the Koha-bugs mailing list