LEFT JOIN ".TB_PREF."tax_types tt
ON taxrec.tax_type_id=tt.id
LEFT JOIN ".TB_PREF."gl_trans gl
- ON taxrec.trans_type=gl.type AND taxrec.trans_no=gl.type_no AND
+ ON taxrec.trans_type=gl.type AND taxrec.trans_no=gl.type_no AND gl.amount<>0 AND
(tt.purchasing_gl_code=gl.account OR tt.sales_gl_code=gl.account)
LEFT JOIN ".TB_PREF."supp_trans strans
ON taxrec.trans_no=strans.trans_no AND taxrec.trans_type=strans.type
AND taxrec.tran_date >= '$fromdate'
AND taxrec.tran_date <= '$todate'
ORDER BY taxrec.trans_type, taxrec.tran_date, taxrec.trans_no, taxrec.ex_rate";
+
return db_query($sql,"No transactions were returned");
}
function print_tax_report()
{
- global $path_to_root, $Hooks, $systypes_array;
+ global $path_to_root, $systypes_array;
$from = $_POST['PARAM_0'];
$to = $_POST['PARAM_1'];
$rep->Info($params, $cols2, $headers2, $aligns2);
- //for ($i = 0; $i < count($cols2); $i++)
- // $rep->cols[$i] = $rep->leftMargin + $cols2[$i];
-
$rep->headers = $headers2;
$rep->aligns = $aligns2;
$rep->NewPage();