Topic: Print customer statements error

I'm facing an error whle printing customer statement, with the following settings:
No customer filter, No currency filter, Show Also Allocated: No

below is the error mesage:

DATABASE ERROR : No transactions were returned
error code : 1305
error message : FUNCTION a2245610fa.ABS does not exist
sql that failed was : SELECT 0_debtor_trans.*, (0_debtor_trans.ov_amount + 0_debtor_trans.ov_gst + 0_debtor_trans.ov_freight + 0_debtor_trans.ov_freight_tax + 0_debtor_trans.ov_discount) AS TotalAmount, 0_debtor_trans.alloc AS Allocated, ((0_debtor_trans.type = 10) AND 0_debtor_trans.due_date < '2013-05-27') AS OverDue FROM 0_debtor_trans WHERE 0_debtor_trans.tran_date <= '2013-05-27' AND 0_debtor_trans.debtor_no = '2' AND 0_debtor_trans.type <> 13 AND ABS(0_debtor_trans.ov_amount + 0_debtor_trans.ov_gst + 0_debtor_trans.ov_freight + 0_debtor_trans.ov_freight_tax + 0_debtor_trans.ov_discount) > 1e-6 AND ABS (ABS(0_debtor_trans.ov_amount + 0_debtor_trans.ov_gst + 0_debtor_trans.ov_freight + 0_debtor_trans.ov_freight_tax + 0_debtor_trans.ov_discount) - alloc) > 1e-6 ORDER BY 0_debtor_trans.tran_date

But when i use the following settings:
No customer filter, No currency filter, Show Also Allocated: Yes

There is no error encountered.

Additional information:
FA version: 2.3.16
Hosted at Godaddy

Re: Print customer statements error

I cannot reproduce this. Please indicate which php and mysql version you use.

/Joe

Re: Print customer statements error

PHP Version 5.3 and MySQL version:5.0

Re: Print customer statements error

This is MySQL 5.0 issue, which will be fixed in next minor release. In mean time you can just remove the space between 'ABS' nad '(' in file reporting/rep108.php line 47mnad the report should work.

Thanks for pointing this out.
Janusz