Issue 4: Value '' is not a legal number
Reported by RionJo...@gmail.com, Jun 8, 2009
https://admin.drjays.com/esrp-admin/app?cmd=edit&invoice_id=22516&class=Invoice

20090604124858    DEBUG2    DBR::Query::prepare    SELECT invoice_id,
company_id, vendor_id, vendor_invno, specified_po_num, status,
date_created, date_issued, date_due, terms_id, gross_amount, adjust_pct,
adjust_amt, net_amount, payee_id, cust_id FROM invoice WHERE invoice_id = 22516
20090604124858    DEBUG2    DBR::Query::ResultSet::DB::_execute    ROWS: 1
20090604124858    ERROR    DBR::Query::Part::Value::new    value '' is not
a legal number
20090604124858    ERROR    DBR::Interface::DBRv1::_value    failed to
create value object
20090604124858    ERROR    DBR::Interface::DBRv1::_processfield    _value
failed
20090604124858    ERROR    DBR::Interface::DBRv1::_where    failed to
process field object
20090604124858    ERROR    DBR::Interface::DBRv1::select    failed to prep
where
20090604124858    ERROR    ESRPAdmin::Invoice::_build_invoice    failed to
select vendors
20090604124858    ERROR    ESRPAdmin::Invoice::edit    failed to build invoice
20090604124858    ERROR    APOLLO::_Controller_execute    Command edit
failed or returned a false return value ()
20090604124858    DEBUG    APOLLO::_Controller_publish    Started...
20090604124858    DEBUG    APOLLO::_Controller_publish    Writing the XML
on template /esrp-admin/templates//error.html
20090604124858    DEBUG    APOLLO::_Controller_publish    Done with writeXML
20090604124858    DEBUG    APOLLO::_Controller_Cleanup    Started
20090604124858    DEBUG    APOLLO::DESTROY    DESTROY




Jun 8, 2009
#1 daniel.d...@gmail.com
Hey Ryan,

This would appear to be a bug in the underlying application. It's caused by a missing
vendor_id being handled poorly. I suggest you open a ticket in the DJ ticket system
so Ollie can address it.

That said, I've tested both versions, and I've found that the behavior is consistent
between DBR and ApolloUtils::DBR

for the query:

$dbrh->select(

			'-table' => 'vendors',
			'-where' => {
				     'vendor_id' => [
						     'd',
						     undef # Invalid part right here
						    ]
				    },
			'-fields' => 'vendor_id name',
			'-single' => 1

		       );

ApolloUtils::DBR yields:

20090608115710	ERROR	ApolloUtils::DBR::DBRH::quote	value  is not a legal number
20090608115710	ERROR	ApolloUtils::DBR::DBRH::buildWhere	Quoting error with field
vendor_id
20090608115710	ERROR	ApolloUtils::DBR::DBRH::_buildselect	Failed to build where clause
20090608115710	ERROR	ApolloUtils::DBR::DBRH::select	failed to build select sql

and DBR similarly yields:

20090608115515	ERROR	DBR::Query::Part::Value::new	value '' is not a legal number
20090608115515	ERROR	DBR::Interface::DBRv1::_value	failed to create value object
20090608115515	ERROR	DBR::Interface::DBRv1::_processfield	_value failed
20090608115515	ERROR	DBR::Interface::DBRv1::_where	failed to process field object
20090608115515	ERROR	DBR::Interface::DBRv1::select	failed to prep where



Thanks for all the hard work ^_^
Daniel-
Status: Invalid
Cc: ore...@drjays.com sdmoses mich...@lagrasta.com