Topic: Sales Quotation/Order/Invoice leading to blank page
Hi,
Have done a new install recently and tried to create a sales transaction. When click on sales invoice, quotation etc leads to a blank white page.
I have deactivated all extensions I had installed and also reverted back to the default theme, but still getting the same errors.
Am using FrontAccounting 2.3.24.
Any ideas how to investigate this / fix it?
any help much appreciated.
Update:
Looking through the error log file, I am getting this error only when click on any of the: Sales Quotation, Direct INvoice etc.
23-Nov-2015 21:09:16] <b>DATABASE ERROR :</b> The customer details could not be retrieved<br>error code : 1064<br>error message : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1)
* (trans' at line 8<br>sql that failed was : SELECT 0_debtors_master.name, 0_debtors_master.curr_code, 0_payment_terms.terms,
0_debtors_master.credit_limit, 0_credit_status.dissallow_invoices, 0_credit_status.reason_description,
Sum(IFNULL(IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1)
* (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount),0),0)) AS Balance,
Sum(IF ((TO_DAYS('2015-11-23') - TO_DAYS(IF (trans.type=10, trans.due_date, trans.tran_date))) > 0,IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1)
* (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount),0),0)) AS Due,
Sum(IF ((TO_DAYS('2015-11-23') - TO_DAYS(IF (trans.type=10, trans.due_date, trans.tran_date))) > ,IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1)
* (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount),0),0)) AS Overdue1,
Sum(IF ((TO_DAYS('2015-11-23') - TO_DAYS(IF (trans.type=10, trans.due_date, trans.tran_date))) > 0,IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1)
* (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount),0),0)) AS Overdue2
FROM 0_debtors_master
LEFT JOIN 0_debtor_trans trans ON
trans.tran_date <= '2015-11-23' AND 0_debtors_master.debtor_no = trans.debtor_no AND trans.type <> 13
,
0_payment_terms,
0_credit_status
WHERE
0_debtors_master.payment_terms = 0_payment_terms.terms_indicator
AND 0_debtors_master.credit_status = 0_credit_status.id
AND 0_debtors_master.debtor_no = '' GROUP BY
0_debtors_master.name,
0_payment_terms.terms,
0_payment_terms.days_before_due,
0_payment_terms.day_in_following_month,
0_debtors_master.credit_limit,
0_credit_status.dissallow_invoices,
0_credit_status.reason_description<br><br><br>