projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added inactive records support.
[fa-stable.git]
/
taxes
/
db
/
tax_types_db.inc
diff --git
a/taxes/db/tax_types_db.inc
b/taxes/db/tax_types_db.inc
index 97a623290a272e0360390e4fe4895c666c65e8eb..897bad7cae858cd85138c6f1b2d56d8b6d95c03c 100644
(file)
--- a/
taxes/db/tax_types_db.inc
+++ b/
taxes/db/tax_types_db.inc
@@
-29,7
+29,7
@@
function update_tax_type($type_id, $name, $sales_gl_code, $purchasing_gl_code, $
db_query($sql, "could not update tax type");
}
db_query($sql, "could not update tax type");
}
-function get_all_tax_types()
+function get_all_tax_types(
$all=false
)
{
$sql = "SELECT ".TB_PREF."tax_types.*,
Chart1.account_name AS SalesAccountName,
{
$sql = "SELECT ".TB_PREF."tax_types.*,
Chart1.account_name AS SalesAccountName,
@@
-39,6
+39,7
@@
function get_all_tax_types()
WHERE ".TB_PREF."tax_types.sales_gl_code = Chart1.account_code
AND ".TB_PREF."tax_types.purchasing_gl_code = Chart2.account_code";
WHERE ".TB_PREF."tax_types.sales_gl_code = Chart1.account_code
AND ".TB_PREF."tax_types.purchasing_gl_code = Chart2.account_code";
+ if (!$all) $sql .= " AND !".TB_PREF."tax_types.inactive";
return db_query($sql, "could not get all tax types");
}
return db_query($sql, "could not get all tax types");
}