- FROM ".TB_PREF."tax_types tax_type,"
- .TB_PREF."chart_master AS Chart1,"
- .TB_PREF."chart_master AS Chart2
- WHERE tax_type.sales_gl_code = Chart1.account_code
- AND tax_type.purchasing_gl_code = Chart2.account_code AND id=".db_escape($type_id);
+ FROM ".TB_PREF."tax_types tax_type LEFT JOIN "
+ .TB_PREF."chart_master AS Chart1 ON tax_type.sales_gl_code = Chart1.account_code LEFT JOIN "
+ .TB_PREF."chart_master AS Chart2 ON tax_type.purchasing_gl_code = Chart2.account_code
+ WHERE id=".db_escape($type_id);