As a temporary fix to enable me to correctly use FA for tax reporting I have modified the code to post net amount from SI entry now - This is implemented using QE so that the 0VAT is associated to a particular entry. For the 0VAT reporting to work the zero-rated QE must be used. The posting to the tables works correctly.
The tax report rep709 however reports each SI twice. This is as a result of the following sql query:
SELECT tt.name as taxname, taxrec.*, taxrec.amount*ex_rate AS amount,
taxrec.net_amount*ex_rate AS net_amount,
IF(taxrec.trans_type= 1 OR taxrec.trans_type=2,
IF(gl.person_type_id<>0, gl.memo_, gl.person_id),
IF(ISNULL(supp.supp_name), debt.name, supp.supp_name)) as name,
branch.br_name
FROM 0_trans_tax_details taxrec
LEFT JOIN 0_tax_types tt
ON taxrec.tax_type_id=tt.id
LEFT JOIN 0_gl_trans gl
ON taxrec.trans_type=gl.type AND taxrec.trans_no=gl.type_no AND
(tt.purchasing_gl_code=gl.account OR tt.sales_gl_code=gl.account)
LEFT JOIN 0_supp_trans strans
ON taxrec.trans_no=strans.trans_no AND taxrec.trans_type=strans.type
LEFT JOIN 0_suppliers as supp ON strans.supplier_id=supp.supplier_id
LEFT JOIN 0_debtor_trans dtrans
ON taxrec.trans_no=dtrans.trans_no AND taxrec.trans_type=dtrans.type
LEFT JOIN 0_debtors_master as debt ON dtrans.debtor_no=debt.debtor_no
LEFT JOIN 0_cust_branch as branch ON dtrans.branch_code=branch.branch_code
WHERE (taxrec.amount <> 0 OR taxrec.net_amount <> 0)
AND taxrec.trans_type <> 13
ORDER BY taxrec.trans_type, taxrec.tran_date, taxrec.trans_no, taxrec.ex_rate
I haven't looked further into this report yet, the joins are obviously pulling the data out twice when only required once.
To save time, wondered if anyone had encountered this issue before. Before I start modifying the statement.
On a longer term, when I have more time, I would like to modify the SI code to deal with input more on the lines of elax's Banking/GL entry. Unless, of course, this is dealt with in a future version of FA.
Thanks