[Koha-bugs] [Bug 22583] New: Clicking on 'spent' amounts on acqui-home.pl causes internal server error.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 26 21:27:43 CET 2019


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

            Bug ID: 22583
           Summary: Clicking on 'spent' amounts on acqui-home.pl causes
                    internal server error.
 Change sponsored?: ---
           Product: Koha
           Version: 18.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Acquisitions
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: barton at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org
  Target Milestone: ---

This is not a problem in master.

To replicate: 
1) Go to Home > Acquisitions
2) Click on an amount in the 'Spent' column. This will trigger an internal
server error with the following error in the logs:

DBD::mysql::st execute failed: You have an error in your SQL syntax; check the
manual that corresponds to your MariaDB server version for the right syntax to
use near 'FROM (aqorders, aqbasket)
LEFT JOIN biblio ON
    biblio.biblionumber=aqorders.b' at line 14 [for Statement "SELECT
    aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber,
    quantity-quantityreceived AS tleft,
    budgetdate, entrydate,
    aqbasket.booksellerid,
    itype,
    title,
    aqorders.invoiceid,
    aqinvoices.invoicenumber,
    quantityreceived,
    unitprice_tax_included,
    datereceived,
    aqbooksellers.name as vendorname,
    tax_rate_on_receiving,
FROM (aqorders, aqbasket)
LEFT JOIN biblio ON
    biblio.biblionumber=aqorders.biblionumber
LEFT JOIN aqorders_items ON
    aqorders.ordernumber = aqorders_items.ordernumber
LEFT JOIN items ON
    aqorders_items.itemnumber = items.itemnumber
LEFT JOIN aqinvoices ON
    aqorders.invoiceid = aqinvoices.invoiceid
LEFT JOIN aqbooksellers ON
    aqbasket.booksellerid = aqbooksellers.id
WHERE
    aqorders.basketno=aqbasket.basketno AND
    budget_id=? AND
    (datecancellationprinted IS NULL OR
        datecancellationprinted='0000-00-00') AND
    datereceived IS NOT NULL
    GROUP BY aqorders.ordernumber
" with ParamValues: 0="51"] at /usr/share/koha/intranet/cgi-bin/acqui/spent.pl
line 89.
An error occurred fetching records: You have an error in your SQL syntax; check
the manual that corresponds to your MariaDB server version for the right syntax
to use near 'FROM (aqorders, aqbasket)
LEFT JOIN biblio ON
    biblio.biblionumber=aqorders.b' at line 14 at
/usr/share/koha/intranet/cgi-bin/acqui/spent.pl line 91.

-- 
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