X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=taxes%2Fdb%2Ftax_types_db.inc;h=897bad7cae858cd85138c6f1b2d56d8b6d95c03c;hb=0b253e5e0d23400838d3bfb4f27fb3fb2637b3ab;hp=97a623290a272e0360390e4fe4895c666c65e8eb;hpb=8273b6b981c008c7968a7f7c8eaea640d453c3f2;p=fa-stable.git diff --git a/taxes/db/tax_types_db.inc b/taxes/db/tax_types_db.inc index 97a62329..897bad7c 100644 --- 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"); } -function get_all_tax_types() +function get_all_tax_types($all=false) { $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"; + if (!$all) $sql .= " AND !".TB_PREF."tax_types.inactive"; return db_query($sql, "could not get all tax types"); }