[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hotfix available: Vendor invoice integer errors with fractional quantities



Hi all;

A bug has been found in 1.2.x where vendor invoices mistakenly throw
errors with fractional quantities.  The error appears to be related
either to how PostgreSQL handles prepared queries or the DBD::Pg
driver and is not related to the datatypes of the underlying fields.

Description:

When entering a vendor invoice with a fractional quantity, you may get
an error like:

UPDATE invoice
SET trans_id = ?,
parts_id = ?,
description = ?,
qty = ? * -1,
sellprice = ?,
fxsellprice = ?,
discount = ?,
allocated = ?,
unit = ?,
deliverydate = ?,
project_id = ?,
serialnumber = ?,
notes = ?
WHERE id = ?

ERROR: invalid input syntax for integer: "19.04"

This is caused by the query parser handling the quantity input as an
integer even though the underlying column is numeric().

This fix will be generally released in 1.2.4.  However, if you are
affected by it, you can either update to the latest svn in
branches/1.2 or email me specifically for the patch.

Best Wishes,
Chris Travers